Fix that Laggy Mouse on your Raspberry Pi

Fix that Laggy Mouse on your Raspberry Pi

If you find your wireless mouse acting very slow, or even "rubber banding", there's a simple fix!

The Raspberry Pi's USB poll rate for mice has been set slightly on the slow side, which has been causing issues with wirreless mice. By increasing the poll rate you can speed up and smooth out the laggy mouse movement. However it does come at a slight cost to CPU performance.

To change the poll rate simply edit the /boot/cmdline.txt file:

sudo nano /boot/cmdline.txt

And add the following text at the end of the single line:

usbhid.mousepoll=8

You should end up with something like this:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles usbhid.mousepoll=8

You can change the number to anything from 0-8. The lower the number the smoother the mouse movement will be, but the higher the load on the CPU. 

That's it! Simply reboot your Raspberry Pi and say hello to a smooth, lag free mouse!

6 comments

David Caughey

David Caughey

Brilliant, thank you.

Brilliant, thank you.

Nick

Nick

Works great with the Rii RK700 2.4G Wireless Mouse/Keyboard Package. Changed the setting to 4, from nothing/default. Perfect, many Thanks.

Works great with the Rii RK700 2.4G Wireless Mouse/Keyboard Package. Changed the setting to 4, from nothing/default. Perfect, many Thanks.

TT

TT

Thank You, it works with Hama wireless mouse too.

Thank You, it works with Hama wireless mouse too.

Ebby

Ebby

Just to confirm that this seems to be a real problem, I tried the usbhid.mousepoll=0 recomendation to no avail.
A fix could be life changing.

Just to confirm that this seems to be a real problem, I tried the usbhid.mousepoll=0 recomendation to no avail.
A fix could be life changing.

guy

guy

after adding this command to the end of boot , the rpi will not boot anymore, only after deleting it. any ideas ?
thank you

after adding this command to the end of boot , the rpi will not boot anymore, only after deleting it. any ideas ?
thank you

Steve

Steve

I just updated to Raspbian Buster and the latest firmware update. That’s when I noticed the rubberbanding / lag. Made the change and rebooted and it didn’t seem to change. Changed the polling to 0 and to 8. No real difference. The wireless mouse is an M510. I’m wondering if there is also a firmware setting or something else I’m missing. I’ll keep poking at it and see if it makes a difference.

I just updated to Raspbian Buster and the latest firmware update. That’s when I noticed the rubberbanding / lag. Made the change and rebooted and it didn’t seem to change. Changed the polling to 0 and to 8. No real difference. The wireless mouse is an M510. I’m wondering if there is also a firmware setting or something else I’m missing. I’ll keep poking at it and see if it makes a difference.

Leave a comment

All comments are moderated before being published.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.