Having problem with sticky Fn volume keys in Samsung NP350 laptop (or similar)? It’s easy to fix this. I’m using Fedora 19 but it should be similar on other distributions.

First check which event file is assigned to your keyboard by running following command:

# /lib/udev/findkeyboards
AT keyboard: input/event3

Now that we know this, we can run another command, passing our event file as an argument (input/event3 in my case). Now press the buttons you have problems with to get scan codes assigned to those keys:

# /lib/udev/keymap -i input/event3
Press ESC to finish, or Control-C if this device is not your primary keyboard
scan code: 0xA0   key code: mute
scan code: 0xAE   key code: volumedown
scan code: 0xB0   key code: volumeup

Now append the codes to the quirks file, like this:

# echo 0xA0 >> /usr/lib/udev/keymaps/force-release/samsung-other
# echo 0xAE >> /usr/lib/udev/keymaps/force-release/samsung-other
# echo 0xB0 >> /usr/lib/udev/keymaps/force-release/samsung-other

samsung-other file should be used by your /lib/udev/rules.d/95-keyboard-force-release.rules udev quirks file. Here’s the line responsible for running the script that turns the quirks on:

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keyboard-force-release.sh $devpath samsung-other"

This rule will be run on boot but if you want to use the quirks without rebooting, you can run it manually:

# /usr/lib/udev/keyboard-force-release.sh devices/platform/i8042/serio0  samsung-other

The script will read scancodes from samsung-other file and add it to /sys/devices/platform/i8042/serio0/force_release kernel file.