Having a bluetooth mouse connected to my laptop (ACER 4820TG) was giving me this issue:
After some time of not using the mouse, the mouse cursor wouldn't move unless if i was clicking several times the mouse buttons to recover the connection.
Troubleshooting the issue, i found that this was caused by linux autosuspending the usb ports of my laptop (i guess it was suspending the built-in usb bluetooth module). In case you are having any similar issue with any USB device, run this in a terminal:
sudo su
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo -1 > $i; done
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo -1 > $i; done
This will do the trick in linux mint (lmde) and i assume in other distributions too (if they use the same autosuspend path). To check the USB ports state issue this command in terminal too:
cat /sys/bus/usb/devices/*/power/autosuspend
Autosuspend of inactive USB devices will save some power from battery but in my case - it was causing a frustration problem. Problem now solved!
it works, but when I reboot the computer y happens again and I need to do this every time. Do you know a way to make this change persistent?
ReplyDeleteTry putting the second line (not the 'sudo su' line) in /etc/rc.local.
DeleteWorked well in Linux Mint 15, thanks :D
ReplyDeleteThis tip worked very well for me on Linux Mint 15, thanks, saved me from looking like a noob as my iphone runs out of battery in the middle of a convo :D
ReplyDeleteI successfully used a similar method to fix a webcam that did not work when resumed from suspend in Linux:
ReplyDeletesu
for i in /sys/bus/usb/devices/*/power/level; do echo on > $i; done
Thanks for the great post. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
ReplyDelete