3.3.1 PS/2 mice
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.
3.3.1.1 The ms3 protocol approach
/etc/gpm.conf | /etc/X11/XF86Config-4
=========================+======================================
device=/dev/psaux | Section "InputDevice"
responsiveness= | Identifier "Configured Mouse"
repeat_type=ms3 | Driver "mouse"
type=autops2 | Option "CorePointer"
append="" | Option "Device" "/dev/mouse"
sample_rate= | Option "Protocol" "IntelliMouse"
| EndSection
If this approach is used, the mouse type adjustment is done only by editing
gpm.conf
and X configuration stays constant. See my example scripts
.
3.3.1.2 The raw protocol approach
/etc/gpm.conf | /etc/X11/XF86Config-4
=========================+======================================
device=/dev/psaux | Section "InputDevice"
responsiveness= | Identifier "Configured Mouse"
repeat_type=raw | Driver "mouse"
type=autops2 | Option "CorePointer"
append="" | Option "Device" "/dev/mouse"
sample_rate= | Option "Protocol" "MouseManPlusPS/2"
| EndSection
If this approach is used, the mouse type adjustment is done by editing
gpm.conf
as well as adjusting X configuration.
3.3.1.3 How to adjust to different mice
The gpm
device type autops2 is supposed to autodetect
most of the PS/2 mice in the market. Unfortunately it doesn't always work and
it isn't available in pre-Woody versions. Try using ps2, or
imps2 in gpm.conf
instead of autops2 for
such cases. To find out the specific types of mouse gpm
knows
about, type: gpm -t help. See gpm(8)
.
If a 2-button PS/2 mouse is used, set the X protocol to enable
Emulate3Buttons. The difference of protocol between the 2-button
mouse and the 3-button mouse is autodetected and auto-adjusted for
gpm
after tapping the middle button once.
For X protocol with
The raw protocol approach, Section
3.3.1.2 or without gpm
, use:
-
IntelliMouse: serial port mouse (gpm
repeater with
"ms3")
-
PS/2: PS/2 port mouse (always test this first)
-
IMPS/2: any PS/2 port mice (2, 3, or scroll mice, better)
-
MouseManPlusPS/2: Logitech PS/2 port mouse
-
...
See more at
Mouse
Support in XFree86
.
A typical Microsoft scroll mouse is reported to work best with:
/etc/gpm.conf | /etc/X11/XF86Config-4
=========================+======================================
device=/dev/psaux | Section "InputDevice"
responsiveness= | Identifier "Configured Mouse"
repeat_type=raw | Driver "mouse"
type=autops2 | Option "CorePointer"
append="" | Option "Device" "/dev/mouse"
sample_rate= | Option "Protocol" "IMPS/2"
| Option "Buttons" "5"
| Option "ZAxisMapping" "4 5"
| EndSection
For some recent thin Toshiba notebook PCs, activating gpm
before
PCMCIA in the System-V init script may help prevent system lockup. Weird but
true.