I recently switched to Ubuntu 18.04 and since then I have a lot of keyboard input lag, sometimes multiple seconds. I can type the words but it takes some time until they show on the screen.

I previously used Ubuntu 16.04 without any issues.

This error occurs in Terminal but also in my web browser.

Any idea where I could start debugging this problem?


So i tried the below suggested answers, thx for that. But still no solution. What I figured out is that this also may trigger by some keys more than ohters ... for example when im typing cdcdcdcd it appears really a lot.....

Also maybe important to know I use a different keyboard layout which I set with

setxkbmap de neo  # (german neo layout) ( so cd is rl on asdf)

Altough this doesn't make a difference for the lag


Apparently this issues is only happening on the gnome/budgie desktop


Since I didn't found any solution to this problem, I figured out its time to move on ... anyway I switched to Manjaro now and have to say I am quiet satisfied no issues so far and a very clean and performant system.

However I would keep this questions open since some people still experience the same issue.. I hope you find a solution


  • 1
    I had a similar experience with USB keyboard. Switching back to Unity helped. If that is an option, there is a guide linuxconfig.org/… – logcat May 14 '18 at 19:01
  • I have to say im really not a big fan of unity :( – jrsm May 16 '18 at 19:31
  • 1
    I think I have the same issue. Some observations: 1) If I drop to a non-graphical shell, there's no problem. 2) In Gnome: It's not just the keyboard input that's freezing, but most of the UI. I've enabled seconds in my clock and they also freeze for a while after multiple keypresses. But the mouse pointer is still moving around if I move the mouse. 3) This is not an issue with all keyboards. My old Logitech keyboard with the Unifying Receiver works fine. 4) The affected keyboard works fine with Windows and MacOS on other computers. 5) Nothing of significance in my syslog. – decibyte Jun 19 '18 at 14:25
  • 2
    Okay, a few more observations: If I connect 2 Logitech keyboards and type on them at the same time, I experience the same issue. This might sound like an unusual use case, but my usual keyboard is an ergonomic R-Go Split Keyboard -- an abnormality which is technically two separate keyboards (each with only half they keys of a normal keyboard). A combination of one half and a Logitech keyboard gives the same result. Along with my above observations: Does that give anyone any idea about what's going on? Especially with that fact that it only occurs (for me) in Gnome(3). – decibyte Jun 19 '18 at 14:47
  • 1
    I don't know if you also happen to be in a dual keyboard typing situation like me. But for the record, I've opened a bug with my own observations: bugs.launchpad.net/ubuntu/+bug/1777708 – decibyte Jun 19 '18 at 18:57

Maybe you could try your system log. I have noticed the following error on my system (multiple times):

xhci_hcd 0000:3a:00.0: xHCI host controller not responding, assume dead

This seems to be a USB3 problem. My keyboard and touch-pad on my laptop do not have this problem. My USB connected mouse also lags.

When I load Ubuntu 18.04 with the previous and still available kernel on my system as used in 17.10, kernel version 4.13.0-39-generic, I do not get the XHCI errors. Also, my keyboard and mouse do not lag anymore.

I am able to select this kernel via the GRUB menu in my setup.

Remark I have not figured it out completely yet. The older kernel appears to work better but the lag is there every now and again. I can make some remarks when using the default kernel: A continuous key press (just holding a letter or character) is doing fine. It just outputs the letter or character constantly without jitter. Also, just entering letters are fine. Where I think it is going wrong with my setup are special characters like (Commas, periods, colons, semicolons, etc.). As soon as those are introduced to the input it stars going wrong. Initially I thought this might be caused by dead keys but switching those off do not make a difference. Can you confirm this behavior? Also, slow keys do not solve it on my setup.

Update This morning I got an update which seems to solve the keyboard problem on my site. From my update log: Commandline:

$ aptdaemon role='role-commit-packages' sender=':1.147'
Upgrade: intel-microcode:amd64 (3.20180312.0~ubuntu18.04.13.20180425.1~ubuntu0.18.04.1)

