Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  David Rando 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. –  Simon McDougall 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). –  Simon McDougall 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

2 Answers 2

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.

share|improve this answer
    
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. –  Simon McDougall Jun 2 '11 at 12:17
    
I have experienced exactly the same... –  Johann Philipp Strathausen 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?

share|improve this answer

protected by Community Jul 21 '11 at 0:39

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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