Skip to contentSkip to conversation

Bug#561711: udev: Samsung R70/R71 keymap

PATCH Applied Marco d'Itri 3 participants 6 messages Dec 19, 2009 – Jan 5, 2010

lore
Share & tools
lore
#0 lore raw

----- Forwarded message from Clemens Buchacher <[email protected]> -----

Subject: Bug#561711: udev: Samsung R70/R71 keymap
Reply-To: Clemens Buchacher <[email protected]>, [email protected]
From: Clemens Buchacher <[email protected]>

Package: udev
Version: 149-1
Severity: normal
Tags: patch

Subject: [PATCH] add Samsung R70/R71 keymap

Required for the keyboard driver to recognize special keys such as Fn+F2 (battery), Fn+F3 (euro), Fn+F4 (switchmode), Fn+F6 (mute), Fn+F7 (XF86Launch2), Fn+up/down (brightness), Fn+left/right (volume). Fn+F5 (blank screen) and Fn+F8 still do not generate events after this change, howver.

---
 extras/keymap/95-keymap.rules |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
extras/keymap/95-keymap.rules +1 -1
index 0fdb061..aca74da 100644
@@ -95,7 +95,7 @@ ENV{DMI_VENDOR}="INVENTEC", ATTR{[dmi/id]product_name}="SYMPHONY 6.0/7.0", RUN
 
 ENV{DMI_VENDOR}="MAXDATA", ATTR{[dmi/id]product_name}="Pro 7000*", RUN+="keymap $name maxdata-pro_7000"
 
-ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="*NC10*|*NC20*|*SP55S*|*SQ45S70S*|*SX60P*|*SX22S*|*SX30S*|*R59P/R60P/R61P*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other"
+ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="*NC10*|*NC20*|*SP55S*|*SQ45S70S*|*SX60P*|*SX22S*|*SX30S*|*R59P/R60P/R61P*|*SR70S/SR71S*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other"
 ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="*SX20S*", RUN+="keymap $name samsung-sx20s"
 ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="SQ1US", RUN+="keymap $name samsung-sq1us"
 
Signature · 8 lines
1.6.5.2.372.gc0502


----- End forwarded message -----

-- 
ciao,
Marco
Applied
#1 lore raw

Hello Marco,

Marco d'Itri [2009-12-19 20:53 +0100]:

Quoted 2 lines

Subject: Bug#561711: udev: Samsung R70/R71 keymap
From: Clemens Buchacher <[email protected]>

Applied, thanks!

Quoted 2 lines

Fn+F5 (blank screen) and Fn+F8 still do not generate events after this change, howver.

Seems worth exercising README.keymap.txt for those two then?

Martin

Signature · 2 lines
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
#2 lore raw
In reply to Marco d'Itri

Hi,

Please add me to Cc. I did not receive any notification about my bug report and I'm responding now only because I found this in the list archives by accident.

Quoted 4 lines · Martin Pitt
Quoted 2 lines

Fn+F5 (blank screen) and Fn+F8 still do not generate events after this change, howver.

Seems worth exercising README.keymap.txt for those two then?

/lib/udev/keymap correctly reported the keypress events, but xev did not. echo 166-245 > /sys/devices/platform/i8042/serio0/force_release finally fixed the problem. Is there any way to diagnose this issue without trial and error? Maybe we should include a hint in README.keymap.txt.

It was a real pain to debug this, especially since I didn't even know where to look, and google returns tons of misleading bug reports concering hal. I'm afraid README.keymap.txt is the last place that people find. I have no idea what to do about it though.

I suppose something like the following patch should fix the problem permanently. Unfortunately, I was unable to test this, because the debian package would not build with the new source code (rejected patches and other issues), and after installing udev from git the kernel hangs at boot, without leaving any traces in syslog.

Cheers,
Clemens

--o<--
Subject: [PATCH] keymap: add Samsung R70/R71 force-release rule

---
 extras/keymap/95-keyboard-force-release.rules |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
extras/keymap/95-keyboard-force-release.rules +1 -1
index 4d0a877..25bced6 100644
@@ -19,6 +19,6 @@ DRIVER!="atkbd", GOTO="force_release_end"
 ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}"
 
 
-ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="*N130*", RUN+="keyboard-force-release.sh $devpath samsung-other"
+ENV{DMI_VENDOR}="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}="*N130*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other"
 
 LABEL="force_release_end"
Signature · 1 line
1.6.6.274.gdcca7
#3 lore raw
In reply to Marco d'Itri

Hello Clemens,

Clemens Buchacher [2010-01-04 17:18 +0100]:

Quoted 4 lines

/lib/udev/keymap correctly reported the keypress events, but xev did not. echo 166-245 > /sys/devices/platform/i8042/serio0/force_release finally fixed the problem. Is there any way to diagnose this issue without trial and error?

I'm not aware of one. However, on the Samsung NC10 where I tried this once it helped to switch back and forth to a VT to unbreak X.org and the stuck key.

Quoted 1 line

Maybe we should include a hint in README.keymap.txt.

Indeed, I added a note about force-release there now.

Quoted 4 lines

It was a real pain to debug this, especially since I didn't even know where to look, and google returns tons of misleading bug reports concering hal. I'm afraid README.keymap.txt is the last place that people find. I have no idea what to do about it though.

In Ubuntu bug reports we point people to exercise
https://wiki.ubuntu.com/Hotkeys/Troubleshooting, which also points to that README (if the problem is a missing keymap or force-release quirk). I guess other distros need to do/are doing something similar.

Review

Quoted 5 lines

I suppose something like the following patch should fix the problem permanently.

(quoted diff) +1 -1
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*", RUN+="keyboard-force-release.sh $devpath samsung-other"
+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*SR70S/SR71S*", RUN+="keyboard-force-release.sh $devpath samsung-other"

This would be equivalent to doing

echo 130,131,132,134,136,137,179,247,249 > /sys/devices/platform/i8042/serio0/force_release

(which is different to what you wrote originally). Does that work for you for all keys? If not, we need a new force-release map for your model.

Thanks,

Martin

Signature · 2 lines
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
#4 lore raw
In reply to Marco d'Itri

Hi Martin,

Quoted 6 lines · Martin Pitt

This would be equivalent to doing

echo 130,131,132,134,136,137,179,247,249 > /sys/devices/platform/i8042/serio0/force_release

(which is different to what you wrote originally). Does that work for you for all keys?

Good point. Yes, that fixes all keys.

Cheers,
Clemens

#5 lore raw
In reply to Marco d'Itri

Hello Clemens,

Clemens Buchacher [2010-01-05 16:51 +0100]:

Quoted 1 line

Good point. Yes, that fixes all keys.

Perfect, thanks for testing. I pushed your patch to udev.

Martin

Signature · 2 lines
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)