xset -r causes loss of control of keyboard
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNOME Settings Daemon |
Unknown
|
Medium
|
|||
X.Org X server |
Fix Released
|
Medium
|
|||
gnome-settings-daemon (Ubuntu) |
Fix Released
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
Binary package hint: xorg
Using Ubuntu 9.04 64-Bit.
"xset -r" or "xset r off" (see man xset) is a command which is supposed to turn off the keyboard repeat. However, when I run this in Ubuntu 9.04 64-bit, it causes an endless stream of enter key inputs instead (as if you just held down the enter key). I've tried this on two different machines with the same results. Here are the steps to reproduce:
1) Open two terminal windows
2) In the first terminal window, enter "xset r" (no quotes) but don't hit the enter key yet. You'll need this command already typed in to gain control of the keyboard later when the X server goes into a loop of enter keys making typing of commands in the terminal at that point otherwise impossible.
3) In the second terminal window, enter "xset -r" (no quotes) and hit the enter key. Observe that instead of the repeat being turned off for the keyboard, a steady rapid stream of enter keypresses occur which makes typing into anything impossible because the enter keystrokes are interfering with whatever you are typing.
4) Now go back to the first terminal window and press enter to execute the command "xset r" which will turn the repeat back on. At this point, you should have regained control of keyboard input again.
affects: | xorg (Ubuntu) → xserver-xorg-input-evdev (Ubuntu) |
affects: | xserver-xorg-input-evdev (Ubuntu) → xorg-server (Ubuntu) |
Changed in xorg-server: | |
status: | Unknown → Confirmed |
Changed in gnome-settings-daemon: | |
status: | Unknown → New |
Changed in gnome-settings-daemon (Ubuntu): | |
assignee: | nobody → Ubuntu Desktop Bugs (desktop-bugs) |
importance: | Medium → Low |
status: | Confirmed → Triaged |
Changed in xorg-server: | |
status: | Confirmed → Fix Released |
Changed in xorg-server: | |
importance: | Unknown → Medium |
Changed in gnome-settings-daemon: | |
importance: | Unknown → Medium |
status: | New → Unknown |
Changed in xorg-server: | |
importance: | Medium → Unknown |
Changed in xorg-server: | |
importance: | Unknown → Medium |
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 .