Bug 1401764

Summary: libinput does not offer mouse acceleration options for device on ps2/usb converter.
Product: [Fedora] Fedora Reporter: Brian Daniels <bitmage>
Component: xorg-x11-drv-libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: hdegoede, peter.hutterer
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-05 22:15:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Brian Daniels 2016-12-06 02:50:01 UTC
Description of problem:
I have a Trackpoint keyboard attached to my system using a PS2/USB converter.  xinput recognizes it as a pointer device, but does not offer any "Device" options:

$ xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Composite USB PS2 Converter USB to PS2 Adaptor  V3.10     id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Composite USB PS2 Converter USB to PS2 Adaptor  V3.10     id=9    [slave  keyboard (3)]
    ↳ Composite USB PS2 Converter USB to PS2 Adaptor  V3.10     id=11   [slave  keyboard (3)]


$ xinput list-props "pointer:Composite USB PS2 Converter USB to PS2 Adaptor  V3.10"
Device 'Composite USB PS2 Converter USB to PS2 Adaptor  V3.10':
        Device Enabled (132):   1
        Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Accel Speed (268):     1.000000
        libinput Accel Speed Default (269):     0.000000
        libinput Accel Profiles Available (270):        1, 1
        libinput Accel Profile Enabled (271):   0, 0
        libinput Accel Profile Enabled Default (272):   1, 0
        libinput Natural Scrolling Enabled (273):       0
        libinput Natural Scrolling Enabled Default (274):       0
        libinput Send Events Modes Available (252):     1, 0
        libinput Send Events Mode Enabled (253):        0, 0
        libinput Send Events Mode Enabled Default (254):        0, 0
        libinput Left Handed Enabled (275):     0
        libinput Left Handed Enabled Default (276):     0
        libinput Scroll Methods Available (277):        0, 0, 1
        libinput Scroll Method Enabled (278):   0, 0, 0
        libinput Scroll Method Enabled Default (279):   0, 0, 0
        libinput Button Scrolling Button (280): 2
        libinput Button Scrolling Button Default (281): 274
        libinput Middle Emulation Enabled (282):        1
        libinput Middle Emulation Enabled Default (283):        0
        Device Node (255):      "/dev/input/event3"
        Device Product ID (256):        2873, 1
        libinput Drag Lock Buttons (284):       <no items>
        libinput Horizontal Scroll Enabled (257):       1

Using a different distro, the same command returns the Deceleration and other expected options:
Device 'Composite USB PS2 Converter USB to PS2 Adaptor  V3.10':
        Device Enabled (151):   1
        Coordinate Transformation Matrix (153): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (276):     0
        Device Accel Constant Deceleration (277):       1.000000
        Device Accel Adaptive Deceleration (278):       1.000000
        Device Accel Velocity Scaling (279):    10.000000
        Device Product ID (267):        2873, 1
        Device Node (268):      "/dev/input/event4"
        Evdev Axis Inversion (280):     0, 0
        Evdev Axes Swap (282):  0
        Axis Labels (283):      "Rel X" (161), "Rel Y" (162), "Rel Horiz Wheel" (274), "Rel Vert Wheel" (275)
        Button Labels (284):    "Button Left" (154), "Button Middle" (155), "Button Right" (156), "Button Wheel Up" (157), "Button Wheel Down" (158), "Button Horiz Wheel Left" (159), "Button Horiz Wheel Right" (160), "Button Side" (272), "Button Extra" (273), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270)
        Evdev Scrolling Distance (285): 1, 1, 1
        Evdev Middle Button Emulation (286):    1
        Evdev Middle Button Timeout (287):      50
        Evdev Third Button Emulation (288):     0
        Evdev Third Button Emulation Timeout (289):     1000
        Evdev Third Button Emulation Button (290):      3
        Evdev Third Button Emulation Threshold (291):   20
        Evdev Wheel Emulation (292):    0
        Evdev Wheel Emulation Axes (293):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (294):10
        Evdev Wheel Emulation Timeout (295):    200
        Evdev Wheel Emulation Button (296):     4
        Evdev Drag Lock Buttons (297):  0  

This prevents setting needed acceleration and other options for the device.
Removing xorg-x11-drv-libinput from the system allows the device to operate normally.

Comment 1 Peter Hutterer 2016-12-06 03:18:14 UTC
fwiw, this is expected as libinput handles the pointer acceleration for all devices and the server's acceleration handling does not initialise. This means the properties handled by the server are not available.

The libinput method of setting acceleration is to change the "libinput Accel Speed" property within the range of -1 (slowest) to +1 (fastest)

Comment 2 Brian Daniels 2016-12-07 03:02:45 UTC
That pretty much makes it unusable for my setup.  As you can see above, I have libinput Accel Speed set to 1 but the pointer response is still far too slow.

Are there other ways of configuring the response, or telling libinput to use the server acceleration handling (other than uninstalling libinput)?

Comment 3 Peter Hutterer 2016-12-07 04:10:13 UTC
not at this point, but this is a common problem for trackpoints. we have udev hwdb entries that fix this. have a look at /lib/udev/hwdb.d/70-pointingstick.hwdb, it has instructions on how to set POINTINGSTICK_CONST_ACCEL for your device, if you find something useful then we'll just add that to the hwdb.

for the const accel, you just reset the speed to 0 and then see what you need to get the pointer to move normally at 'normal' pressure (yes, it's hard to define...). take your preferences into account, if you usually like your speed a bit fast, please take that into account.

the top of the file has the instructions for how to test this locally.

Comment 4 Peter Hutterer 2017-09-05 22:15:15 UTC
fwiw, libinput git master has options to change the trackpoint speed now based on the range it provides which makes it possible to handle specific devices differently. But this would have to be fixed upstream, please submit a bug to the freedesktop bugzilla:
https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html

Note that it's not guaranteed that we can fix this in a generic way because using an adapter makes it impossible to detect the real device. So some local configuration will always be needed.


At least for current fedora, sticking with evdev for this device may be the best option.