Comment 235 for bug 124406

Revision history for this message
Xavier Aragon (xarax-lp) wrote : Re: Keyboard keys get stuck and repeat (Feisty, Gutsy)

I upgraded two machines from Intrepid to Jaunty and started having this problem of stuck keys. It never occurred before the upgrade, and as the two machines have very different hardware, I would imagine the problem is not hardware dependent.

I have two ways of reproducing the problem:

1) In a gnome terminal say 'xset r off' to turn off autorepeat (assuming it was on initially), and I have the enter key stuck (repeating as if it was being pressed). Hitting enter again does not stop the repeating.

2) When running a VMWare virtual machine in a vmware remote console window, hit the title bar of the window to give it focus, then press Ctrl-G to enter the virtual machine. The key 'g' starts repeating like if it was being pressed down constantly. I don't know exactly what the vmware console does when activated, at least it grabs the keyboard and mouse, perhaps it does something to autorepeat settings as well.

The way I can recover from the "stuck key" condition is to somehow issue the command "xset r rate 500 3" or something similar with a very slow repeat rate (3 times a second in this example), and then hit any key. Turning autorepeat off with 'xset r off' does not help, but a slow repeat rate does. In my case 1 I can issue the command from a virtual console by first ntering it with Ctrl-Alt-F1, but in case 2 the vmware remote console has grabbed the keyboard and the only way to recover is to log in with ssh from another machine to issue the command.

To me the problem seems very closely related to the Xserver's key autorepeat functionality. It used to work before upgrading to Jaunty, but now it is seems broken. It key getting stuck is the one that was last pressed when some autorepeat related operation is made (in the first example turning autorepeat off, in the second example perhaps grabbing the keyboard or doing something with autorepeat settings).