2009-10-23 07:02:11

by Harald Dunkel

[permalink] [raw]
Subject: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

Hi folks,

I've got a Logitech Trackman FX connected to my PC via a Chesen
ps/2 usb adapter for mouse and keyboard. Problem: The fourth
mouse button doesn't trigger any events.

This means that I cannot enable scroll wheel emulation in the Xorg
mouse driver. It is a severe restriction for a mouse without dedicated
wheel.

I had opened a bug report for the Xorg mouse driver, but a low level
test program ("cat </dev/input/event2") running outside of X shows
that this is indeed a restriction of the kernel (2.6.31.4).

The same Trackman FX works fine connected to a PC with a "real"
ps/2 port, of course.


It would be very nice if this could be fixed. Of course I would be glad
to help.


Many thanx

Harri
=====================================================================
% cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-0000:00:1a.2-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=120013
B: KEY=1000000000007 ff980000000007ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=0a81 Product=0205 Version=0110
N: Name="CHESEN PS2 to USB Converter"
P: Phys=usb-0000:00:1a.2-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input2
U: Uniq=
H: Handlers=kbd mouse0 event2
B: EV=17
B: KEY=1f001f 2020000 3878d801d001 1e000000000000 0
B: REL=103
B: MSC=10

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input4
U: Uniq=
H: Handlers=kbd event4
B: EV=3
B: KEY=10000000000000 0

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/devices/platform/pcspkr/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=40001
B: SND=6



2009-10-23 07:36:55

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

By adapter, do you mean a passive converter device or an active one?

--
Matthew Garrett | [email protected]

2009-10-23 07:37:36

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

Sorry, just noticed that you said it was an active one. Does it generate
wheel events for any other PS/2 mice? It may simply be a limitation of
the hardware.

--
Matthew Garrett | [email protected]

2009-10-24 09:14:29

by Harald Dunkel

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On 10/23/09 09:37, Matthew Garrett wrote:
> Sorry, just noticed that you said it was an active one. Does it generate
> wheel events for any other PS/2 mice? It may simply be a limitation of
> the hardware.
>

Using a regular mouse with 3 buttons and a wheel there is no problem.
All work fine. But it just got 3 buttons. I've got problems with a
fourth button, so the PS/2 mouse doesn't show.

Is there a hardwired limit to 3 buttons somewhere in the code?


Regards

Harri

2009-10-24 09:19:00

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On Sat, Oct 24, 2009 at 11:14:26AM +0200, Harald Dunkel wrote:

> Is there a hardwired limit to 3 buttons somewhere in the code?

No, but your convertor may not understand wheel events. Does it work
under Windows?

--
Matthew Garrett | [email protected]

2009-10-24 14:01:30

by Harald Dunkel

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On 10/24/09 11:18, Matthew Garrett wrote:
>
> No, but your convertor may not understand wheel events.

Is there some way to get the properties of a mouse connected to
a ps2-to-usb adapter, as there is for a "real" ps2 mouse?

> Does it work
> under Windows?
>

Sorry, but I cannot say. I don't have Windows.


Regards

Harri

2009-10-24 13:53:59

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On Sat, Oct 24, 2009 at 03:42:18PM +0200, Harald Dunkel wrote:
> On 10/24/09 11:18, Matthew Garrett wrote:
>>
>> No, but your convertor may not understand wheel events.
>
> Is there some way to get the properties of a mouse connected to
> a ps2-to-usb adapter, as there is for a "real" ps2 mouse?

No. As far as Linux knows, it's a USB mouse. The converter doesn't
provide any access to the original PS2 stream.

--
Matthew Garrett | [email protected]

2009-10-24 17:03:49

by Harald Dunkel

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On 10/24/09 15:53, Matthew Garrett wrote:
>
> No. As far as Linux knows, it's a USB mouse. The converter doesn't
> provide any access to the original PS2 stream.
>

Can I access the USB stream, regardless what is plugged in into
the adapter?


Regards

Harri

2009-10-24 17:19:27

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On Sat, Oct 24, 2009 at 07:03:39PM +0200, Harald Dunkel wrote:
> On 10/24/09 15:53, Matthew Garrett wrote:
>>
>> No. As far as Linux knows, it's a USB mouse. The converter doesn't
>> provide any access to the original PS2 stream.
>>
>
> Can I access the USB stream, regardless what is plugged in into
> the adapter?

usbmon will let you dump USB traffic.

--
Matthew Garrett | [email protected]

2009-10-24 21:16:46

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

Hi Harald,

On Sat, Oct 24, 2009 at 11:14:26AM +0200, Harald Dunkel wrote:
> On 10/23/09 09:37, Matthew Garrett wrote:
>> Sorry, just noticed that you said it was an active one. Does it generate
>> wheel events for any other PS/2 mice? It may simply be a limitation of
>> the hardware.
>>
>
> Using a regular mouse with 3 buttons and a wheel there is no problem.
> All work fine. But it just got 3 buttons. I've got problems with a
> fourth button, so the PS/2 mouse doesn't show.
>
> Is there a hardwired limit to 3 buttons somewhere in the code?

No, but the 4th button of your TackMan requires Logitech's PS/2++
protocol extension which your USB converter is not likely to support.

I believe most of them speak bare, Intellimouse and Expolorer PS/2
protocols...

--
Dmitry

2009-10-27 06:33:46

by Harald Dunkel

[permalink] [raw]
Subject: Re: 2.6.31.4, ps2-to-usb adapter: fourth mouse button not working

On 10/24/09 19:19, Matthew Garrett wrote:
>
> usbmon will let you dump USB traffic.
>

Sorry for the delay.

This is what I got for pressing mouse buttons 1 to 4 (in this sequence):

ffff88011e462680 2851892632 C Ii:5:002:2 0:8 5 = 01010000 00
ffff88011e462680 2851892646 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2852236652 C Ii:5:002:2 0:8 5 = 01000000 00
ffff88011e462680 2852236661 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2853620738 C Ii:5:002:2 0:8 5 = 01020000 00
ffff88011e462680 2853620747 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2853868753 C Ii:5:002:2 0:8 5 = 01000000 00
ffff88011e462680 2853868761 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2854524793 C Ii:5:002:2 0:8 5 = 01040000 00
ffff88011e462680 2854524802 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2854772808 C Ii:5:002:2 0:8 5 = 01000000 00
ffff88011e462680 2854772816 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2855572857 C Ii:5:002:2 0:8 5 = 01000000 00
ffff88011e462680 2855572863 S Ii:5:002:2 -115:8 5 <
ffff88011e462680 2855892877 C Ii:5:002:2 0:8 5 = 01000000 00
ffff88011e462680 2855892882 S Ii:5:002:2 -115:8 5 <


The last 4 lines are for button 4. AFAICS it does create an event
on the USB line, but there is no special bit set in the bit mask (the
2nd last value on the "C" lines).

Is there some traffic that usbmon doesn't show yet?


Regards

Harri