Most recent kernel where this bug did not occur: don't know, but I can loog for a kernel version with intended operation if you need. Distribution: UHU-Linux dev Hardware Environment: Albacomp laptop Software Environment: UHU-Linux dev Problem Description: If I press a letter-button (or any normal button) for a moment, it will type one letter. If I press it for a long time it will type several letters. Now that is OK. The problem is if I press a multimedia button for a moment it won't have any effect. If I press it too long time it will launch the application several times (so I will have several instances of (say) Mozilla). So these buttons shouldn't have to repeat. Previously it worked correctly... Affected buttons are: 178,236 and scan code e001 And anyways volume up and volume down (174 and 176) is intended to repeat
Is this PS/2 keyboard? Are you using softrepeat option?
This is a laptop keyboard, identified by lshal as: udi = '/org/freedesktop/Hal/devices/pnp_PNP0303' info.udi = '/org/freedesktop/Hal/devices/pnp_PNP0303' (string) linux.subsystem = 'pnp' (string) linux.hotplug_type = 1 (0x1) (int) info.product = 'IBM Enhanced (101/102-key, PS/2 mouse support)' (string) pnp.description = 'IBM Enhanced (101/102-key, PS/2 mouse support)' (string) pnp.id = 'PNP0303' (string) info.linux.driver = 'i8042 kbd' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) info.bus = 'pnp' (string) linux.sysfs_path_device = '/sys/devices/pnp0/00:07' (string) linux.sysfs_path = '/sys/devices/pnp0/00:07' (string) I don't know if I am using softrepeat, I didn't enabled it explicitly. How can I check if it is enabled?
What does "cat /sys/bus/serio/devices/serioX/softrepeat" show, where serioX is serio port your keyboard is attached to?
I just guess only this is my keyboard: root:/sys/bus/serio/devices/serio4# cat driver atkbd root:/sys/bus/serio/devices/serio4# cat softrepeat 0
Ok, so you are using hardware repeat. Now, if you do: echo 1 > /sys/modules/i8042/parameters/debug then press and hold your multimedia button (while in console) echo 0 > /sys/modules/i8042/parameters/debug and then look in your dmesg - do you see that keyboard generates repeat keypresses for the key?
It generates 3 dmesg/syslog messages no matter how long I press the button: Dec 30 13:57:45 localhost kernel: [ 227.398980] drivers/input/serio/i8042.c: 6c <- i8042 (interrupt, KBD, 1) [103207] Dec 30 13:57:58 localhost kernel: [ 233.170336] drivers/input/serio/i8042.c: e0 <- i8042 (interrupt, KBD, 1) [106457] Dec 30 13:57:58 localhost kernel: [ 233.172610] drivers/input/serio/i8042.c: ec <- i8042 (interrupt, KBD, 1) [106458] the first one arrives when key is pressed, the other two is reported when I release the key.
The keyboard doesn't generate autorepeat scancodes by design. The only way around it is to enable softrepeat by setting atkbd.softrepeat=1.
Oops, sorry, I just noticed you wanted the opposite. Please disregard my previous comment. Now, in Linux, currently, there is no way to specify repeat behavior on a per-key basis. It's either all keys or no keys on a device, in this case your internal keyboard. As a result of that, it is normal that the keys do autorepeat, and the application launching software should be able to detect a repeat event from a normal keypress event and not lauch the application in that case. What looks like a bug, however, is that you get no action on a short keypress. What does 'xev' say in such case?
xev reports several keypress events. But when using Kernel 2.6.9 it only reports one key pressed event, and one key released. I don't know how it worked, but (at least for me) that was the intended behaviour.
Vojtech, From the raw i8042 data that Imre provided it looks like the hardware does not do autorepeat but atkbd does. Unfortunately my laptop autorepeats everything.
Can I help with more details? What should I check?
Hmm, could you please do another test - while in text console (not X) start "showkey" utility and verify that you see autorepeats when pressing your multimedia keys. That will prove whether it is kernel generating autorepeat events or not.
I tested all three affected multimedia keys. Only one press and one release is reported no matter how long I press the button. kb mode was UNICODE [ if you are trying this under X, it might not work since the X server is also reading /dev/console ] press any key (program terminates 10s after last keypress)... keycode 28 release keycode 155 press keycode 155 release keycode 150 press keycode 150 release keycode 160 press keycode 160 release
Ok, then it is not a kernel but rather userspace issue. You have just proven that kernel does not auto-repeat those multi-media keys. Have you upgraded X recently?
I upgraded X several times :) Anyways, thanks for supporting me.
Please try logging a bug against X (X.org I presume?) I am rejecting the bug here.