On two of my computers running Natty with Gnome 3, I'm having periodic keyboard lag. It happens at a random interval after starting the computer. Basically, the keyboard will stop functioning normally and only register input if you hold a key down for two or more seconds. When you release the key, it stops right away like it should.

The only fix I've found so far is to restart the computer. One computer only experiences this about once a day, and it's not a big deal to restart it. The other computer does it quite frequently, sometimes even within the first few minutes after booting. Last night I had to restart that computer probably five or six times over the course of a few hours.

This started happening about a week ago, and I haven't been able to pinpoint a cause.

Does someone know how to permanently fix this problem?

  • same issue on my netbook. 11.04 & gnome shell. it doesn't affect the ttys, only X.
    – user17305
    May 11 '11 at 13:34
  • Could you see if, when you get the issue, the cpu usage? Maybe there's a process taking the 100% of your CPU and you notice it when you're writting. May 11 '11 at 22:40
  • Nope, it's not from cpu usage. Nothing above average going on when it happens. Next time it does happen, I'm going to check and see if restarting X11 will fix the problem rather than a complete system restart. Might help narrow the problem down. May 13 '11 at 0:03
  • I can now confirm that restarting X11 (sudo killall Xorg) will temporarily fix the problem (at the expense of your current X session of course). Maybe this indicates that the problem is something within XWindows (as opposed to a more low-level kernel or device problem). May 17 '11 at 16:55
  • Could you check the X logs (.xsession-errors in your home directory and /var/log/Xorg.0.log) and see if there's anything that appears just as your keyboard starts getting laggy? I'd also check /var/log/syslog just to be sure. Maybe the faults can be correlated with a message in the logs which would help pinpoint the cause of the problem.
    – roadmr
    Nov 2 '11 at 18:27

I had the same problem with my Lenovo x61 laptop running xubuntu 11.04. After some experimentation I found that this only occurs when using xterm. Try using a different terminal like gnome-terminal or xfce4-terminal.

A good way to test for this problem is to hold down a key in the the terminal (e.g. "aaaaa" ...). After a short while it was evident that xterm was locking up where other terminals were not.

Thanks to Oil for unlocking this question so that I could post my answer for you.

Another user: I had the same problem and finally figured out the root cause. Go to System Configurations -> Universal Access -> Typing, and turn off the Bounce Keys.

  • 1
    Thanks, but this doesn't seem related to the same problem. I don't use xterm at all, nor did I mention xterm in the question. As far as being caused by apps, the problem only seems to happen once in a while on my main computer, and (to the best of my knowledge) only happens while World of Warcraft is running in wine. The same problem however effects my other computer more often and at more trivial times, such as browsing the web, or sometimes simply right after login. Also, the problem I experience effects the entire desktop, not just one app. Even if all apps are closed, it continues. Jun 2 '11 at 12:17
  • I have experienced exactly the same... May 4 '12 at 9:07
  • I am confirming this behaviour on my Ubuntu 13.04 too. Since few days, the keyboard is introducing random delays and lags. Currently, the only way to restore a good keyboard typing is to killall Xorg, but it's annoying. No relevant errors in Xorg.log.
    – Fabio
    Dec 11 '13 at 15:54

I figured out that using a different window manager helped. Try xfwm4 --replace - do you still experience this?

Not the answer you're looking for? Browse other questions tagged or ask your own question.