Bug 498018

Summary: MSI PR200: brightness keys go haywire when defined as a hal quirk
Product: [openSUSE] openSUSE 11.2 Reporter: Jan Matejek <jmatejek>
Component: X.OrgAssignee: Forgotten User Wum0mkMcd8 <forgotten_Wum0mkMcd8>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium CC: sndirsch
Version: Factory   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jan Matejek 2009-04-24 15:45:18 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.9.0.8) Gecko/2009032600 SUSE/3.0.8-1.3 Firefox/3.0.8

so.
there is no hal quirk configuration for my notebook - but all keys do what they're supposed to do, except that they also spam syslog with "unknown keycode" messages. i tried to fix that, using the guide from http://people.freedesktop.org/~hughsient/quirk/quirk-keymap-try.html

i added the following to the default 30-keymap-misc.fdi file :
        <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains="MSI Notebook PR200">
          <append key="input.keymap.data" type="strlist">e064:f22</append> <!-- Fn-F3   Touchpad disable -->
          <append key="input.keymap.data" type="strlist">e077:brightnessdown</append> <!-- Fn-F4   Brightness down -->
          <append key="input.keymap.data" type="strlist">e078:brightnessup</append> <!-- Fn-F5   Brightness up -->
            <!-- there are volume buttons, but they're mapped somewhere else, apparently. also the display toggle key -->
          <append key="input.keymap.data" type="strlist">e079:prog1</append> <!-- P1 - no defined purpose, custom button -->
          <append key="input.keymap.data" type="strlist">e06e:camera</append> <!-- P2 - webcam toggle -->
          <append key="input.keymap.data" type="strlist">e076:wlan</append> <!-- satellite dish 1 -->
          <append key="input.keymap.data" type="strlist">e062:bluetooth</append> <!-- satellite dish 2 -->
        </match>

when the changes took effect, everything still worked and syslog was no longer spammed.
however, after playing a bit with brightness keys, the backlight started blinking randomly, X's cpu usage went through the roof and X was no longer usable.
also, a whole new keycode appeared in syslog, many times over:

atkbd.c: Unknown key released (translated set 2, code 0xe0 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e060 <keycode>' to make it known.

i didn't press any keys and i don't know what this might be.
when i restarted X via double-ctrl-alt-bksp, another keycode appeared, but only once:
atkbd.c: Unknown key released (translated set 2, code 0x5b on isa0060/serio0).
atkbd.c: Use 'setkeycodes 5b <keycode>' to make it known.
(i'm not sure i can reproduce this one, though)

after some restarting hal and X processes from a remote session, the system was usable again.

Reproducible: Always




if you close this as invalid with "don't modify quirk confs", i'm just going to submit a new bug called "quirk conf missing for PR200", provide info and let somebody else hit the same bug again :P

also, it would be nice, once this is resolved, to merge the quirk conf and send it upstream

then again ... the system is usable without a quirk conf, all keys do what they're supposed to. it just makes reporting other bugs that much harder, because one has to filter out the keycode spam from syslogs first
Comment 1 Jan Matejek 2009-04-24 15:51:58 UTC
for convenience:
the mentioned system is a notebook with intel core2 (x86_64), gpu is intel x3100
suse version is latest factory as of now.
Comment 2 Stefan Dirsch 2009-09-30 15:56:46 UTC
Any chance to report this upstream on bugs.freedesktop.org since I consider this being an upstream bug? You'll need to register for an account on bugs.freedesktop.org first, in case you don't have one yet. Unfortunately bugs.freedesktop.org is down right now. :-(
Comment 3 Stefan Dirsch 2009-10-01 16:14:21 UTC
bugs.freedesktop.org is available again. :-)
Comment 4 Jan Matejek 2009-10-05 15:56:03 UTC
i'd be glad to report to upstream, but in all honesty, i don't know what the upstream is ;) i've been discussing this bug with ubuntu folks and found some more details, and it appears that it's somewhere between kernel and ... um ... something.

see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/178860 , relevant from comment 10 onwards

it appears that there are two independent bugs:
- hotkeys are not defined in udev keymap or wherever a given distro stores its hotkeys. that one is very easy to fix ;)
- when the hotkeys are registered, event propagation is broken (only visible result is breakage of g-p-m, but there might be other effects)

again, i'll be happy to take this upstream, just tell me what the upstream is and what should i tell them ;)
Comment 5 Stefan Dirsch 2009-10-05 16:42:55 UTC
I thought you considered that being a X.Org bug, since you've reported it against that component. :-)

You can still try to report it as X.Org bug upstream on bugs.freedesktop.org (product: xorg, component: Other; add peter.hutterer@who-t.net and daniel@fooishbar.org to Cc). You might be lucky and Peter or Daniel feel responsible. I believe it's worth a try.

Hope it's ok to close it as UPSTREAM here. I'm afraid I can't help here.