Linux on the Samsung Series 9

Posted on Nov 18, 2012 in Blog, Linux | 68 Comments

Linux on the Samsung Series 9 Ultrabook (900X3C)

Running Linux on premium hardware is a sublime experience.

I installed Ubuntu Gnome Remix 12.10 on my new 13.3 inch Samsung Series 9 ultrabook and I am in love with it. I’ve had new Macbook Pros with OS X and high-end desktops running Windows 7, but none of them compare to the pleasure of running of Linux on great hardware.

There are a lot of ultrabooks available now with similar features. A few details that make the Samsung Series 9 stand out are:

  • It is the world’s thinnest laptop at 0.5 inches deep. It’s even thinner than the Macbook Air.
  • The screen is amazing. It has a matte finish with anti-glare, not an impractical glossy screen. The viewing angles are unmatched, it’s super bright (400 nit), and has a 1600×900 resolution. Being a photographer, this screen was a hugh selling point.
  • It weighs only 1.10kg (2.43lbs).
  • It makes virtually no noise and still stays cool.

Under the hood it has:

  • An Ivy Bridge 1.7GHz Intel Core i5-3317U
  • Intel HD Graphics 4000
  • 4GB of RAM
  • 128 GB solid state drive

Buying Linux Ultrabooks

If you want Linux pre-installed on your new ultrabook, there is only one choice that I know of, the Dell XPS 13. Unfortunately, it is only available in America. Zareason sells an “ultralap”, but it doesn’t have the super sleek design required to be categorized as an ultrabook.

This is disappointing because I think the best user experience on desktop/laptop computers is Linux installed on top quality hardware. Unfortunately, the average computer user doesn’t even know Linux is an option. If customers could walk into an electronics store and see a high quality ultrabook running a beautiful Linux operating system like Elementary OS, things might start to change.

So, if you can’t buy (or don’t want) the XPS 13 ultrabook, you will need to purchase a Windows ultrabook and then install Linux. If you are a masochist who likes to support technological dictatorships, suffering through the nightmare of installing Linux on the Macbook Air is also an option.

When you buy a new computer that doesn’t come with Linux pre-installed, you should check if the hardware is compatible with Linux (most is) before you buy it. The first place to check is Ubuntu’s great Certified Hardware page. It lists all the computer models that have be verified as compatible with Ubuntu.

If the computer you want to buy isn’t listed there, you can search the Community Documentation where users provide tons of information about hardware compatibility and tips to get everything working on popular ultrabooks like the Asus Zenbook.

Samsung Series 9: What Works

I can confirm that all the essential hardware works out of the box in Ubuntu Gnome Remix 12.10 (I assume plain Ubuntu 12.10 is the same). If you like, you can do a fresh install and start using your computer without making any changes. Hardware that is working out of the box includes:

WiFi
Webcam
Trackpad
Ethernet
HDMI out
All audio and video
Brightness and volume function keys

For a detailed list, check the community documentation.

What Doesn’t Work

1. Suspend on lid close
This works, then stops working. The bug report is here. As a work around, I just suspend from the menu before I close the lid. For Gnome Shell, I needed this extension to add suspend to the menu.

2. Proper battery status notification
Details on this bug can be found here.

How To Get Everything Working

There are still a few steps to needed to get all the function keys working. There are also some optional tweaks to extend the life of your solid state drive and battery.

1. Before You Install: Bios Changes

You may need to change the boot order so you can install your Linux operating system from a USB drive. Hit the power button, then quickly push F2 at the Samsung splash screen to enter the system BIOS.

Select the Boot tab on the top right, then choose Boot Device Priority. From there, move the option USB HDD to the top of the list. Press F10 to save and exit.

If you are still having trouble booting from your USB drive, disable Fast BIOS Mode from the same Boot tab in the system’s BIOS. Depending on which Linux distribution your are running, you may also need to disable UEFI Boot Support. Press F10 to save and exit.

Power Saving Mode

While you are making changes in the BIOS, it is a good idea to enable Power Saving Mode from the Advanced tab. This will limit your battery’s maximum charge to 80% which greatly extends the life of your battery.

2. Function Keys

Most of the function keys on the Series 9 work out of the box, but a few don’t. You can get most of them working by editing a few configuration files. Thanks to the nonobis blog for all the details.

1. In terminal type:

sudo gedit /usr/lib/udev/keymaps/samsung-900x3c

Add the following lines, then save and exit.

