[ltp] PS/2 wheel mouse and scroll on a TP600E

André Wyrwa linux-thinkpad@linux-thinkpad.org
Sat, 24 Jan 2004 13:38:40 +0100


> > If you disable the TrackPoint at boot then you may be able
> > to use a PS/2 scroll mouse with a 2.6 kernel.
> 
> Thanks to all.  I would like to use both.  'Tis as I suspected, I'll get
> myself an (a?) USB mouse then.

You could consider having the trackpoint set to auto-disable (if that's
supported on the 600 models), so that it is disabled when mouse is
attached and enabled when there's no external mouse.

Then you could create a script which probes via tpctl for the external
mouse and changes your XF86Config so that the drivers are correct for
either case.

The little script could look like this:

#!/bin/sh
if [ `tpctl --spe | grep "activation mode" | cut -c55-60` == "enable" ]
then
  sed -e "s/\"Protocol\" \"\(PS\/2\|imPS\/2\)\"/\"Protocol\"
\"imPS\/2\"/g" /etc/X11/XF86Config.tmpl > /etc/X11/XF86Config
else
  sed -e "s/\"Protocol\" \"\(PS\/2\|imPS\/2\)\"/\"Protocol\"
\"PS\/2\"/g" /etc/X11/XF86Config.tmpl > /etc/X11/XF86Config
fi

(There are nicer ways to do it.)

You should run this sometime before starting X (or xdm or whatever) and
you should have copied your current XF86Config to
/etc/X11/XF86Config.tmpl.

The InputDevice section should contain a line
Option "Protocol" "imPS/2" or Option "Protocol" "PS/2".
Note that there must be only one space between "Protocol" and the
protocol.

This should work as long as you attach/detach the mouse before the bios
starts.

Andre.