Bug 24647 - cannot configure PS2 mouse connected to USB adapter
Summary: cannot configure PS2 mouse connected to USB adapter
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: 7.4 (2008.09)
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 13:41 UTC by Harri
Modified: 2009-10-21 16:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xserver log file (3.92 KB, application/gzip)
2009-10-20 13:41 UTC, Harri
no flags Details
xorg.conf (1.09 KB, application/gzip)
2009-10-20 13:47 UTC, Harri
no flags Details
Xorg.4.log (16.02 KB, text/plain)
2009-10-20 17:30 UTC, Peter Hutterer
no flags Details

Description Harri 2009-10-20 13:41:21 UTC
Created attachment 30592 [details]
xserver log file

I have connected a Logitech Trackman FX to a Chesen PS/2 to USB adapter. The adapter can be used to plugin both PS/2 mouse and keyboard into a single USB port. I am using just the mouse port, since my keyboard takes too much power for USB.

Problem: The scroll wheel emulation for the Trackman cannot be configured. Here is the policy file for hal:

<deviceinfo version="0.2">
        <device>
                <match key="info.product" string="CHESEN PS2 to USB Converter">
                        <merge key="input.x11_options.Buttons" type="string">9</merge>
                        <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
                        <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
                        <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4 5 6 7 8 9</merge>
                        <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
                        <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
                        <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
                        <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
                </match>
        </device>
</deviceinfo>

AFAICS it is correct. A similar policy file for a PC with a "real" PS/2 mouse interface works as expected (using the same Trackman).

Attached is the Xorg.log file. Please note that the Chesen device is configured as keyboard(!), even though the keyboard is not connected to it.
Comment 1 Harri 2009-10-20 13:47:32 UTC
Created attachment 30593 [details]
xorg.conf

Here is the xorg.conf file. AFAICS the mouse configuration in xorg.conf is ignored.
Comment 2 Peter Hutterer 2009-10-20 17:30:46 UTC
Created attachment 30597 [details]
Xorg.4.log

Please don't upload gz files. It requires every interested party to download the attachment, unzip it, look at it and remember where it was next time they look at the bug (or repeat the process). Time that could be better spent looking at actual bug. Log files should simply be attached as text/plain.
Comment 3 Peter Hutterer 2009-10-20 17:36:21 UTC
the options are recognised by the driver, so that seems in order.
do you see a button 8 event when you press the matching button? (try with xev)

run xinput --list --short to get the device id for the adapter, then run
xinput --list-props <deviceid>. What's the output of that?

Does it list the right values for emulation?
Comment 4 Harri 2009-10-20 21:04:08 UTC
Sorry about the *.gz files.

xev shows no event for pressing "button 8". Using the same Trackman on another PC with a dedicated PS/2 interface the button works, of course.

% xinput --list --short
"Virtual core pointer"  id=0    [XPointer]
"Virtual core keyboard" id=1    [XKeyboard]
"CHESEN PS2 to USB Converter"   id=2    [XExtensionKeyboard]
"AT Translated Set 2 keyboard"  id=3    [XExtensionKeyboard]
"CHESEN PS2 to USB Converter"   id=4    [XExtensionKeyboard]
"Power Button"  id=5    [XExtensionKeyboard]
"Power Button"  id=6    [XExtensionKeyboard]

%  xinput --list-props 2
Device 'CHESEN PS2 to USB Converter':
        Device Enabled (93):    1
        Evdev Reopen Attempts (228):    10
        Evdev Axis Inversion (229):     0, 0
        Evdev Axis Calibration (230):
        Evdev Axes Swap (231):  0
        Evdev Middle Button Emulation (232):    0
        Evdev Middle Button Timeout (233):      50
        Evdev Wheel Emulation (234):    1
        Evdev Wheel Emulation Axes (235):       6, 7, 4, 5
        Evdev Wheel Emulation Inertia (236):    10
        Evdev Wheel Emulation Timeout (237):    300
        Evdev Wheel Emulation Button (238):     8
        Evdev Drag Lock Buttons (239):  0

% xinput --list-props 4
Device 'CHESEN PS2 to USB Converter':
        Device Enabled (93):    1
        Evdev Reopen Attempts (228):    10

% xinput --list-props 3
Device 'AT Translated Set 2 keyboard':
        Device Enabled (93):    1
        Evdev Reopen Attempts (228):    10

Please note the wheel emulation button is set to 8. AFAICS this is defined in the hal policy.
Comment 5 Harri 2009-10-20 21:10:31 UTC
PS: If I remove the Trackman policy file and restart, then I get

% xinput --list --short
"Virtual core pointer"  id=0    [XPointer]
"Virtual core keyboard" id=1    [XKeyboard]
"CHESEN PS2 to USB Converter"   id=2    [XExtensionKeyboard]
"Power Button"  id=3    [XExtensionKeyboard]
"AT Translated Set 2 keyboard"  id=4    [XExtensionKeyboard]
"CHESEN PS2 to USB Converter"   id=5    [XExtensionKeyboard]
"Power Button"  id=6    [XExtensionKeyboard]

% xinput --list-props 2
Device 'CHESEN PS2 to USB Converter':
        Device Enabled (93):    1
        Evdev Reopen Attempts (228):    10
        Evdev Axis Inversion (229):     0, 0
        Evdev Axis Calibration (230):
        Evdev Axes Swap (231):  0
        Evdev Middle Button Emulation (232):    0
        Evdev Middle Button Timeout (233):      50
        Evdev Wheel Emulation (234):    0
        Evdev Wheel Emulation Axes (235):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (236):    10
        Evdev Wheel Emulation Timeout (237):    200
        Evdev Wheel Emulation Button (238):     4
        Evdev Drag Lock Buttons (239):  0

xev is still silent about the wheel emulation button.
Comment 6 Peter Hutterer 2009-10-20 21:11:55 UTC
(In reply to comment #4)
> xev shows no event for pressing "button 8". Using the same Trackman on another
> PC with a dedicated PS/2 interface the button works, of course.

ok, next step then:
download http://people.freedesktop.org/~whot/evtest.c, compile it and run it against the /dev/input/eventX device file (as root). you can get which eventX file to pick from /proc/bus/input/devices.
Do you see an event there?
Comment 7 Harri 2009-10-21 10:00:38 UTC
No, button 8 doesn't trigger any events. All the other buttons work.
Comment 8 Peter Hutterer 2009-10-21 16:10:18 UTC
ok, this isn't a bug then, at least not in X.

evtest listens to the events straight from the kernel, if no event is seen there then we never get it. The issue is either in the kernel or a hardware issue with the USB adapter. My bet is on the adapter thingy since it works fine if you plug it in directly. Sorry.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.