[Bug 939868] Re: Sony VPCEL2S1E, some hotkeys not working
Thomas B Homburg
thomas at homburg.dk
Wed Aug 8 19:40:02 UTC 2012
Hello
The file /usr/share/doc/udev/README.keymap.txt.gz describe steps to find the udev key mapping for your device. And if you find the correct keymap, the file also details how you can submit your keymap to the udev developers and fix the keyboard for all matching laptops in the future.
I don't have the exact same Sony VPC model (VPCCB4C5E) as the others
mentioned in this bug.
Steps to fix keymap (that I used)
1. Find keyboard input device:
$ /lib/udev/findkeyboards
----
AT keyboard: input/event2
module: input/event3
----
The keys you are fixing might be from either of the devices, so you
should do the following steps for each device.
2. Find scan codes:
$ /lib/udev/keymap -i input/event3 # And press the key(-combo) you are fixing, I pressed fn+f1
---
Press ESC to finish, or Control-C if this device is not your primary keyboard
scan code: 0x0C key code: f21
---
The scan code here (0x0C) is wrong! (At least on my system). You have to substract 7 from the code
to get the usable value (for the keymap): 0x0C - 7 = 0x05
3. Find the key code:
/usr/include/linux/input.h
Search for the constants: "KEY_" and convert the rest to lowercase:
KEY_F21 > f21
KEY_BRIGHTNESSDOWN > brightnessdown
Touchpad toggle: Do not use the KEY_touchpad_toggle. Instead use the f21 for toggling touchpad.
This took me a long time to figure out.
4. Construct the keymap: /etc/udev/keymaps/module-sony-vpc
Look at /lib/udev/keymaps/module-sony-vgn (or the attached module-sony-vpc) as an example.
The format is:
<scan code> <key code>
eg.
0x05 f21
0x0A brightnessdown
5. Build the udev rule. The udev rule matches the laptop and execute the keymap on boot. My attached rule: sony-vpc.conf
should match all Sony VPC laptops: The "VPC*" pattern should match /sys/devices/virtual/dmi/id/product_name
6. The result should be:
/etc/udev/keymaps/module-sony-vpc
/etc/udev/rules.d/sony-vpc.rules
** Attachment added: "sony vpccb... keymap"
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/939868/+attachment/3253278/+files/module-sony-vpc
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/939868
Title:
Sony VPCEL2S1E, some hotkeys not working
Status in “udev” package in Ubuntu:
Confirmed
Bug description:
Trying with Ubuntu Daily 12.04 (20/2/2012),
Hotkey Fn+F1 (disable touchpad): Not working
Hotkey Fn+F2 (mute/unmute sound): Working
Hotkey Fn+F3/F4 (audio lower/higher): Working
Hotkey Fn+F5/F6 (brightness lower/higher): works, but also invokes the "enable/disable external monitor" (also changes resolution?)
Hotkey Fn+F7 (enable/disable external monitor): works but also appears to change resolution (using with HDMI)
Hotkey Fn+F12 (hibernate): Works fine (with open-source graphics driver, hangs if FGLRX is used)
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: udev 175-0ubuntu5
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.92-0ubuntu1
Architecture: amd64
Date: Fri Feb 24 00:07:41 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120220)
MachineType: Sony Corporation VPCEL2S1E
ProcEnviron:
TERM=xterm
PATH=(custom, no username)
LANG=el_GR.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-generic root=UUID=d729a379-b421-4cd5-80fc-a68a8d0678a3 ro quiet splash vt.handoff=7
SourcePackage: udev
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/13/2011
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: R0160E3
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnInsydeCorp.:bvrR0160E3:bd06/13/2011:svnSonyCorporation:pnVPCEL2S1E:pvrC90294ZC:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VPCEL2S1E
dmi.product.version: C90294ZC
dmi.sys.vendor: Sony Corporation
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/939868/+subscriptions
More information about the foundations-bugs
mailing list