This is the only update for 18.04 I got so far. This probably also solved the slow boot times on my Laptop. It's now seconds in stead of a minute. I will send a confirmation later this week.

  • xhci loos good on my sys log hower I get often something like 1 18:19:54 ryzen gnome-software[2177]: json_object_has_member: assertion 'member_name != NULL' failed May 1 18:19:54 ryzen gnome-software[2177]: g_strsplit: assertion 'string != NULL' failed May 1 18:19:54 ryzen gnome-software[2177]: g_strv_length: assertion 'str_array != NULL' failed May 1 18:19:54 ryzen gnome-software[2177]: json_object_has_member: assertion 'member_name != NULL' failed May 1 18:19:54 ryzen gnome-software[2177]: g_strsplit: assertion 'string != NULL' failed – jrsm May 1 '18 at 16:24
  • I have not figured it out completely yet. The older kernel appears to work better but the lag is there every now and again. I can make some remarks: – André Klaver May 3 '18 at 8:47
  • I'd be curious to know more about this issue you had. Did you ever file a bug report? If this is a real bug, it's going to affect a lot of people, as more and more users are moving to 18.04 & also more and more machines are using USB 3.0 – Hee Jin May 4 '18 at 18:02

This may be the slow keys feature

It is toggled on and off by holding down the shift key for 8 seconds

Press the shift key for 8 seconds and see if the problem goes away

  • 1
    Might be good to note that in order for this feature to be toggled on/off using the shift key, the user has to first change their system settings to enable the shortcut. See Ubuntu Help: Turn On Slow Keys – Hee Jin May 1 '18 at 16:37
  • Except that it appears to be enabled by default :/ I never enabled it and this solved my problem – Jim Anthony May 1 '18 at 16:51
  • Oh weird! It wasn't enabled by default on my system, but actually I was going to phrase my comment to include for the fact that it's possible that it might be for some users, because it totally seemed possible to me. Anyway hopefully this fixes it for the question-asker! – Hee Jin May 1 '18 at 22:36
  • This does nothing at all. – Luís de Sousa Aug 21 '18 at 15:25
  • 2
    After debugging deeper into this issue I can verify that the laggy keyboard input is not caused by slowkeys! I have disabled and validated slowkeys behavior in Ubuntu 18.04.1 and I have seen the lag issue when this has been disabled. When I enable slowkeys, it takes a long time to type a letter, and the delay is constant. When the laggy keys issue is happening, the delay is variable and sometimes a character becomes repeated many times because I've been trying to press a couple times without it registering in a timely manner. – TrinitronX Dec 8 '18 at 3:44

It isn't the keyboard. It isn't the window compositor. The problem with lagging is the sequence of events that occur within the gui controls of any given program. one thing they all have in common besides keyboard input and displayed text is accessibility options like orca screen reader that cause the gui to have to do more work between screen updates. it's just like with 3d video rendering where too many computations drop your frame rate down until it behaves like a series of stills with no continuity.

kill the calculations and you you kill the lag.

I stopped my lag problem by killing the orca process and then going to [start-up programs]. once there, I removed orca from the start-up list along with other programs that I didn't want at start-up. I also unchecked the box to stop remembering running programs at shut-down.

no more lag on keyboard input, even in Firefox


I had this happen on my main laptop computer when playing Terraria, when playing on my "new desktop" with such amazing parts as ddr2 ram and a dual core e8600 and USB 2.0, I had no latency, I could not even see any input lag when comparing a low end wireless keyboard to a ps2 mechanical keyboard. A computer restart and plugging it in helped. For me I think it was because the system's battery was low and it wasn't plugged in.

  • I'm seeing the issue on a desktop HTPC system with Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz that has 8 cores! It also has a RAID6 with 5 disks, with 8GiB of RAM (DIMM DDR4 Synchronous 2133 MHz (0.5 ns)). So the issue is definitely not related to hardware! It seems more likely that it is software related based on my experience. – TrinitronX Dec 8 '18 at 3:51

I had the same issue with my favorite keyboard. All my other keyboards where working fine.

I solved the problem by switching to wayland.

You can do this with the gear button next to the sign in button at the login screen.


If you're playing games or of the gaming sort, the communication app Discord was grabbing too much of my video card and causing hiccups. Try disabling "Hardware Acceleration" in it's setting. Did wonders for me. No more keyboard lag in games or while typing.

Apparently it's a little buggy. From the horses mouth: https://twitter.com/discordapp/status/924910040552747008?lang=en

Other's having the issue: https://www.reddit.com/r/PUBATTLEGROUNDS/comments/6ibgj3/psa_turn_off_hardware_acceleration_in_discord/


I have had feature Slow Keys on, the feature which puts a delay between when a key is pressed and when it is accepted. Its behave looks exactly as you describe above.

To deactivate Slow Keys open Settings, choose Universal Access, then choose Typing Assist (AccessX) and turn it off.

protected by Community Jul 12 at 12:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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.