32

I experience mouse lag although the graphic card is recognized by the os. (I already had it on 15.10 and upgraded to 16.04). The mouse lag is not firefox or browser dependent. Is there anything I can do about it, without doing a clean install of my ubuntu system?

nuc@nuc:~$ sudo lshw -c video
[sudo] password for nuc: 
  *-display               
       description: VGA compatible controller
       product: Haswell-ULT Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:45 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64)
5
  • Is it alltime lag or just after mouse inactivity (like 1second to react)? I get it just after the upgrade 15.10->16.04
    – jaromrax
    May 4, 2016 at 7:28
  • Alltime, but it seems away now. Maybe they did solve it through an update.
    – empedokles
    May 4, 2016 at 9:31
  • 1
    Unfortunately my pleasure was premature. I experienced jittery motion again today.
    – empedokles
    May 4, 2016 at 22:11
  • 1
    it was away for me also ... until ... today. After every 5-7sec idle it stalls for a second. However - unplug mouse/plug helped...
    – jaromrax
    May 11, 2016 at 14:25
  • 1
    One possible cause of mouse lag is having more than one mouse plugged in at the same time. In my case it's a ps/2 and a usb, both optical.
    – Jason
    Jan 26, 2023 at 7:26

14 Answers 14

34

I found this solution! Credit goes to the original poster.

https://superuser.com/questions/528727/how-do-i-solve-periodic-mouse-lag-on-linux-mint-mate

To save some peeps the trouble of going to the link here are the specific instructions I followed (copy and paste each line on a terminal):

sudo su -
modprobe drm_kms_helper
echo N> /sys/module/drm_kms_helper/parameters/poll
echo 'drm_kms_helper' >> /etc/modules-load.d/local.conf
echo "options drm_kms_helper poll=N" >> /etc/modprobe.d/local.conf
4
  • 4
    Man you just saved my life
    – Spock
    Mar 25, 2019 at 6:56
  • 3
    doesn't solve mine, any suggestion?<br>I am using Ubuntu 20.04 Jan 28, 2021 at 4:09
  • 1
    I'm on ubuntu 20.04 and this didn't work for me. It seems to have made it slightly worse for some reason. Back-steeping doesn't seem to completely revert the changes. :shrug:
    – Sparx
    Apr 7, 2022 at 21:49
  • Second line solved it. I have 116 GB ram, 2GB SSD M2, Ubuntu 22.04. I wander what caused the lag Apr 26, 2022 at 16:29
12

I tried above commands did not work. I was also having my mouse pointer real slow all of sudden in properly working Ubuntu 18.04. Googled like crazy for about an hour, tried restarting for few times, checked RAM and CPU usage it was not even half, try unplugging the mouse for couple of times, went through the mouse settings,

Finally, found out the Zoom was switched on. Switched it off and worked like a charm.

The option can be found in Settings > Universal access.

screenshot

7
  • I searched for several hours and this is the only thing that worked for me on Kubuntu, thanks!
    – homebrand
    Jun 9, 2019 at 22:29
  • 2
    @homebrand where is that option on kubuntu?
    – NIZ
    Jul 17, 2019 at 12:28
  • 2
    @NIZ under System Settings > Desktop Events > Accessibility section
    – homebrand
    Jul 20, 2019 at 0:01
  • 1
    Why would the zoom affect the mouse in this way? what
    – Snusifer
    Mar 2, 2022 at 10:16
  • 1
    Man, oh man, I've had this problem for years without being able to pinpoint the source of the problem. I thought maybe it was the mouse itself that was the problem even though I tried several mice. I also suspected the refresh rate on my monitor. Unbelievable, instant, satisfaction when turning off zoom. No clue what zoom does or why it was enabled. Thanks a million!
    – domo
    Oct 13, 2022 at 9:32
11

One thing worth checking is whether the the mouse is connected to a USB hub that has other devices connected. In my case, my Bluetooth mouse shares a USB hub with an Ethernet adapter.

The solution was to simply move the mouse to a different USB port.

1
  • That worked for me, thx!
    – glades
    Feb 20 at 6:56
4

Here's another thing that happened to me: under Settings -> Displays, the refresh rate somehow ended up at 23.98 Hz, which made my mouse feel very sluggish, even though the mouse settings were fine.

4

I finally found the solution to the mouse lag (I'm using wireless mouse with dongle) in Ubuntu 20.10:

I edited cmdline.txt file in /boot/firmware

Putting usbhid.mousepoll = 0 seems to help.

1
  • this worked for me on ubuntu 20.04 Feb 2, 2021 at 20:35
2

Just use a USB 2.0 Port instead of a USB 3.0.

1
  • FWIW, this prompted me to unplug the wireless receiver and plug it straight back into the same port, and that fixed it - went from terrible jitter to perfectly smooth (no doubt the jitter will be back in the next couple of days though).
    – joe
    Feb 24 at 13:46
1

For me the solution was to bring the wireless dongle closer to the mouse (+keyboard) using a USB extension cord.

0

In my case with Parrot Linux it was a case of Interrupt conflicts. IRQ#18 kept being disabled by the system. After disabling the EHCI Handoff in the BIOS,ehci_hcd:usb1 was replaced with ehci_hcd:usb2 and the mouse lag after a random period of time stopped.

You can view your interrupt assignments with: cat /proc/interrupts

Mine changed from: 18: IO-APIC 18-fasteoi ehci_hcd:usb1, pata_jmicron, ata_piix, uhci_hcd:usb8 to: 18: IO-APIC 18-fasteoi ehci_hcd:usb2, pata_jmicron, ata_piix, uhci_hcd:usb8

And the problem was resolved.

0

I had the same problem when using Ubuntu 22.04. I tried to use another USB slot but that didn't work.

I did a little research and found a solution that worked:

  • Launch Settings app.
  • Select Displays.
  • Change the Resolution from 1280x768(5:4) to 1024x768(4:3)

screenshot here

0

Here's what worked for me:

  1. Log out.

  2. After you click on your profile to log in, look for a settings cogwheel in the bottom-right-hand corner.

  3. Click on it and then click on "Ubuntu in Xorg"

0

On my new 2022 HP Envy 16 hp0055cl, for Ubuntu 22.04, I found the Display refresh rate set at 120Hz, so I changed it to 60Hz. Mouse is now movement is now smooth.

0

Changing my mouse from a USB 2.0 to USB 3.0 did wonders. I have a yee suspicion that either ubuntu, linux, or gnome is bad at USB 2.0 ports when it comes to latency. I have never had this problem on the same port, same computer in windows.

0

I turned off animations in accessibility settings and that seemed to help.

0

2024 answer:

If anyone also "feels" lag like me, it's the refresh rate.

Make sure you choose the right screen, set the right resolution (for me 16:9 works well) and choose refresh rate > 144Hz.

screenshot

You must log in to answer this question.

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