Sometimes your mouse device (it can be even a touchpad or a trackball) can unexpectedly get stuck [maybe it's a new bug that should be reported?!] in the middle of your work (or maybe it just didn't get recognized after plugging/unplugging/replugging it in).
In such cases, reloading the mouse driver
may help (e. g., for PS/2 mouse driver, Linux kernel module is called "
psmouse"):
# modprobe -r -v psmouse
# modprobe -v psmouse
You can also get info on any kernel driver modules installed in your system to support different mouse types (e. g., for serial mice, the kernel module is called "
sermouse"), and also check if it's currently loaded:
$ ls /lib/modules/$(uname -r)/kernel/drivers/input/mouse
... sermouse.ko ...
$ /sbin/modinfo sermouse
...
$ lsmod | grep sermouse
...
Notes:
- you can check the dmesg log for any strange symptoms:
$ dmesg | grep psmouse
...
[ 9.0123456] psmouse ... lost synchronization, throwing 2 bytes away.
- the trick will fail if the needed kernel module is built-in (probably only reboot can help);
- sometimes it's some X11 driver which causes problems (please check
/var/log/Xorg.0.log);
- if you use your mouse in console mode, perhaps it's good to check the post about gpm.
---
Last updated: 2016-05-20