Ubuntu – How to make keyboard backlight Fn buttons work in Samsung Series 9

backlightfunction keyslaptopsamsungudev

I've just installed Ubuntu 12.10 on my Samsung 900X4C. However, I can't get the keyboard backlights to work.

I added the keymaps as per community docs – Samsung Series 9 (section Function Keys). But regardless of pressing Fn+F9 or F10 (backlight decrease/increase), I get:

  1. No lights in keyboard
  2. Toggler in top right corner always pops-up as maxed out (i.e., "full light")

How can you fix the keyboard backlight? The Fan button (Fn+F11) doesn't work either, if you also know about that one it would be great.

Best Answer

I bought the exact same model (900X4C) a couple of days ago and I've successfully seen the F9/F10 keys work, and I didn't even had to install the Voria / samsung-tools package either - I just fiddled around with the /lib/udev/keymaps/samsung-other file and the corresponding force-release file.

Unfortunately, I messed up the install process (I wasn't running Ubuntu in UEFI mode and I had swap) and I decided to reinstall, since then I was unable to replicate the working keyboard backlight.

I just felt like that was something that may help others more knowledgeable to find a solution.


Here are a couple of (perhaps useful) resources I came across:

Also, a couple of experiments and results...


Doing:

cat /sys/class/dmi/id/product_name

Returns:

900X3C/900X3D/900X3E/900X4C/900X4D (matched by samsung-other)

After a fresh install of Ubuntu 13.04 and update this is what I get:

  • F1 (Settings) - Doesn't Work
  • F2 (- Screen Brightness)
  • F3 (+ Screen Brightness)
  • F4 (Toggle Video Mode)
  • F5 (Toggle Clickpad)
  • F6 (Mute)
  • F7 (- Volume)
  • F8 (+ Volume)
  • F9 (- Keyboard Backlight) - Doesn't Work
  • F10 (+ Keyboard Backlight) - Doesn't Work
  • F11 (Fan / Toggle CPU Speed) - Doesn't Work
  • F12 (Toggle WiFi) - Doesn't Work

I also managed to get the correct keymap codes for this exact model by doing /lib/udev/keymap -i input/event3 and gathering the output when I pressed a FN + Fx key combination:

0xCE    prog1           # F1
0x89    brightnessdown  # F2
0x88    brightnessup    # F3
0x82    switchvideomode # F4
0xF7    f22             # F5
0xF9    f23             # F5
0xA0    mute            # F6
0xAE    volumedown      # F7
0xB0    volumeup        # F8
0x97    kbdillumdown    # F9
0x96    kbdillumup      # F10
0xB3    prog3           # F11, "silent" isn't recognized
0xD5    wlan            # F12

You can use showkey to get the decimal code representation for the combination pressed.

Remember to call the following commands afterwards:

sudo udevadm control --reload-rules
sudo /lib/udev/keymap input/event3 /lib/udev/keymaps/samsung-other

I'm sort of giving up on this for now but if anyone gets it right, let me know!


PS: While experimenting, I just noticed 2 interesting things:

  1. If you comment and reload all the default keymap rules, everything still works (why?)
  2. If you use the github rules I liked to, once you press F9/F10 you can't type anymore anywhere

The point #2 makes me suspect the keys are not being released.

# Set model specific atkbd force_release quirk
#
# Several laptops have hotkeys which don't generate release events,
# which can cause problems with software key repeat.
# The atkbd driver has a quirk handler for generating synthetic
# release events, which can be configured via sysfs since 2.6.32.
# Simply add a file with a list of scancodes for your laptop model
# in /usr/lib/udev/keymaps, and add a rule here.
# If the hotkeys also need a keymap assignment you can copy the
# scancodes from the keymap file, otherwise you can run
# /usr/lib/udev/keymap -i /dev/input/eventX
# on a Linux vt to find out.

The above was taken from /lib/udev/rules.d/95-keyboard-force-release.rules.

Related Question