1

I'm running Ubuntu Mate on a raspberry pi 4 and this kernel compiles seem to set a very high polling rate for the mouse, making a wireless mouse like the one I'm using extremely laggy.

The polling rate can be changed removing the usbhid module and starting it again with a lower polling rate:

sudo modprobe -r usbhid && sudo modprobe usbhid mousepoll=2

seems to solve the problem.

This is of course not persistent after a reboot, and I'd like to know how to make it persistent. /etc/modules seems to not be able to remove modules, I've tried adding a

-r usbhid
usbhid mousepoll=2

to it, but is doesn't work. Any solution? Properly loading the module at start would be great, otherwise how to automatically run the line above with superuser privileges without asking for my password would be OK.

Thanks.

1 Answers1

2

Try:

cat >> /etc/modprobe.d/usbhid.conf << "EOF"
options usbhid mousepoll=2
EOF

And, if applicable:

update-initramfs -u -k all

...this .conf file should set the option for you the first time the module is loaded, and be persistent.

Another option is to include the setting in the kernel command line: usbhid.mousepoll=2. You will need to update the grub (or other bootloader) configuration for this to persist.

Also, after the module is loaded, this will (probably) change the polling rate on the fly:

echo 2 > /sys/module/usbhid/parameters/mousepoll