Bug 14052

Summary: Some Fn + XX keys on Samsung laptops does not produce key release events (need atkbd patch)
Product: Drivers Reporter: JanS (jan.skowron)
Component: Input DevicesAssignee: Dmitry Torokhov (dmitry.torokhov)
Status: RESOLVED CODE_FIX    
Severity: high CC: alex.van.denzel, bugzilla, hughsient, jan.skowron, ldm
Priority: P1    
Hardware: All   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/399911
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: Allow manipulating force_release bitmap via sysfs

Description JanS 2009-08-24 19:01:56 UTC
On many SAMSUNG laptops (X360, R518, R60, NC20, Q35, Q45, Q210, to mention a few) keyboard is malfunctioning. I does not sent key-release events for some Fn + XX keys.

Many individual patches for atkbd.c had been released (on kernel bugzilla and ubuntu launchpad) to fix this problem for some of these models. I think that there is a great need for one (good) patch in kernel for every new Samsung laptop, as it seems that more of them have this problem than not have.

This bug in Samsung hardware affects every linux distribution, only dedicated Win*ows drivers can deal with it.


Not every key has a problem. For eg. Fn + Right (volume up) seems not having it, but Fn + Up (brightness up) have.


More info can be found in bugs on Ubuntu and kernel bugzillas, for eg.:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/399911

You can find a duplicate bug for every model of Samsung laptop, as well as atkbd.c patches people use for every one of them, eg:
Bug 12021, Bug 12627, Bug 13076, etc.
as well as:
https://bugs.launchpad.net/bugs/347623
https://bugs.launchpad.net/bugs/295251
https://bugs.launchpad.net/bugs/360247
https://bugs.launchpad.net/bugs/399911
and many many more.



One very useful comment by Nathanael Schaeffer in Bug 12021 (http://bugzilla.kernel.org/show_bug.cgi?id=12021#c39) gave an idea of introducing "-force-up" option to "setkeycodes" which could give a possibility for dealing with such kind of problems without messing with kernel drivers, (which already is happening). 
With --force-up option one could configure it as HAL quirk for particular hardware and particular key.

What do you think about it?
Comment 1 Dmitry Torokhov 2009-09-01 07:05:58 UTC
Created attachment 22947 [details]
Allow manipulating force_release bitmap via sysfs

I think something like attached should work.
Comment 2 Dmitry Torokhov 2009-09-18 17:22:40 UTC
The code is in mainline, will be released in 2.6.32.
Comment 3 Dmitry Torokhov 2009-11-14 08:05:16 UTC
*** Bug 14590 has been marked as a duplicate of this bug. ***
Comment 4 Luca De Marchi 2010-05-14 21:27:38 UTC
I have a Samsung Q45 and I'm an Ubuntu user since Feisty Fawn.
I have read a lot about 'Fn keys' on Samsung laptops in bugzilla and also in bugs.launchpad.net.
This bug has been marked as fixed, but it is still present! (also in Lucid Lynx with kernel 2.6.32-22)

Anyway yesterday I have tried this solution http://www.voria.org/forum/viewtopic.php?f=3&t=296 and it works fine:
package 'samsung-backlight' enables brightness up/down
package 'samsung-tools' enables wireless on/off

It seems to be a DKMS (Dynamic Kernel Module Support),
it is possible to include this code directly in linux kernel source tree?
Comment 5 Dmitry Torokhov 2010-05-17 20:23:46 UTC
(In reply to comment #4)
> I have a Samsung Q45 and I'm an Ubuntu user since Feisty Fawn.
> I have read a lot about 'Fn keys' on Samsung laptops in bugzilla and also in
> bugs.launchpad.net.
> This bug has been marked as fixed, but it is still present! (also in Lucid
> Lynx
> with kernel 2.6.32-22)

You need to talk to your distribution to make sure that they apply force_release workaround upon booting the box.

> 
> Anyway yesterday I have tried this solution
> http://www.voria.org/forum/viewtopic.php?f=3&t=296 and it works fine:
> package 'samsung-backlight' enables brightness up/down
> package 'samsung-tools' enables wireless on/off
> 
> It seems to be a DKMS (Dynamic Kernel Module Support),
> it is possible to include this code directly in linux kernel source tree?

Including the quirk directly into the kernel is not desirable since it is not sustainable. Instead kernel provides a generic way of dealing with the problem.