If you’ve been following my attempts to get the brightness up/down and other fn-keys on my Samsung Q320 laptop to work in Linux, you might like to know the saga has reached a happy conclusion. Previously I published a hack to the atkbd kernel driver to get these problematic keys to send key release events. My attempt to get this included in the kernel failed, but I was told the 2.6.32 kernel would contain a new mechanism for fixing this from userspace.
Well, 2.6.32 is here so how can we fix the fn-key release problem? Documentation for the new sysfs attribute is a bit scanty as it’s intended to be used only by udev/HAL/DeviceKit, but you can set it yourself quite easily. The relevant file is
/sys/devices/platform/i8042/serio0/force_release – this lets you manipulate a bitmap in atkbd.c indicating which scancodes don’t send key release events.
echo 130-132,134,136,137,179,247,249 \ > /sys/devices/platform/i8042/serio0/force_release
The bitmap editing syntax is quite nice – done in
lib/bitmap.c rather than the atkbd driver itself. I got those scancodes from the array
atkbd.c. They were originally intended for the NC20 but the Q320 keyboard seems to be the same. It works for me anyway.
You still need to map the brightness up/down keys to the correct X11 codes, which you can do like this:
setkeycodes e008 225 e009 224
Job’s a good’un.
All my Samsung Q320 coverage is here.
Ran into the brightness problem in the 2.6.35 kernel – have you been having any difficulty lately?
August 19, 2010 @ 4:17 pm
I’m still running 2.6.32 on my laptop: I’ll let you know if I run into any
problems if/when I upgrade.
August 19, 2010 @ 6:30 pm
Do you can use the onboard bluetooth on Samsung Q320?
January 27, 2011 @ 7:58 pm
> Do you can use the onboard bluetooth on Samsung Q320?
There’s a bluez driver for whatever chipset it uses, and it’s detected on boot but I haven’t tried using it so can’t say if it works.
January 27, 2011 @ 8:47 pm