Debianhelp.co.uk

Mouse configuration in Debian

PS/2 mouse Configuration in Debian

In the case of a PS/2-connector mouse on an ATX motherboard, the signal flow should be:

 

     mouse -> /dev/psaux -> gpm -> /dev/gpmdata = /dev/mouse -> X
 

Here, a symlink /dev/mouse is created and is pointing to /dev/gpmdata to make some configuration utilities happy and to make reconfiguration easy. (E.g., if you decide not to use the gpm daemon after all, just point the symlink /dev/mouse to /dev/psaux after getting rid of the gpm daemon.)

 

This signal flow allows the keyboard and mouse to be unplugged and reinitialized by restarting gpm upon reconnect. X will stay alive!

 

The protocol of the signal flow between gpm output and X input can be implemented in either of two ways, as "ms3" (use the Microsoft 3-button serial mouse protocol) or "raw" (use the same protocol as the mouse that is connected), and this choice dictates the choice of protocol used in X configuration.

 

I will demonstrate the configuration examples using a Logitech 3-button (traditional Unix-style mouse) PS/2 mouse as an example in the following.

 

If you are one of the unfortunate whose graphics card is not supported by the new X4 and need to use the old X3 (some ATI 64 bit cards), configure /etc/X11/XF86Config instead of /etc/X11/XF86Config-4 in the following examples while installing X3 packages.

USB mouse Configuration in Debian

Make sure you have all required kernel functions activated through kernel compile time configuration or modules:

  • Under "Input core support":
    • "Input core support" (CONFIG_INPUT, input.o),
    • "Mouse support" (CONFIG_INPUT_MOUSEDEV, mousedev.o)
  • Under "USB support":
    • "Support for USB" (CONFIG_USB, usbcore.o),
    • "Preliminary USB device filesystem" (CONFIG_USB_DEVICEFS),
    • "UHCI" or "OHCI" (CONFIG_USB_UHCI || CONFIG_USB_UHCI_ALT || CONFIG_USB_OHCI, usb-uhci.o || uhci.o || usb-ohci.o),
    • "USB Human Interface Device (full HID) support" (CONFIG_USB_HID, hid.o), and
    • "HID input layer support" (CONFIG_USB_HIDINPUT)

 

Here, lower case names are module names.

 

If you're not using devfs, create a device node /dev/input/mice with major 13 and minor 63 as follows:

 

     # cd /dev
     # mkdir input
     # mknod input/mice c 13 63
 

For typical scroll USB mice, configuration combinations should be:

 

     /etc/gpm.conf                        |             /etc/X11/XF86Config-4
  ----------------------------------------------------------------------------
 
 device=/dev/input/mice                       Section "InputDevice"
 responsiveness=                                 Identifier "Generic Mouse"
 repeat_type=raw                                Driver     "mouse"
 type=autops2                                    Option     "SendCoreEvents" "true"
 append=""                                         Option "Device"   "/dev/input/mice"
 sample_rate=                                     Option     "Protocol" "IMPS/2"
                                                        Option     "Buttons" "5"
                                                        Option  "ZAxisMapping" "4 5"
                                                        EndSection

Touchpad Configuration in Debian

Although the touchpad on a laptop computer emulates a 2-button PS/2 mouse as the default behavior, the tpconfig package enables full control of the device. For example, setting OPTIONS="--tapmode=0" in /etc/default/tpconfig will disable pesky "click by tap" behavior. Set /etc/gpm.conf as follows to use both touchpad and USB external mouse on the console:

 
     device=/dev/psaux
     responsiveness=
     repeat_type=ms3
     type=autops2
     append="-M -m /dev/input/mice -t autops2"
     sample_rate=