# /usr/lib/udev/keymaps/samsung-900x3c
0xCE prog1              # FN+F1 System Settings
0x89 brightnessdown     # FN+F2 Brightness down
0x88 brightnessup    # FN+F3 Brightness up
0x82 switchvideomode    # FN+F4 Switch video mode
0xF9 f23                # FN+F5 Turn touchpad off
0xA0 mute               # FN+F6 Mute
0xAE volumedown         # FN+F7 Volume down
0xB0 volumeup           # FN+F8 Volume up
0x97 kbdillumdown    # FN+F9 Keyboard backlight down
0x96 kbdillumup         # FN+F10 Keyboard backlight up
0xB3 silentmode         # FN+F11 Silentmode
0xD5 wlan               # FN+F12 WiFi

2. In terminal type:

sudo gedit /usr/lib/udev/keymaps/force-release/samsung-900x3c

Add the following lines, then save and exit.

# /usr/lib/udev/keymaps/force-release/samsung-900x3c
0xCE # FN+F1 System Settings
0x89 # FN+F2 Brightness down
0x88 # FN+F3 Brightness up
0x82 # FN+F4 Switch video mode
0xF9 # FN+F5 Turn touchpad off
0xA0 # FN+F6 Mute
0xAE # FN+F7 Volume down
0xB0 # FN+F8 Volume up
0x97 # FN+F9 Keyboard backlight down
0x96 # FN+F10 Keyboard backlight up
0xB3 # FN+F11 Silentmode
0xD5 # FN+F12 WiFi

3. In terminal type:

sudo gedit /usr/lib/udev/rules.d/95-keymap.rules

Add following line to the other Samsung specific lines (ctrl-f and search for Samsung):

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="900X3C*", RUN+="keymap $name samsung-900x3c"

Save and exit gedit.

4. In terminal type:

sudo gedit /usr/lib/udev/rules.d/95-keyboard-force-release.rules

Add following line to the other Samsung specific lines (ctrl-f and search for Samsung):

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="900X3C*", RUN+="keyboard-force-release.sh $devpath samsung-900x3c"

Save and exit gedit.

5. To reload udev rules, in terminal type:

udevadm control –-reload-rules

Reboot the computer. The keys for your backlight keyboard should be working now.

If There Are Function Keys Still Not Working

There may be a few function keys that still don’t work. In particular, the F1 key that was setup specifically for the Windows control panel, F12 for wireless, and the fan key on F11.

To fix these install Samsung on my Laptop adding the PPA and installing it:

apt-add-repository ppa:voria/ppa
apt-get update
apt-get install samsung-tools xbindkeys-config

Then run:

samsung-tools-preferences

For me, the GUI only worked for some of keys, so I edited the xbindkeys-config hidden file that it created in the home folder according to the nonobis blog’s configuration:

#fnf1

"/usr/bin/gnome-control-center"
m:0x0 + c:156
XF86Launch1

#fnf11
"/usr/bin/samsung-tools --show-notify --quiet --cpu hotkey"
m:0x0 + c:210
XF86Launch3

#fnf12
"/usr/bin/samsung-tools --show-notify --quiet --wireless hotkey"
m:0x0 + c:246
XF86WLAN

# End of xbindkeys configuration
"SamsungToolsDummyCommand"
Control+Alt+Shift+Mod4+F1+F2+F3
#
#
# End of xbindkeys configuration

Everything should be working now, including being able to launch the System Settings with F1 :)

3. (Optional) Solid State Drive (SSD) Optimization

The downside of Solid State Drives (SSD) is that they can only be written to a limited number of times before they will fail. Thankfully, there are a few changes you can make to extend the life of your SSD. Please keep in mind that I am not an expert on SSD optimization, so use the following changes at your own risk. You can also find other ways of doing this documented online.

Change the Disk Scheduler

The disk scheduler determines the order read and write requests to the disk are handled. It is a good idea to change it to Deadline for SSDs. To see which scheduler your system is using, launch Terminal and type:

cat /sys/block/sda/queue/scheduler

The schedule your system is using will be listed in brackets, ie:

[noop] deadline cfq

To change the scheduler you need to edit /etc/rc.local. I do this with the text editor gedit:

sudo gedit /etc/rc.local

And add the line:

echo deadline >/sys/block/sda/queue/scheduler

Save and exit gedit. You may need to change “sda” to something else if your drive is located elsewhere, ie: sdb, sdc, etc. After you reboot and run cat /sys/block/sda/queue/scheduler you should see [deadline] in brackets.

Swapiness

If/when your system runs out of memory, it will start writing to the swap partition on your hard drive. This is nice and fast on a SSD, but it will also shorten the life of the drive. You can instruct Ubuntu to only write to the hard drive when absolutely necessary. Open terminal and type:

sudo gedit /etc/sysctl.conf

Add the line:

vm.swappiness=0

Then save and exit.

Temp Files in RAM

You can further limit the number of writes to your SSD by converting /tmp directory to tmpfs (RAM). In terminal run:

sudo gedit /etc/fstab

Add the following line, then save and exit:

