[ltp] Kernel 2.6 and two mice
Edi Weitz
linux-thinkpad@linux-thinkpad.org
Mon, 24 May 2004 12:29:22 +0200
Hi!
For various reasons I've recently completely re-installed Linux on my
trusty two-year old T23. Before that I was using Gentoo 1.1a and then
SuSE 9.0, both with 2.4 kernels. Now I'm using Debian testing with a
2.6.6 kernel and I'm running into problems with my mice.
My setup is that I normally use an old MS IntelliEye USB mouse with a
scroll wheel. If I'm on the road I don't take it with me and I want to
be able to use the trackpoint for scrolling (i.e. I can scroll while I
press button 2 and I can emulate a button 2 press by pressing buttons
1 and 3 at the same time). This worked fine with 2.4 kernels and the
relevant part from my XF86Config looked like this:
Section "ServerFlags"
Option "AllowMouseOpenFail"
EndSection
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "ButtonNumber" "3"
Option "Device" "/dev/psaux"
Option "Protocol" "PS/2"
Option "Emulate3Buttons" "on"
Option "Emulate3Timeout" "50"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
EndSection
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[2]"
Option "ButtonNumber" "5"
Option "Device" "/dev/input/mice"
Option "Protocol" "imps/2"
Option "ZAxisMapping" "4 5"
EndSection
Section "ServerLayout"
InputDevice "Mouse[1]" "CorePointer"
InputDevice "Mouse[2]" "SendCoreEvents"
# more stuff
EndSection
With 2.6.6 this still works but there's an annoying catch: If I've
used the trackpoint for scrolling (pressing button 2) then when I
release button 2 this is interpreted as a button 2 release (which it
shouldn't) resulting in things like the X clipboard being pasted into
my xterm.
Obviously, this is due to kernel 2.6 piping /all/ mouse events through
/dev/input/mice so I thought the solution would be to replace
/dev/psaux with /dev/input/mouse0 and /dev/input/mice with
/dev/input/mouse1 which seems to be the way mice are handled in 2.6.
Now, this works fine and exactly as it should but only until I unplug
the USB mouse. If I plug it back in again (or if it wasn't plugged in
at boot time and I plug it in later) /dev/input/mouse1 doesn't
work. /dev/input/mice /does/ work, though.
To be more precise: With the USB mouse plugged in at boot time if I
move it I can see (with cat) output on /dev/input/mice as well as
/dev/input/mouse1. If I unplug and then re-plug the USB mouse I can
still see output on /dev/input/mice but /not/ on /dev/input/mouse1
anymore. This doesn't look like an X problem to me but rather
something with the kernel.
It doesn't make a difference whether I use hotplug or not and I don't
think it should because I've compiled in all relevant parts into the
kernel, no modules.
Does anybody have an idea what I'm doing wrong?
Thanks in advance,
Edi.