Integrated Trackpoint

Several pointer devices are available on this laptop. The first one is the integrated Track Point. This device is handled as a PS/2 input device also by XFree86 and by GPM (Generic Purpose Mouse) in console mode. This device is seen by Linux through /dev/psaux.

Here is the excerpt of my /etc/X11/XF86Config (XFree86 version 3.3.6):

Section "Pointer"
    Protocol    "GlidePointPS/2"
    Device      "/dev/psaux"
    BaudRate	1200
    Resolution  100
    Buttons     3
EndSection

GPM is started with the following options in /etc/sysconfig/mouse on my Redhat 6.2 config :

FULLNAME="ALPS - GlidePoint (PS/2)"
MOUSETYPE="ps2"
XEMU3="no"
XMOUSETYPE="GlidePointPS/2"

Manually, GPM is started with the following options :

gpm -t ps2

The trackpoint can also provide presure information thanks to the new Linux Trackpoint Utilities.

External PS/2 mouse

I chose the Serial/PS2 Logitech wheel mouse. Please consult this hardware compatability page to ensure that your model is supported. Basically, OEM Logitech mices use a different chipset than boxed ones, and the wheel protocol is not supported. OEM models can be recognized by a black logo instead of a colored one on the top of the mouse body.

You can plug this mouse into the rear PS/2 port, and it is recognized through the same device as the Trackpoint. You don't have to change your configuration files to get it recognized. Moreover, external mouse and trackpoint can simultaneously be used. You'll have to enable the external PS2 port with the multipurpose tpctl utility. You'll to enable both internal and external pointing devices with this utility.

tpctl --spx=enable

In this way, I couldn't get the wheel running. So I needed to plug this mouse on the serial port.

The mouse was provided with a PS2/DB9 adaptor, that allowed me to plug it into the external serial port. This port is seen by Linux as the /dev/ttyS1 device. You have to change your XF86Config file accordingly:

Section "Pointer"
    Protocol     "Auto"
    Device       "/dev/ttyS1"
    BaudRate	 1200
    Resolution   100
    Buttons      3
    ZAxisMapping 4 5
EndSection

You'll need the IMWheel package to convert X11 events coming from the mouse wheel into keystrokes according to a particular window. It allows you to customize the wheel action independantly for each client.

The script /etc/X11/xinit/xinitrc.d/imwheel script is in charge of launching imwheel when X starts. The file /etc/X11/imwheelrc provides the event-to-keystroke conversion in a human readable and easily-extendable format.

It is possible to ask GPM to listen on two or more devices simultaneously:

gpm -k
gpm -t ps2 -m /dev/psaux -M -t pnp -m /dev/ttyS1

This way, I still can use both devices (Mouse on serial port and trackpoint) simultaneously. *But*, the mouse device is no longer recognized when X starts. So, I suggest, you keep running gpm only on /dev/psaux.

Another way to run imwheel

Another way to run imwheel is to use gpm instead of X events. I couldn't get the wheel running by this way, but It may worth more investigation. You'll need imwheel-0.9.8 and the included gpm-1.19.0 package, that accepts some more options related to the wheel functions.

If all works fine, the pipe /dev/gpmdata is written by gpm and read by X, and /dev/gpmwheel is read by imwheel and written by gpm :

[root@bonobo bellet]# lsof | grep gpmdata
gpm       14104     root    3u  FIFO        3,1    174008 /dev/gpmdata
X         14119     root    4u  FIFO        3,1    174008 /dev/gpmdata
[root@bonobo bellet]# lsof | grep gpmwheel
gpm       14104     root    4u  FIFO        3,1    177368 /dev/gpmwheel
imwheel   14206   bellet    4r  FIFO        3,1    177368 /dev/gpmwheel

With this solution, you can indifferently use both internal and external pointer simultaneously, in console mode and in X. GPM handles the mouse protocol in both cases.

But, I didn't succeed in making GPM recognize the wheel movements in this configuration, so help and suggestions are welcome :-)

Summary

The wheel movement with my logitech mouse is only recognized with XFree86 (I'm running version 3.3.6), when the mouse is plugged on the exterial serial port of my thinkpad, and with the PnP("Auto") protocol on the XServer side.

The second solution, with gpm as a uniformized mouse handler process for both console and X is more seduisant, but doesn't work with wheel unfortunately. Any help of advice is welcome.

Last modified : Sun Oct 19 21:25:22 CEST 2003