Showing posts with label mouse. Show all posts
Showing posts with label mouse. Show all posts

2016-05-20

Software: gpm, a mouse service for Linux console

There's a nice piece of software called gpm (general purpose mouse).
It's a mouse server for Linux console. (BTW, touchpads are supported too).

In Debian (and its derivatives like Ubuntu), it's very easy to start using it by simple installation from package repositories:
# apt-get install gpm
And you should see a rectangular mouse pointer soon ;)

In case it gets stuck, you can try restarting the gpm service this way:
# service gpm restart
or, a more generic command if you don't use Debian:
# /etc/init.d/gpm restart
See also: HOWTO: reload mouse driver in Linux

External links:
---
Last updated: 2016-07-04

2014-06-18

HOWTO: reload mouse driver in Linux

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:
  1. you can check the dmesg log for any strange symptoms:
    $ dmesg | grep psmouse
    ...
    [    9.0123456] psmouse ... lost synchronization, throwing 2 bytes away.
  2. the trick will fail if the needed kernel module is built-in (probably only reboot can help);
  3. sometimes it's some X11 driver which causes problems (please check /var/log/Xorg.0.log);
  4. if you use your mouse in console mode, perhaps it's good to check the post about gpm.
---
Last updated: 2016-05-20