A cure for Raspberry Pi ‘Slow USB Mouse Syndrome’

I don’t quite know how I missed this, but I’m guessing plenty of Pi users might have missed it too so here it is. If you’re tired of the Raspbian desktop’s too, too laggy mouse performance, there’s a very easy cure. Poor mouse responsivity was the only thing preventing me from using the Raspbian desktop on a regular basis. Here’s how to fix it.

  1. Edit the file cmdline.txt:
    sudo nano /boot/cmdline.txt
  2. Add the following text right at the end of the single line, leaving a single space between the new entry and the previous one:
  3. Reboot.

What this does, as step 2 indicates, is set the rate at which Raspbian polls the mouse for movement changes. Out of the box, the poll rate is too slow, so you move the mouse and the cursor noticeably struggles to keep up with you. It feels like you’re pushing the cursor through virtual mud. Adjusting Raspbian’s mouse acceleration and speed settings doesn’t help.

I don’t know what the default mouse poll rate is, but setting the value to 8 is equivalent to polling 125 times a second (125Hz). There are other values you can supply: going down to one, halving the value each time, ie. 4, 2 and 1. Each of these represents a doubling of the poll rate: 250Hz, 500Hz and 1000Hz.

There is a catch: the more polling Raspbian does, the more work the CPU has to do. I found setting the value to 8 gives me so much better responsivity that I’m happy to put up with the small increase of approximately seven per cent in CPU usage that I saw. I didn’t feel any need to poll more rapidly, but you may want it smoother. The choice is yours.

You should note that I have a wireless mouse connected to the Raspberry Pi keyboard, which itself connects to a Pi USB 2.0 port. You might see different outcomes with mice connected to one of the Pi’s USB 3.0 ports. And if you’re using BLE, of course, you’re probably wondering what the heck I’m on about. I suspect most folk do which is why the Pi People have not set this to a better value before. But if you do use a wired mouse or, like me, a wireless mouse with a USB dongle, this fix is worth a try. With such a setup, it really does make the Pi a workable desktop machine.

Credit to The Pi Hut for the original write-up.