Re: Udev loads wrong keymap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ajaxas,

ajaxas [2012-01-24 20:28 +0700]:
> At least a week earlier I had some of Sony Vaio Keys working: Volume
> control (Fn+F2: mute, Fn+F3: down, Fn+F4: up) and Brightness control
> (Fn+F5: down, Fn+F6: up). Other Vaio Keys (Fn+F1: touchpad switch,
> Fn+F7: switch video mode, Fn+F12: suspend) never worked.
> At some point (I think after updating to udev-177-1) Brightness
> control keys stopped working. Volume control keys still work.
> Brightness control still works directly via acpi.

Note that between udev 175 and 179 the Sony rules and keymaps did not
change at all. The only bug I am aware of is the one you already
pointed out in your forum post, and you said that the fix [1] did not
help.

> I blame it on udev, however, downgrading to udev-175 doesn't solve the
> problem.

OK, this is consistent with what you and I wrote above.

On your forum post you say that keymap -i actually shows the right key
codes (brightnessup/brightnessdown) when you press the corresponding
keys. Can you confirm that this is still true with the latest udev?
Once that's working, all the udev rules, keymaps, etc. have already
been exercised.

Could it be that you upgraded something else in e. g. GNOME which now
fails to act on the key events? You could try "xev" to see whether you
get proper X11 events for these keys, and try a fresh user account to
ensure it's not some changed configuration of your's.

> However, my Volume control keys seem to be mapped to input/event0
> (keyboard itself):
> 
> > [root@r2d2 ajaxas]# /lib/udev/keynap -i input/event0

Funny "keynap" typo :)

> > scan code: 0xA0   key code: mute
> > scan code: 0xAE   key code: volumedown
> > scan code: 0xB0   key code: volumeup

It's a bit unexpected indeed, I had expected these to also come out of
the "Sony Vaio Module"; does anythign happen on keymap -i input/event1
if you press these keys?

> and these scan codes correspond not to my keymap (0x06, 0x07, 0x08),
> but to /lib/udev/keymaps/force-release/common-volume-keys.

This is a sheer coincidence. common-volume-keys is not applied on
Sony, so that's not relevant here.

> If I change my keymap file (0x09 -> 0x10, 0x0A -> 0x11) and load
> keymap manually, nothing changes. And when I reboot with this changed
> keymap, udev reports this for my Brightness control keys:
> 
> > [root@r2d2 ajaxas]# /lib/udev/keymap -i input/event1
> > scan code: 0x10   key code: fn_f5
> > scan code: 0x11   key code: fn_f6

This just double-confirms that the current keymap is correct and gets
loaded properly.

> Again, nothing works, and keys are not reported as Brightness control
> keys anymore. Here's where I'm lost.

Reported to where? keymap -i certainly seems to get them correct. Are
they lost in xev?

Did you happen to upgrade X.org recently? 1.12 introduces a completely
new input stack, and some distros might already use that (I know
Ubuntu's X.org 1.11 packages have that backported for the multi-touch
stuff, for example).

Thanks,

Martin

[1] http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=e605cf7782fdf1dc2e13b95e906e731d61e6cf12

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux