2004-04-10 13:53:31

by Vitez Gabor

[permalink] [raw]
Subject: 2.6.5 : problem with MS Intellimouse Explorer buttons when using X

Hi,

I recently ugraded from 2.4.23 to 2.6.5. Everything works fine, except for
my mouse: when I press the buttons on the left side of the mouse, the system
generates button press/release events for the proper buttons and for the
buttons on the top of the mouse. The mouse worked well with 2.4.23.

I use a mixed Debian woody/sarge system.

Example output from xev (I pressed and released one of the buttons on the
side):

ButtonPress event, serial 23, synthetic NO, window 0x1800001,
root 0x46, subw 0x0, time 3567154224, (56,106), root:(793,193),
state 0x0, button 5, same_screen YES

ButtonPress event, serial 23, synthetic NO, window 0x1800001,
root 0x46, subw 0x0, time 3567154224, (56,106), root:(793,193),
state 0x0, button 3, same_screen YES

ButtonRelease event, serial 23, synthetic NO, window 0x1800001,
root 0x46, subw 0x0, time 3567154393, (56,106), root:(793,193),
state 0x400, button 5, same_screen YES

ButtonRelease event, serial 23, synthetic NO, window 0x1800001,
root 0x46, subw 0x0, time 3567154393, (56,106), root:(793,193),
state 0x400, button 3, same_screen YES


The events for button 3 should not be there..

Mouse related lines from dmesg:

mice: PS/2 mouse device common for all mice
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1


X11 version, configuration:

4.2.1-3

Mouse configuration:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/psaux"
Option "Protocol" "ExplorerPS/2"
# Option "Protocol" "ImPS/2"
Option "SampleRate" "150"
Option "Resolution" "200"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
EndSection


Various stuff I tried to make the mouse work properly:

Plugging it in the USB port of my machine: no change.
Loading the psmouse module with the "proto=exps" parameter: no change.
Changing the mouse protocol to ImPS/2: no change/got worse.

Any help would be appreciated..


Gabor


2004-04-11 19:16:36

by Kim Holviala

[permalink] [raw]
Subject: Re: 2.6.5 : problem with MS Intellimouse Explorer buttons when using X

On Saturday 10 April 2004 16:53, Vitez Gabor wrote:

> I recently ugraded from 2.4.23 to 2.6.5. Everything works fine, except for
> my mouse: when I press the buttons on the left side of the mouse, the
> system generates button press/release events for the proper buttons and for
> the buttons on the top of the mouse. The mouse worked well with 2.4.23.

2.4 and 2.6 handle mouse differently; 2.4 has /dev/psaux which is just a
direct channel into the port while 2.6 inteprets all mouse stuff and
regenerates a virtual /dev/psaux.

Try modprobing the even device (modprobe evdev) to get /dev/input/event?. Then
run hexdump -C /dev/input/event1 (or whatever even device represents your
mouse) to see what REALLY happens in the kernel. Don't worry about the first
8 octets, the stuff you want is in the last 8. Might be a good idea to switch
to a console so that extra mouse clicks won't do any strange things.

> Option "Protocol" "ExplorerPS/2"
> # Option "Protocol" "ImPS/2"
> Option "Buttons" "7"
> Option "ZAxisMapping" "6 7"

I use an Explorer at work, don't have the Buttons directive at all and my
ZAxMap is "4 5". That way everything works, but the side buttons are missing.
That's with 2.6.5 and Gentoo.



Kim

2004-04-12 10:16:35

by Vitez Gabor

[permalink] [raw]
Subject: Re: 2.6.5 : problem with MS Intellimouse Explorer buttons when using X

Hi,

On Sun, Apr 11, 2004 at 10:16:33PM +0300, Kim Holviala wrote:
> 2.4 and 2.6 handle mouse differently; 2.4 has /dev/psaux which is just a
> direct channel into the port while 2.6 inteprets all mouse stuff and
> regenerates a virtual /dev/psaux.

Thanks, I did not know it.

> Try modprobing the even device (modprobe evdev) to get /dev/input/event?. Then
> run hexdump -C /dev/input/event1 (or whatever even device represents your
> mouse) to see what REALLY happens in the kernel. Don't worry about the first
> 8 octets, the stuff you want is in the last 8. Might be a good idea to switch
> to a console so that extra mouse clicks won't do any strange things.

When looking for the evdev modul, I found the event debug (evbug) modul, so I
used that one instead. It writes event debug info to the kernel log. I loaded
it, and started pressing the mouse buttons, one after another.

Everything looks OK: there are no superfluous mouse events. This is the
output I got:

Apr 12 11:46:28 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 272, Value: 1
Apr 12 11:46:28 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:28 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 272, Value: 0
Apr 12 11:46:28 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:29 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 273, Value: 1
Apr 12 11:46:29 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:30 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 273, Value: 0
Apr 12 11:46:30 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:32 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 274, Value: 1
Apr 12 11:46:32 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:32 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 274, Value: 0
Apr 12 11:46:32 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:33 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 276, Value: 1
Apr 12 11:46:33 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:34 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 276, Value: 0
Apr 12 11:46:34 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:35 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 275, Value: 1
Apr 12 11:46:35 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0
Apr 12 11:46:36 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 1, Code: 275, Value: 0
Apr 12 11:46:36 tonhal kernel: evbug.c: Event. Dev: isa0060/serio1/input0, Type: 0, Code: 0, Value: 0

So the mouse event regeneration in the kernel seems to be buggy.

> > Option "Buttons" "7"
> > Option "ZAxisMapping" "6 7"
>
> I use an Explorer at work, don't have the Buttons directive at all and my
> ZAxMap is "4 5". That way everything works, but the side buttons are missing.
> That's with 2.6.5 and Gentoo.

Yes. In order to use the mouse buttons on the side, one has to use the
configuration above. Obviously the Z axis is mapped to the wrong buttons
(and button 4 and 5 are the side buttons..) so buttons should be swapped
in X with the xmodmap -e "pointer = 1 2 3 6 7 4 5" command.


Gabor

2004-04-13 05:46:31

by Kim Holviala

[permalink] [raw]
Subject: Re: 2.6.5 : problem with MS Intellimouse Explorer buttons when using X

On Monday 12 April 2004 13:16, Vitez Gabor wrote:

> > Try modprobing the even device (modprobe evdev) to get /dev/input/event?.
> > Then run hexdump -C /dev/input/event1 (or whatever even device represents
> > your mouse) to see what REALLY happens in the kernel.
>
> Everything looks OK: there are no superfluous mouse events. This is the
> output I got:
>
>[clip]
>
> So the mouse event regeneration in the kernel seems to be buggy.

I just checked with vanilla 2.6.5 and the virtual /dev/input/mice
(and /dev/psaux) indeed work as advertised. The problem, as I thought would
be, is with XFree and it's incredible bad mouse handling. The XFree code is
so bad I don't wanna touch it, but someone ought to write a driver for the
event device so that we wouldn't need the PS/2 emulation anymore.





Kim

2004-04-13 05:57:55

by Kim Holviala

[permalink] [raw]
Subject: Re: 2.6.5 : problem with MS Intellimouse Explorer buttons when using X

On Monday 12 April 2004 13:16, Vitez Gabor wrote:

> > Try modprobing the even device (modprobe evdev) to get /dev/input/event?.
> > Then run hexdump -C /dev/input/event1 (or whatever even device represents
> > your mouse) to see what REALLY happens in the kernel.
>
> Everything looks OK: there are no superfluous mouse events. This is the
> output I got:
>
>[clip]
>
> So the mouse event regeneration in the kernel seems to be buggy.

I just checked with vanilla 2.6.5 and the virtual /dev/input/mice
(and /dev/psaux) indeed work as advertised. The problem, as I thought would
be, is with XFree and it's incredible bad mouse handling. The XFree code is
so bad I don't wanna touch it, but someone ought to write a driver for the
event device so that we wouldn't need the PS/2 emulation anymore.



Kim