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

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.