Last active
February 20, 2022 05:40
-
-
Save JackZielke/42e4fe96ca33ae6b2e1c6d632d52f24f to your computer and use it in GitHub Desktop.
Reset USB mouse when it stops working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# must be run via sudo | |
cd /sys/bus/pci/drivers/ohci-pci | |
for i in ????:??:??.?;do echo -n "$i" >unbind;echo -n "$i" >bind;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably due to a buggy motherboard, but every so often (months between occurrences) my USB mouse will stop working. I can alt-tab to a terminal or use a keyboard shortcut (Ctrl + Alt + T) to get a new terminal.
And boom, the mouse works again.