If I stop moving my (USB)mouse, it stops working until I click

I have a usb Microsoft mouse that works fine on Windows, but on Ubuntu it stops working if I stop using it for three seconds (literally, I counted). At this point, I am unable to move it, I have to click, almost as if it wake the mouse up. And that sucks because apparently that click is a legit click and I end up closing out of stuff sometimes...

Anyway, please help if you've ran into this sort of problem before. I know that there's a chance that this is just an unsolvable hardware issue that I might just have to live with (or write a driver).

Thanks in advance for your time.


Solution 1:

Yes, I encountered this same problem (although in a different way).

In my case it was due to agressive powersaving on USB ports.
This was something I did (to) myself.

If you want to change this behaviour (which, I guess, you do), you could create a permanent settings file to force USB always on.
Open a root console and type (or copy/paste):

echo 'ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control" ATTR{power/control}="on"' >/etc/udev/rules.d/usb_power_save.rules

Solution 2:

For those of you using powertop: <TAB> to "Tunables" section and make sure "Autosuspend for USB device" or "Autosuspend for unknown USB device" is off ("Bad" on left).

I was using sudo powertop --auto-tune in /etc/rc.local, so I had to add this afterwards: for i in /sys/bus/usb/devices/*/power/control; do echo on > $i; done.