Ubuntu on the samsung 900X3C

Written in English
17 september 2018

Nils Glerum

Recently I got my hands on a (actual several) samsung 900X3C laptop(s). If anything competes with the macbook air it has got be these these laptops. Samsung has done a great job on this one.

But unfortunately running Ubuntu precise or even Quantal on these beautiful machines doesn’t come without glitches. So I decided to write up my experiences with it, resulting in a laptop that can definitely compete with the Windows version.

When it came out of the box, the first thing I did was boot it with an Ubuntu 12.04 alternate 64 bit CD:

After installing, the first thing I noticed after the first reboot was the error:

Error: no video mode activated

Now I’ve seen that one before and it actually never bothered me, but this time it did. Booting a laptop like this and starting with an error is just not done. So I decided to dig in to it. These errors only show up on machines installed with encrypted harddrives. I figured the problem must be in grub trying to access some files outside the bootpartition since in that stage of booting it is the only partition available. A quick search led me to the following Bug. So my hunch was right. I did a:

sudo cp /usr/share/grub/*pf2 /boot/grub

And fixed the first problem. Unfortunately there were a few to come.

FN-Keys

The first thing I noticed after booting in my freshly installed Ubuntu 12.04 was the lack of some Fn-keys working. Now I’ve dealt with that before, so the first thing I looked for was the udev keymap rules. I ran into an excellent article on it:

There are actually several other distros reporting the problem. The problem is that the udev keymap files are actually different from the 900X3A/B and these are the ones that ship with ubuntu. So we have to create our own:

Before you do make sure you did a apt-get update and apt-get dist-upgrade. There is a new version of udev which will overwrite our changes (I learned that the hard way )

The following bugreport actually saved me some work:

Steps to fix:

1. add /lib/udev/keymaps/samsung-900x3c

# /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. add /lib/udev/keymaps/force-release/samsung-900x3c

# /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. edit /lib/udev/rules.d/95-keymap.rules add following line to the other Samsung specific lines

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

4. edit /lib/udev/rules.d/95-keyboard-force-release.rules add following line to the other Samsung specific lines

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

Now that we’ve done that reboot your machine and see the backlight Fn-keys are actually working. Leaving us with a few dead keys, the wireless, CPU fan and the Fn-1, which I assume has to open up some controlpanel.

Luckily there’s the “Samsung on my laptop” project by Voria:

Just add the repository with:

apt-add-repository ppa:voria/ppaapt-get updateapt-get install samsung-tools xbindkeys-config.

Now the first thing we want to do is open the samsung-tools configuration editor:

samsung-tools-preferences

Next configure the dead keys with xbindkeys-config. It will result in a .xbindkeysrc file in your homedirectory. Mine looks like this:

#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

For future users you might want to copy this file to /etc/skel.

Hibernation

and

suspend

Hibernation en Linux never seemed to go hand in hand. There were loads of times it got fixed, then broken then fixed  and then again broken. For now using the 3.5 kernel seems to fix most issues. I’ve compiled the latest 64 bit kernel from ubuntu. This kernel also includes the latest samsung_laptop module. You can download the kernel and the headershere. I did remove the samsung-tools power management file from /etc/pm/sleep.d. Since I’m using the 3.5 kernel it shouldn’t be nescesarry.

The only problem that I cannot pinpoint is randomness in suspending when closing the lid. Sometimes it works, sometimes it doesn’t. If anyone can shine a light on that I’d be happy to know. I know acpi sees the lid close. I’ve tested that with acpi_listen. Maybe I’ll come back on that in a future post.

- EDIT- I’m actually having the problem right now and ACPI doesn’t see the lid closed. So suspending works like a charm, but is has to be triggered and it’s not if acpi doesn’t see the lidclose. I also noted that acpi cannot detect ac-power / battery power changes. I’ve unplugged my powercable but it still shows:

acpi -a -b -i Battery 0: Charging, 95%, 00:11:24 until charged Battery 0: design capacity 5440 mAh, last full capacity 5400 mAh = 99% Adapter 0: off-line

I think it’s due to this bug

-EDIT2-

I have upgraded the bios of two 900x3c’s to this version. Although a lot of people claimed the acpi-issues returned after a few days or sometimes weeks after a bios upgrade, these laptops are still doing ok. One of them for 3 weeks now. Both running ubuntu 12.10 now but I think 12.04 would be the same.

Trackpad

Now the trackpad actually seems to work pretty ok out of the box. You can set some settings in the control-center but I’d like to tweak it a bit more. After reading about the synaptics touchpad driver, synclient and xorg configuration I resulted in the following config:

/usr/share/X11/xorg.conf.d/52-synaptics-custom.conf

Section "InputClass"
Identifier      "samsung n900x3c clickpad"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "SHMConfig"     "On"
Option "RTCornerButton" "2" #right-click to bottom right
Option "RBCornerButton" "3" #right-click to bottom right
Option "LTCornerButton" "6" #right-click to bottom right
Option "LBCornerButton" "7" #right-click to bottom right
Option "TapAndDragGesture" "1" #tap&release then tap&drag
Option "PalmDetect" "1" #avoid bad track behavior
Option "VertTwoFingerScroll" "1" #two-finger vertical scroll
Option "VertEdgeScroll" "0" #right edge vertical scroll
Option "TapButton1" "1" #one-finger tap = left-click
Option "TapButton2" "3" #two-finger tap = right-click1
Option "ClickPad=1"
EndSection

Now some options only seem not to work in xorg config, so I’ve created a little script to let synclient apply them at boot:

/usr/local/bin/synaptics.sh

#!/bin/sh
synclient RightButtonAreaLeft=1600
synclient RightButtonAreaRight=2946
synclient RightButtonAreaTop=1040
synclient RightButtonAreaBottom=1872

/etc/xdg/autostart/synaptics.desktop

[Desktop Entry]
Type=Application
Exec=/usr/local/bin/synaptics.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=touchpad
Name=touchpad
Comment[en_US]=touchpad addons
Comment=touchpad addons

Now reboot and enjoy your fully functional samsung 900 laptop.


Lees meer Smoose artikelen