How to change the mouse polling rate in Ubuntu

Changing the mouse polling?

Special Thanks to: Cesare Tirabassi and everyone contributing in this thread

Beginner Tip: You must use sudo when editing these files.
Such as:

Code:
 gksudo gedit /etc/modules

Blackmagic’s solution:
Edit /etc/modules

Code:
gksudo gedit /etc/modules

Add these two lines onto the end:

Code:
-r usbhid
usbhid mousepoll=2

reboot.

Alternate solution that may work on Feisty (try the first one first):
Add

Code:
options usbhid mousepoll=2

on its own line at the end of /etc/modprobe.d/options

and then add

Code:
usbhid

on the end of /etc/modules
reboot

Alternate solution that may work on Edgy:
Add

Code:
options usbhid mousepoll=2

to /etc/modprobe.d/usbhid

and then add

Code:
usbhid

on its own line at the end of /etc/modules
reboot

aidanr’s alternate feisty solution
Create a file at /usr/local/bin/mymousesettings with the following inside:

Code:
#!/bin/bash
rmmod usbhid && modprobe usbhid mousepoll=2

or if you want to use lomoco (a program for changing the resolution on Logitech mice) you can use this instead:
(G5 and G7 mice don’t need lomoco because they are software-independant)
{
Install:

Code:
sudo apt-get install lomoco

lomoco’s Homepage: http://lomoco.linux-gamers.net/

Code:
#!/bin/bash
# -4 for 400 cpi, -8 for 800 cpi, -m for 1200 cpi, -h for 1600 cpi, -g for 2000 cpi
lomoco -h && rmmod usbhid && modprobe usbhid mousepoll=2

}

After doing either method enter the command

Code:
sudo visudo

and replace the line that says

Code:
%admin ALL=(ALL) ALL

with

Code:
%admin ALL=(ALL) ALL, NOPASSWD:/usr/local/bin/mymousesettings

Use Control + O and then hit enter to save and then use Control + X to exit.

Add that command to startup in System –> Preferences –> Sessions by clicking add and then adding

Code:
sudo sh /usr/local/bin/mymousesettings

as a new entry.
reboot

hanging the mouse polling?


Fixed it with the help of the Gentoo guide:
http://gentoo-wiki.com/TIP_Change_mouse_hz

I added

Code:
options usbhid mousepoll=2

to /etc/modprobe.d/usbhid
(using “sudo nano”)

and then I added

Code:
usbhid

on the end of /etc/modules

=)

Code:
$ cat /sys/module/usbhid/parameters/mousepoll
2


Here are all the mouse polls:

1 = 1000Hz
2 = 500Hz
4 = 250Hz
8 = 125Hz
10 = 100Hz (Default)

Author: Chris A. Matenaers

Working in Digital Marketing, strong liberal world-views & privacy advocate. My hobbies are scuba-diving and coding. I'm also a huge Star Wars fan.

Leave a Reply

Your email address will not be published. Required fields are marked *