10

I was using Kubuntu 19.10, then switched to Ubuntu 20.04, and everything was fine. Then a situation appeared, and I had to reinstall Ubuntu in UEFI mode instead of BIOS mode. Now both mouse pointer and keyboard lag, and it's not just graphical: moving and resizing windows also lags, some letters written on the keyboard are lost. The issue is not present in the Live CD, which is super weird.

I have tried multiple things: made sure that zoom and slow keys are disabled, checked and updated drivers, nothing of it works. The only thing is that mouse and keyboard lag when they are plugged into back panel (which is I guess directly to the motherboard), when I plug those into the front panel they work perfectly.

The issue is also present in both Xorg and Wayland sessions and in the login screen, but is not present in UEFI settings menu.

Is there anything else to solve my problem?

2
  • I'm experiencing similar issues on 20.04 LTS. I have a hunch that it's USB/USB3 related, but couldn't get to the root of it yet. Please update this thread if you have resolved the issue in the meantime. Also see here: askubuntu.com/questions/1029256/…
    – Jan Groth
    Commented Jun 29, 2020 at 1:03
  • had the same issue, fixed by extension cable / hub so the dongle is not directly inserted into USB port
    – opengrid
    Commented Sep 19, 2022 at 15:00

5 Answers 5

9

I was having the same problem on Ubuntu 20.04 with both mouse and keyboard connected to the same wireless USB dongle. During each session, the lag would appear after a little while, barely noticable at first, but could extend to several seconds over time. I would describe that experience as "soul crushing" :)

I tried several solutions found here and there: nothing worked.

Turns out the solution was simply to use a USB 2.0 port instead of a USB 3.0 port.

3
  • thank you, worked great and had tried everything else.
    – Hi Lo
    Commented Oct 26, 2021 at 20:54
  • Wow, sometimes the simplicity of solution is really marvelous!!
    – Pankaj
    Commented Jun 1, 2022 at 23:47
  • OMG. I had an issue with whenever I inserted an SD card my mouse would get laggy. I switched my dongle to a 2.0 port and everything is great now.
    – slackwars
    Commented Jun 26, 2022 at 15:54
1

There's a vast array of problems that can cause these symptoms, and it's a pickle to understand. A good first step is checking /var/log/syslog for any unusual activity.

For me the problem were aggressive wifi-scans, about once every 1/10 sec, despite the computer being connected to a wired network. This caused the whole system to slow down, causing keyboard, mouse, audio and video lags. Deactivating wifi solved the problem.

I saw a post about QT triggering this sort of behaviour - maybe an app incorrectly polling to check for a network connection or trying to detect location. These days I'm using many Linux 'betas', for Zoom, Slack, Teams etc.

1
  • I read through the log and I found some suspicious stuff. I don't actually know if they may cause the problems: Jul 18 09:53:53 altered-pc gnome-shell[1427]: Could not create transient scope for PID 4275: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 4275 does not exist. Jul 18 09:53:53 altered-pc gnome-shell[1427]: Could not create transient scope for PID 4281: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 4281 does not exist. But no actual spamming messages exist.
    – alt3r3d
    Commented Jul 18, 2020 at 4:58
1

I was able to resolve the lagging issue by changing the USB Dongle to a different USB Port and also, in Ubuntu 21.04, I navigated to

Settings -> Power-> Performance Mode (Selected)

and it worked for me.

check the settings from this picture

1
  • This worked for me in ThinkStation P7 and Ubuntu 22.04
    – Mona Jalal
    Commented Jan 2 at 14:10
1

My workaround was to comment this line:

modifier_map Mod3 {Scroll_Lock};

like this:

#modifier_map Mod3 {Scroll_Lock};

in this file:

sudo nano /usr/share/X11/xkb/symbols/br

also, install xserver-xorg-input-evdev and remove xserver-xorg-input-libinput:

sudo apt install xserver-xorg-input-evdev
sudo apt remove xserver-xorg-input-libinput

Then reboot the machine.

2
  • The file modification is relevant it would seem to br country code only. However, the install/remove may have helped a bit. Thank you. Commented Nov 6, 2022 at 23:29
  • My razer mouse suffers from excessive pointer_motion (libinput) even idle (high dpi set) and i monitored it with command sudo libinput debug-events So, i installed evdev, removed libinput and also, create a udev rule to ignore any libinput matchdevice event, like this: /etc/udev/rules.d/99-libinput-ignore.rules content: ACTION=="add|change", KERNEL=="event*", ENV{LIBINPUT_IGNORE_DEVICE}="1" save and reboot (remember to install evdev package before) Even removing xserver-xorg-input-libinput, libinput will still stay present on the system (ubuntu 22.04) Commented Nov 25, 2022 at 1:43
0

I have had the same issue (internet search brought me here) - and I just noticed that when I closed the laptop lid, it automatically switched the refresh rate to 24 Hz. When I changed Settings -> Displays -> Refresh Rate to 60Hz, the mouse lag disappeared.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .