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.

68 Comments

  1. Saverio
    January 22, 2014

    Thanks for this page, full of useful information! In case other people land here, I want to add that I bought the Samsung Series 9 NP900X4C-A06US, and everything works smoothly, almost out of the box! All important function keys and the battery indicator also work. Suspend does not work on lid closure, but I prefer it this way: I launch /usr/bin/suspend via a keyboard shortcut, before closing the lid, only if I want to suspend. To be honest, it seldom happens: boot time is 7-8 seconds, shutdown 4 seconds.

  2. jimena quintupil
    October 16, 2013

    Thank you Riley! You help me a lot with your tips!

    • rileybphoto
      October 17, 2013

      Your welcome! I am glad my tips helped you :)

  3. Riley Brandt Photography » Building an elementary OS Ultrabook
    July 23, 2013

    […] are few changes to be made in the bios before you begin. Read the “Before You Install: Bios Changes” section of my previous post, then follow the regular installation steps for Ubuntu. After you […]

  4. Yochai Gal
    June 20, 2013

    Thanks so much for this!
    Although I have a newer model (and run Arch), your xbindkeys config really made the difference (I couldn’t really get samsung-tools to work properly before). I’ve also found it helpful to configure the touchpad manually (first disabling my DE, gnome-shell from taking over) as I prefer chromebook/macbook touchpads.
    Everything works perfectly now, save one tiny issue: the laptop does not wake automatically from suspend upon lid open. Oh well.

    • rileybphoto
      June 23, 2013

      You’re welcome. It’s great to hear that others are benefiting from the information! Though I have to thank Nonobis’ blog for the configuration info.

      Did your newer model Series 9 come with Windows 8? Did you have any UEFI problems? Or did you just disable it from the Bios?

      • Yochai Gal
        June 24, 2013

        It did, but I didn’t boot it even once. Disabled secureboot and fastboot and installed away!

        • rileybphoto
          June 24, 2013

          Cool:)
          After you have installed your OS, you can re-enable Fast Boot to shave a few seconds off the start up time. But if you want to boot off a USB, you need to disable it again.

          • Yochai Gal
            June 25, 2013

            Yeah, it took me a few tries to figure that one out :)
            Does your laptop wake from supsend automatically?

          • rileybphoto
            June 25, 2013

            No, I have to push the power button to resume from suspend. Not a big deal, but it would be nice if it worked automatically.

          • Yochai Gal
            June 25, 2013

            Cool, let me know if you find a fix (and I’ll let YOU know if I find one, too).

          • rileybphoto
            June 25, 2013

            Will do :)

  5. B.S.
    June 17, 2013

    Couple purchasing tips for readers …

    – don’t rush out and buy bleeding edge hardware, the linux kernel may not be up to it yet – give it a few months. This was particularly true of sandybridge graphics (x display hangs, self-restarts, and the like). I would be surprised if this wasn’t true for ivybridge, I fully expect it to be true for haswell. However – OpenSuse 12.3 change notices noted the beginnings of updates for Haswell. Expect bugs / issues. e.g. Only in the last few months has kde gotten stable on my sandybridge, purchased perhaps a year ago. So – be wary of bleeding edge hardware, check compatibility lists, as noted. (If it mostly works for you, and you can live with an issue for a few months, e.g. sleep, go for it – the kernel will catch up.)

    – take a live cd with you – boot it up in the store. See how much of the hardware does/n’t natively work. Decide if it’s enough. (Put it on a usb key.)

    • rileybphoto
      June 18, 2013

      Definitely true, but I think it is getting better. I read that there was support for Haswell in the Linux kernel before any hardware had ever shipped.

  6. Martin
    June 12, 2013

    I’m using linux on my 900x3c nowadays and it works flawless.

    One question, if I want to upgrade my bios from within linux, how do I do it? SWupdate aint available afaik.

    Thanks for a good tut.

    • rileybphoto
      June 13, 2013

      I am not sure you can. I think that is the one thing that has to be done through Windows. But search around, there might be a way.

    • B.S.
      June 17, 2013

      Go to website, download update, copy to usb key, stick key in and boot. Many computers will auto-detect new bios on attached key and auto-load. YMMV.

  7. dev
    May 14, 2013

    “deadline” is the wrong scheduler for SSDs. it’s a terrible choice. you need to be using “noop”, so that the kernel turns over data reading/writing/queuing to the SSD’s firmware, which is better able to prioritize requests, allocate, and move it around at the fastest possible pace.

    every single other scheduler in the kernel was designed for magnetic HDDs, which read data in a linear fashion, constrained by spindle speeds, rotation, tracks, and physically shuffling the head around. SSDs do none of those things, and should not be bound by those outdated scheduler considerations. “noop” is simply FIFO, file-in, file-out. you get your data to and from the drive ASAP, without waiting for irrelevant ATA commands to move nonexistent hardware. :)

    another extremely important tip for SSD life: turn on “noatime” in /etc/fstab for every SSD partition and drive you have. all those access time writes will degrade the flash quicker. “noatime” applies to every filesystem out there; i even do it on my macmini’s SSD for HFS+. as a side benefit of turning off atime, you’ll get a little performance boost, since the OS doesn’t keep looking up access times on every op.

    thanks for these samsung 9 anecdotes! i got to try out this same model at a local store, and it really is amazingly thin and light. i’m not sure that i’m sold on the matte screen (or the PLS panel), and i definitely need one bigger than 13″. but overall, the 9 series looks a lot like the last stop on my linux ultrabook quest.

    • rileybphoto
      May 21, 2013

      Thanks for all the info.

      As I mention in the article, I am no expert at SSD optimization. From what I had read at the time, deadline was recommended to extend the life of the SSD. I’ll look into “noatime” as well. I’ve also read that enabling TRIM can also extent the SSD’s life.

      I am surprised you don’t like the matte screen. I absolutely love it! Then again, I am surprised that all the creative professionals I know haven’t realized that those shiny, reflective screens Apple keeps selling them are horrible. Seriously it was a huge selling point for me. The viewing angles are unmatched.

      I hope you find your perfect Linux ultrabook. It’s a great feeling when you do :)

  8. Paulo
    May 5, 2013

    Is it the same conf, for Ubuntu 13.04 ?

    • rileybphoto
      May 5, 2013

      I don’t know. I am actually running elementary OS Beta on the Series 9 now.

      • Paulo
        May 21, 2013

        was someone able to get backlight to work , with Ubuntu 13.04 ?

        • rileybphoto
          May 21, 2013

          Sorry, I don’t have any experience with 13.04 on the S9. I thought it might be easier with the updated kernel.

  9. Alan Orth
    March 8, 2013

    Good tip about automatically setting the brightness. I’ve been experimenting with powertop recently and found that my battery life is GREATLY extended when I reduce the display brightness. I didn’t realize how awesome the display was until I found myself enjoying using it at < 50% brightness!

    It's kinda annoying that the AC state isn't detected… :)

    • rileybphoto
      March 15, 2013

      No problem. I don’t remember where I found out how to set the brightness at login, but it helps so much. It’s a huge battery drain at full brightness, and really hard on my eyes.

      Yes, the AC indicator thing is a little annoying.

  10. Dimon Limon
    March 2, 2013

    Hi Riley!

    Thanks for your instructions! Did you accomplish to emulate a middle mouse click with the clickpad on 900X3C?

    And what about the fan mode? Currently, I have manually to set it on silent every time the temperature goes over 55°.

    Cheers!

    • rileybphoto
      March 5, 2013

      No problem. I didn’t even realize middle click was possible on a trackpad. I guess it shows how much of a mouse guy I am :)
      I have the fan mapped to the F11 Key, which is great to change fan modes. How did you get it to automatically switch at 55 degrees?

      • Dimon Limon
        March 8, 2013

        Actually I wanted to know from you, if you’ve found a way to switch it automatically at 55°? :) It’s not very convenient to use fn+f11 to slow the fan down, when it gets above above 55°.

        • rileybphoto
          March 15, 2013

          lol, no sorry, I don’t know how to switch it automatically. There is probably a config file you can edit somewhere.

    • Ruela
      June 14, 2013

      so, how did you manage to change to silent-mode manually? I’ve tried to keybind the silentmode to Fn-F11 but it doesnt seem to work on my 900X4C.

      • rileybphoto
        June 18, 2013

        Did you use the Samsung Tools Preferences? That was the only way I was able to bind the F11 key.

  11. blizzerdz
    February 8, 2013

    Great stuff.. Do you know a way of running Linux on Macbook Air 2011? BTW: Shared your story here: http://www.faceit-norge.com/post/56463/riley-brandt-photography-linux-on-the-samsung-series-9 Hope you gain more traffic on it ;)

  12. 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.