In case someone gets the same problem as I just got.
When switching from Windows to Ubuntu (in dual-boot) my Microsoft wireless mouse scroll wheel goes nuts! It's totally over-sensitive.
In case someone gets the same problem as I just got.
When switching from Windows to Ubuntu (in dual-boot) my Microsoft wireless mouse scroll wheel goes nuts! It's totally over-sensitive.
Open a prompt
List your devices, pay attention to the id from the device you want to fix, if there are 2 of them, it's ok.
$ xinput list
Mine was 9 and 10
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v8.0 id=9 [slave pointer (2)]
⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v8.0 id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Microsoft Microsoft® 2.4GHz Transceiver v8.0 id=8 [slave keyboard (3)]
Now do this, x
being your id
$ xinput list-props x | grep 'Scrolling Distance'
Evdev Scrolling Distance (255): 1, 1, 1
Finally, the trick is to find your ideal values, mine were 10, 10, 10
$ xinput set-prop x 'Evdev Scrolling Distance' 10, 10, 10
To permanently set the change (source):
A hidden file in your directory is ".profile" (Ctrl+H to see hidden files) Double click on it and open it. Copy paste the previous command at the end. That's it!
P.S. to apply the same command for all users you can edit the file /etc/profile (not an hidden file).
You are now good to go!
It's a hack, but un-/re-pluggin the USB transceiver lets Ubuntu properly set the resolution and you get a very reasonable scroll speed. I've been using this trick on every Ubuntu release for the last few years. I rarely reboot my machine so it's the easiest solution for me :)
Perhaps someone can explain why this works.
A solution that works for me for the wireless mouse scroll speed problem:
The order when enabling Linux modules is very important.
Add a file named /etc/modprobe.d/mshid.conf
containing:
install hid-generic /sbin/modprobe hid ; /sbin/modprobe usbhid ; /sbin/modprobe -i hid-generic ; true
This ensures the correct loading order and the scroll speed is then normal. This is what happens in the background when the system is on, when removing and adding back the transceiver. This works in other distributions than Ubuntu. A reboot is required for this to work.
There is a use case that isn't 100% covered by the previous answers, so I wanted to share the following script I wrote which borrows from the accepted solution above. I'm sure there are far more elegant ways to do this, but this worked for me.
#!/bin/sh
while true
do
xinput set-prop `xinput list|grep Nano|grep pointer|awk '{ print $8 }'|tr -d 'id='|sed -n 2p` 'Evdev Scrolling Distance' 10, 10, 10
sleep 5
done
The script will implement the xinput solution once every 5 seconds, looking for the second pointer input (this is the one I found always controlled scroll speed). I needed to use this command because the property number was not always the same - but it was always the second in the list.
Use Case: If you use a USB switcher to control multiple computers, at least one of which is Linux and one of which is Windows - when you switch from Linux to Windows to Linux, the scroll speed change does not persist (even if you use the xinput, .profile, or modprobe solution).
I also found the .profile solution to be problematic in that if you do remove the transceiver and put it back in, then reboot, the scroll speed will be extra slow because it will take the appropriate scroll speed and scale it back by whatever is in your .profile.
The script I shared above can be run via nohup whenever you're using the USB switcher, and killed whenever you're not. Again - not elegant, but it's low impact and works 100%.