31

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)
terdon
  • 100,812
empedokles
  • 3,883
  • 15
  • 46
  • 68
  • 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 04 '16 at 07:28
  • Alltime, but it seems away now. Maybe they did solve it through an update. – empedokles May 04 '16 at 09:31
  • 1
    Unfortunately my pleasure was premature. I experienced jittery motion again today. – empedokles May 04 '16 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 '16 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 '23 at 07:26

14 Answers14

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
SilverlightFox
  • 103
  • 1
  • 6
SpikeNaples
  • 404
  • 4
  • 4
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

Pablo Bianchi
  • 15,657
Jay
  • 221
  • I searched for several hours and this is the only thing that worked for me on Kubuntu, thanks! – homebrand Jun 09 '19 at 22:29
  • 2
    @homebrand where is that option on kubuntu? – NIZ Jul 17 '19 at 12:28
  • 2
    @NIZ under System Settings > Desktop Events > Accessibility section – homebrand Jul 20 '19 at 00:01
  • 1
    Why would the zoom affect the mouse in this way? what – Snusifer Mar 02 '22 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 '22 at 09:32
  • @domo Actually I like the zoom feature on my 4K monitor as some programs do not print text at the correct size... but I definitely like a smooth mouse rather than the zoom. Sad, though. – Alexis Wilke May 18 '23 at 14:18
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.

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.

Pablo Bianchi
  • 15,657
David1029
  • 41
  • 1
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.

Ulf Adams
  • 141
2

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

  • 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 '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.

Yuri Feldman
  • 121
  • 3
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

karel
  • 114,770
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.

Jimw
  • 1
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

karel
  • 114,770
EGT
  • 1