Raspberry PI

Fixing slow mouse with Raspberry PI OS

One common problem with Raspberry PI OS is mouse speed. This problem isn’t linked to OS by itself, but appears to be more related to some mouse hardware. In this tutorial I’m going to show you how to fix slow/lagging mouse cursor.

Mouse Poll Rate

Raspberry PI OS exchanges position and click data with mouse with a pre-defined constant frequency named polling rate.

Polling Rate is measured in Hertz (Hz) and measures how many times in a second data are transmitted from mouse to operating system. It is set with a system variable named “usbhid.mousepoll”. Common values are following (first line “=0” means “=zero”):

usbhid.mousepoll=0 -> use interval requested by the device
usbhid.mousepoll=1 -> 1000Hz
usbhid.mousepoll=2 -> 500Hz
usbhid.mousepoll=4 -> 250Hz
usbhid.mousepoll=8 -> 125Hz
usbhid.mousepoll=10 -> 100Hz (Default)

If you experience a very slow mouse movement, then you can try by changing this value.

Changing Mouse Poll Rate

This operation can be done directly from Raspberry PI active and running.

usbhid.mousepoll parameter can be set from cmdline.txt file. This file is structured to configure a list of basic system settings in one single line, each parameter being separated with a space.

From terminal, edit cmdline.txt file available from boot folder:

sudo nano /boot/cmdline.txt

Go to end of line, append a space and then “usbhid.mousepoll=0”.

Save and exit. Then reboot Raspberry PI OS. Your slow mouse should be fixed after reboot.

peppe8o

Open source and Raspberry PI lover

View Comments

  • I came across this tutorial by complete accident, followed the instructions and fixed the slow moving problem of my mouse. At first I thought this was because of my mouse(used another wireless mouse and movement was fine) but it turns out the polling rate was limited, thanks.

  • Sadly, the font on this site makes it look like =oh instead of =zero

    It mildly worked with =zero =0

    Thank you, it's not where I like it, I wish it were still a bit faster. Meh. I'll take it.

    • Thank you for your feedback, Michael. I added a few words in this post to explicit that =0 means =zero.

  • My mouse was working normally for a long time, and something changed to slow it way down. Your instructions worked perfectly. Thanks!

  • None of the polling values had any effect on a (my) Raspberry Pi 4/4GB using kernel 5.15.56-v8+ #1575 SMP PREEMPT.
    The mouse was either Logitech M325 wireless or a Hewlett-Packard (wired) USB mouse.

    A number of reports on Raspberry Pi forums point to this kernel and slow, imprecise, and erratic (mostly bluetooth) mouse performance. There may be a kernel configuration error, or an accidental code problem with the Broadcom ARM hardware.

  • Yes it works. Thank you!
    At first I thought the mouse is broken but then I tried with a cable mouse and it worked well. So, luckily I have two pairs of wireless keyboard/mouse and I tried the other ==> same issue: slow mouse. It was obvious that two same products have the same issue so I searched the net and I fount this post. Tried and fixed.
    Thank you, sir!

    • Thank you for your feedback, Ovidiu. I'm really happy when my articles help people! Enjoy your Raspberry PI

Published by
peppe8o

Recent Posts

Some links in this post may be affiliate links. We may get paid if you buy something or take an action after clicking one of these, but without addictional costs for you compared to direct buying.

SPI communication between two Arduinos

In this tutorial, we will use two Arduino Uno to demonstrate the Serial Peripheral Interface…

2 weeks ago

Automatic irrigation system with Arduino and Sensors

In this tutorial, we will be making an automatic irrigation system (AIS) with Arduino and…

3 weeks ago

Beginner’s Guide to Use Python Virtual Environment with Raspberry PI (venv)

This tutorial will show you how to use Python Virtual Environment with Raspberry PI computer…

4 weeks ago

Get Betting Odds with Raspberry PI and Odds-API (free)

This tutorial will show you how to get betting odds with Raspberry PI by using…

1 month ago

Backup Raspberry PI (computer) Data with Rsync to Remote NAS

This tutorial will show you how to perform the backup of Raspberry PI (computer board)…

1 month ago

Honeygain and Raspberry PI: Earn by Sharing Internet Connection

This tutorial will show you how to install Honeygain on a Raspberry PI computer board…

1 month ago