Comment 15 for bug 627890

Revision history for this message
Mario (diraimondo) wrote :

I'm trying to use the procedure in README.keymap.txt.gz in order to fix the brightness keys (fn+f5 fn+f6) on my Sony Vaio Z21MN. They worked well in Lucid. Other special keys (mute, volume up, volume down,...) seem to work well.

$ /lib/udev/findkeyboards
AT keyboard: input/event2
module: input/event6

$ sudo /lib/udev/keymap input/eventX > /tmp/orig-map.txt

$ sudo /lib/udev/keymap -i input/event6
Press ESC to finish
scan code: 0x00 key code: fn_f5
scan code: 0x10 key code: fn_f6

$ cat /sys/class/dmi/id/sys_vendor
Sony Corporation
$ cat /sys/class/dmi/id/product_name
VGN-Z21MN_B

$ udevadm info --export-db > /tmp/udev-db.txt

I've also tryed to create a keymap:
$ cat /lib/udev/keymaps/module-sony-vaioz
0x00 brightnessdown # Fn+F5
0x10 brightnessup # Fn+F6
$ cat /lib/udev/rules.d/95-keymap.rules
......
LABEL="keyboard_modulecheck"

ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}"
ENV{DMI_VENDOR}=="", GOTO="keyboard_end"

# Sony Vaio Z attempted fix
ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*VGN-Z21*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-vaioz"

ENV{DMI_VENDOR}=="IBM*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-ibm"
ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-lenovo"
ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="Lenovo ThinkPad SL Series extra buttons", RUN+="keymap $name 0x0E bluetooth"
ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony"

# Older Vaios have some different keys
ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
...........

It seems that the new local keymap is not loaded: the output of 'sudo /lib/udev/keymap input/event6' is unchanged and the keys continue to not work.

I'm available to test experimental changes.