Bug 21454 - After issuing 'xset r off' the Enter key starts repeating, difficult to stop
Summary: After issuing 'xset r off' the Enter key starts repeating, difficult to stop
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Keyboard (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-28 00:29 UTC by Xavier Aragon
Modified: 2010-03-10 17:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Aragon 2009-04-28 00:29:56 UTC
After upgrading from Ubuntu 8.10 to 9.04, i.e from Xorg server version 1.5.2 to 1.6.0, I started having problems with 'stuck keys'. I mean a key stuck in autorepeat mode as if the key was being pressed constantly, even if it was released normally. This happened randomly with different applications and different keys, but most often when entering VMWare remote consoles.

When I tried to set autorepeat off, I noticed that in fact the problem is triggered by the command 

  $ xset r off

When the command is typed (e.g. in a gnome-terminal or xterm) and Enter pressed, the Enter key starts repeating. A different variation is 

  $ read; xset r off

When this command is typed, Enter pressed and then Ctrl-D pressed (to terminate the read), the 'd' key starts repeating. However, if I do 

  $ sleep 1; xset r off

no key starts repeating. So it seems that when the autorepeat function is turned off, the last key pressed starts repeating if it was pressed within a sufficiently short interval before turning autorepeat off.

My normal autorepeat setting is delay 500, rate 30. When a key gets stuck and starts repeating, the way I can recover is to set a slow autorepeat rate, typcially I use 'xset r rate 500 3'. Then the next key press stops the repeating. Doing 'xset r off' does not help.

I reported this problem yesterday in Ubuntu's bug tracker under issue #124406, which has a long comment history of possibly related problems with stuck keys. See https://bugs.launchpad.net/ubuntu/jaunty/+source/linux/+bug/124406/comments/235 .
Comment 1 Karl Runge 2009-05-06 13:40:34 UTC
See also the discussion at:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/367136
Comment 2 Tim Mann 2009-06-13 22:34:06 UTC
xtrs (http://tim-mann.org/xtrs.html) is being victimized by this bug too.  xtrs does not want X key repeat, so when the mouse enters the xtrs window, xtrs remembers the current state of key repeat and turns it off.  It then restores the previous key repeat state when the mouse leaves the window or you exit from xtrs.  I've gotten various keys to repeat infinitely when typing and moving the mouse in and out of the xtrs window.

I notice in the Ubuntu discussion that x11vnc and VMware Workstation are also affected, probably for the same reason -- they don't want X key repeat and thus turn it off automatically at certain times.
Comment 3 Oxmosys 2009-06-28 23:30:48 UTC
According to comment in ubuntu bug report : https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/367136

This problem is only reproducible with gnome-settings-daemon, therefore maybe not a Xorg issue. The upstream bug is there :
http://bugzilla.gnome.org/show_bug.cgi?id=587229

Can a Xorg developer confirm this?
Comment 4 Oxmosys 2009-09-11 12:07:08 UTC
It really is a xserver-xorg bug, as updating xorg from 1.5.2 to 1.6.0 in ubuntu intrepid makes the bug appear (under GNOME only with gnome-settings-demon enabled and with his a11y-keyboard plugin enabled)
Comment 5 Oxmosys 2010-02-18 12:22:15 UTC
The bug is gone in Ubuntu 10.04 alpha 2 with these packages :

xserver-xorg-core 2:1.7.3.902-1ubuntu5
gnome-settings-daemon 2.28.1-1ubuntu2

Therefore it seems to be fixed.
Comment 6 Peter Hutterer 2010-03-10 17:44:48 UTC
i can reproduce the bug in F-11 (with server 1.6) but not in F-12 (server 1.7). XKB had a pretty massive cleanup between the two and finding the exact fix is tricky (bfb219f532f3c78ba905424365ee7c5f7b5f21a2 might be it though). Backporting the fix is probably quite time-consuming so unless someone volunteers to do so for the 1.6 branch, this one is unlikely to get fixed in 1.6.


I'm closing this bug as FIXED, since 1.7 and git don't suffer from this problem.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.