none /tmp tmpfs defaults 0 0

Reboot your computer. If you run the command “mount” from terminal, you should see that /tmp is now a tmpfs. You might also want to consider moving your browser cache to tmpfs.

4. (Optional) Set Brightness

One thing that bugs me is that every time I start the computer, it is set to full brightness (which is super bright on this machine). To make it start at your preferred brightness (I like 20%) just install xBacklight.

sudo apt-get install xbacklight

Then, from Startup Applications add a new entry with:

Name: Brightness
Command: xbacklight -set 25

You can change “-set 25” to whichever brightness percent you prefer. Restart the computer. The brightness will be set right after you login.

32 Comments

  1. rileybphoto
    February 6, 2013

    Hi Ahmet,

    No this isn’t the case with me. From the BIOS I set “UEFI Boot Support” to “Disabled”. But I really am not an expert on UEFI. You should be careful, the newer model NP900X4C can be bricked when booting in Linux:

    http://www.h-online.com/open/news/item/Booting-Linux-using-UEFI-can-brick-Samsung-laptops-1793958.html

    Though I believe a fix has already been merged into the kernel.

  2. rileybphoto
    February 6, 2013

    Thanks for the tip. The UEFI info is very important for users having difficulty.
    Steam is quickly getting better and better on Linux. I hope you can leave Windows for good one day soon ;)

  3. Jan W?sak
    February 1, 2013

    Hey Rye,

    Thanks for the tips. Just bought the sammy and after a couple of weeks trying to get used to windows 8… I cannot agree more, running awesome software on top quality steel is the best experience ever! :)

    Still struggling with the keyboard backlight keys, your recipe does not seem to work for me (I’m running the standard Ubuntu 64bit), but I will not give up.

    One thing though, for people who’d like to dual boot I’d also recommend the boot-repair tip at http://askubuntu.com/questions/221835/installing-ubuntu-on-a-pre-installed-uefi-supported-windows-8-system. Note that you need the 64bit Ubuntu 12.10 for this, the other ones are not UEFI compatible. My windows gave up on me for a while but after the boot-repair it’s back on. Hopefully VALVE will deliver STEAM for linux quickly so that I can kiss w8 goodbye completely. :)

  4. Ahmet
    January 23, 2013

    Hi Rye. Nice post. I’m thinking of buying this laptop but the most important thing that’s going to help me make up my mind will be its linux compatibility. According to this post and a few others, it seems like its pretty compatible so far but I’ve come across with a user comment in ‘http://blog.jospoortvliet.com/2012/09/linux-and-samsung-series-9-np900x3c.html’ says:

    alan.orthWednesday, 19 December, 2012I’ve
    just run through an Arch Linux install on my brand new NP900X3C. I
    opted for a pure UEFI + GPT boot, and found that I was kernel panicking
    randomly. It turns out there are some problems with the samsung-laptop
    kernel module (at least in 3.6 and 3.7), so I’ve black listed it an am
    running much more stable now. Without samsung-laptop neither rfkill and
    keyboard backlight don’t work, so I can add them to the list of already
    non-working sleep and AC power detection…

    Is this really the case with you? Since it is important for me to have the keyboard backlight. Thanks in advance.

  5. Matt Rixman
    January 17, 2013

    in Ubuntu (and likely others) if you prefer to have the backlight get set before logging in you can add the xbacklight command to: /usr/local/sbin/lightdm-setup.sh

    • rileybphoto
      January 19, 2013

      Thanks for the tip.

  6. Stas
    December 2, 2012

    Thank you for the valuable information. How is temperature when idle; when under load?

    • rileybphoto
      December 2, 2012

      You’re welcome. It sits at around 40 – 48 degrees Celsius when surfing the web and playing music. It has gotten a lot warmer after playing the game Braid, but I haven’t checked the temperature then. It is definitely the coolest laptop I’ve used.

  7. Me
    November 26, 2012

    Hello!
    It looks like you solved the suspend onlid close issue, can you explain how did you do ? it is still mentionned as an issue on the community page.

    I read some crazy article on the web telling that it may work for a while and then stop working ..??
    Could you also share your bios version ?

    • rileybphoto
      November 28, 2012

      Hi,

      Suspend on lid close actually works out of the box in UGR 12.10. I was just too stupid to realize it. I have it turned on in the System Settings, as well as in the Tweak Tool.

      I am running BIOS version P03AAC. I didn’t do any firmware upgrades before I installed Linux.

      I think the crazy article you are talking about is for the correct battery status, not suspend. People have reported it working, then failing again after doing a firmware update and/or reset. I don’t have any experience with this since it has never bothered me.

      • Me
        November 29, 2012

        Hello,
        thank for feedback !

        regarding crazy discussion: some poeple face this “issue disappear and come again later” also with suspend on lid close. you may have a look here if interested.: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/986724

        • rileybphoto
          December 2, 2012

          Thanks for the link. It turns out I am having the same problem. My suspend on lid close isn’t working anymore :( I’ll add to the bug report.

          • Me
            December 3, 2012

            Oups, sorry that I bring the “evil eye” on your laptop !

            By the way, I was think it should be possible to set suspend when inactive for a while (like the screen saver). Then in case you forget to switch to suspend manually, it should do it after a few minutes. Does it work ?

            Not so comfortable if you often use the laptop to watch some movies, but otherwise it could help

          • rileybphoto
            December 4, 2012

            Yes, I can set suspend to start after 10 mins (or 30mins, 1 hour etc) and it works.

  8. David Nielsen
    November 19, 2012

    The Elementary OS project would love some bug reports from you in an effort to make installing on the Samsung Series 9 laptops easier.

    https://twitter.com/elementary/status/270613887899037697

    • rileybphoto
      November 19, 2012

      Is it enough to send bug reports from a live session, or does it need to be installed to really help?

      Awesome work on the beta btw, Elementary is the OS I will be recommending to new Linux users.

      • Cassidy James
        November 26, 2012

        Glad to hear you like the OS! :D Bug reports from the live session should be okay, though being installed and up-to-date would be best.

        • rileybphoto
          November 28, 2012

          Well I’ve been sending some from the live sessions. I would do an install, but Gnome Shell is just running so darn smooth ;)

          • Christopher Carr
            February 2, 2013

            Pantheon is snappier than Gnome Shell. :-)

          • rileybphoto
            February 6, 2013

            I find them both really snappy. Faster than Unity. Maybe Mutter is faster than Compiz?
            I installed Luna Beta 1 on my main desktop. I like it better than Gnome Shell on the large screen. But I am really happy with Gnome Shell on the smaller 13 inch screen.

          • Christopher Carr
            February 7, 2013

            Yeah, Gnome Shell makes better use of limited space. Still, on my old Cr-48 (12″) I’m running eOS, because of the performance differential.

            “Maybe Mutter is faster than Compiz?”

            Seems like that has become the case.

  9. SlashVee
    November 19, 2012

    Hi! Quick question: how’s the trackpad working out? Is it comfortable enough?

    • rileybphoto
      November 19, 2012

      Yes it’s great. Nice and smooth. Better than Windows actually. I just had to enabled two finger scrolling from the System Settings.

    • rileybphoto
      November 19, 2012

      Yes it’s great. Nice and smooth. Better than Windows actually. I just had to enabled two finger scrolling from the System Settings.

  10. slp
    November 19, 2012

    The 900X3C is a really cool ultrabook (IMHO, the best you can buy right now). Recently, I bought the 900X3A, the older brother of your laptop (some places still sell it, and it’s a bargain, ~800$). To extend the life of my SSD, I’ve also changed ‘/etc/fstab’ to mount the filesystem (ext4) with discard, noatime and nodiratime. Also, Powertop can give you some useful tips to extend your battery life (I’ve increased mine in almost two hours, just by switching to a non-compiz window manager).

    • rileybphoto
      November 19, 2012

      $800 is a great price! Thanks for the tip about Powertop, I’ll have check it out. Though compiz isn’t an issue for me since I use Gnome Shell.

  11. Mad
    November 19, 2012

    It shouldn’t be necessary to change disk scheduler anymore, the kernel should autodetect that you’re using an ssd and adapt to it, so the default choice of cfq should be plenty.

    • rileybphoto
      November 19, 2012

      Interesting, thanks for the tip. When I checked, my system was originally set to “loop”.

  12. Soba
    November 19, 2012

    Great article! I’ve been contemplating a Linux install on my 900X3C for a while as well, but I won’t be able to last as long with a single battery charge as compared to when running Windows. What’s your experience on this?

    • rileybphoto
      November 19, 2012

      It’s hard to say. I never really used the Windows install, so I can’t compare. Also, one of the first things I did was turn on the Power Saving Mode so the battery only charges to 80%. But you should go for the Linux install, it’s awesome :)

      • Soba
        November 20, 2012

        With 80% charge, maximum brightness and a minimalist debian netinst setup with xmonad as window manager, acpi tells me I have little more than 3 hours left. That’s a record for every laptop Linux installation I ever had, but still not close to the ~6h on medium display brightness you get on Windows. Maybe the measures suggested by powertop will improve the situation.

        • rileybphoto
          November 20, 2012

          The full brightness is killing your battery life. That screen is so bright it hurts my eyes. I usually have it at less than a quarter power.

          I know there is a bug that causes incorrect battery status, you might want to try and run the computer and see how long it really lasts.