Bug 105667 - Xfce mouse settings do not apply to wireless mouse after commit 6d3bd4544a
Summary: Xfce mouse settings do not apply to wireless mouse after commit 6d3bd4544a
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-21 19:53 UTC by Evangelos Foutras
Modified: 2018-03-22 01:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Output of `libinput list-devices` (pointer devices only) (1.33 KB, text/plain)
2018-03-21 19:53 UTC, Evangelos Foutras
no flags Details
Device settings in xfce4-mouse-settings with xf86-input-libinput 0.26.0 (top) and 0.27.0 (bottom) (130.77 KB, image/png)
2018-03-21 19:56 UTC, Evangelos Foutras
no flags Details
evemu-record output (mouse) (45.90 KB, text/plain)
2018-03-21 22:40 UTC, Evangelos Foutras
no flags Details
evemu-record output (receiver) (6.67 KB, text/plain)
2018-03-21 22:40 UTC, Evangelos Foutras
no flags Details
[PATCH xf86-input-libinput] Fix "left handed" property not set on all pointers (972 bytes, patch)
2018-03-22 00:05 UTC, Evangelos Foutras
no flags Details | Splinter Review

Description Evangelos Foutras 2018-03-21 19:53:38 UTC
Created attachment 138258 [details]
Output of `libinput list-devices` (pointer devices only)

After upgrading to xf86-input-libinput 0.27.0 I noticed that my mouse was moving quicker than usual. A git bisect pointed to [1] as the first commit with this behavior. If I comment out the "if (prop_left_handed != 0) return" added part, I get the old (and desired) behavior.

If there is not anything obviously wrong with commit 6d3bd4544a, I can try to provide more information (not sure what would be useful though). Now, this might indicate that xfce4-settings needs a tweak to work with xf86-input-libinput 0.27.0; I'm not entirely sure where the bug lies.

In xfce4-mouse-settings I see two device entries for the wireless mouse, behaving as follows:

1) With xf86-input-libinput 0.26.0:

- The first "Logitech USB Receiver" device shows the correct acceleration value.
- The second one (with the "Sensitivity" option) always shows "Acceleration: 2.0" and "Sensitivity: 1 px". Changing the acceleration setting, however, does affect the pointer speed.

2) With xf86-input-libinput 0.27.0:

- The first "Logitech USB Receiver" device always shows "Acceleration: 5.0" (should be 2.0).
- The second one still shows "Acceleration: 2.0" and "Sensitivity: 1 px".
- Updating the acceleration value of either device has no effect on the pointer speed.

Attached is the output from `libinput list-devices` (only the pointer devices). The first one is the wired mouse (which works correctly!); the last two are the wireless mouse and its receiver. I'm also using the following software versions:

  libinput 1.10.3-1
  xf86-input-libinput 0.27.0-1
  xorg-server 1.19.6+13+gd0d1a694f-1
  xfce4-settings 4.12.3-1

[1] https://cgit.freedesktop.org/xorg/driver/xf86-input-libinput/commit/?id=6d3bd4544a
Comment 1 Evangelos Foutras 2018-03-21 19:56:39 UTC
Created attachment 138259 [details]
Device settings in xfce4-mouse-settings with xf86-input-libinput 0.26.0 (top) and 0.27.0 (bottom)
Comment 2 Peter Hutterer 2018-03-21 22:26:20 UTC
Attach an evemu-record of some short 1-2s mouse movement for both logitech event nodes please, thanks.
Comment 3 Evangelos Foutras 2018-03-21 22:40:22 UTC
Created attachment 138263 [details]
evemu-record output (mouse)
Comment 4 Evangelos Foutras 2018-03-21 22:40:36 UTC
Created attachment 138264 [details]
evemu-record output (receiver)
Comment 5 Evangelos Foutras 2018-03-21 23:25:42 UTC
I think the problem might be that xf86-input-libinput 0.27.0 no longer sets the LIBINPUT_PROP_LEFT_HANDED property (due to the "if (prop_left_handed != 0) return" conditional?).

xfce4-settings seems to look for it in order to know if libinput is used: https://git.xfce.org/xfce/xfce4-settings/tree/xfsettingsd/pointers.c?h=xfce4-settings-4.12.3#n236

A diff of `xinput list-props <mouse-devid>` between 0.26.0 and 0.27.0 shows:

$ diff -up <(sed 's/(2..)/(2xx)/' mouse-0.26.0-props.txt | sort) <(sed 's/(2..)/(2xx)/' mouse-0.27.0-props.txt | sort)
--- /dev/fd/63	2018-03-22 01:19:17.060693397 +0200
+++ /dev/fd/62	2018-03-22 01:19:17.061693423 +0200
@@ -6,14 +6,12 @@ Device 'Logitech USB Receiver':
 	libinput Accel Profile Enabled (2xx):	1, 0
 	libinput Accel Profile Enabled Default (2xx):	1, 0
 	libinput Accel Profiles Available (2xx):	1, 1
-	libinput Accel Speed (2xx):	-0.600000
+	libinput Accel Speed (2xx):	0.000000
 	libinput Accel Speed Default (2xx):	0.000000
 	libinput Button Scrolling Button (2xx):	2
 	libinput Button Scrolling Button Default (2xx):	2
 	libinput Drag Lock Buttons (2xx):	<no items>
 	libinput Horizontal Scroll Enabled (2xx):	1
-	libinput Left Handed Enabled (2xx):	0
-	libinput Left Handed Enabled Default (2xx):	0
 	libinput Middle Emulation Enabled (2xx):	0
 	libinput Middle Emulation Enabled Default (2xx):	0
 	libinput Natural Scrolling Enabled (2xx):	0
Comment 6 Peter Hutterer 2018-03-21 23:39:21 UTC
Yeah, that condition seems like detritus left over from testing, can't think of why this would be there. And it would have that effect, only the first pointer-like device will get the left-handed property, everything else misses out. Can you create a git-formatted patch for removing that condition please, I'll get it upstream, thanks.
Comment 7 Evangelos Foutras 2018-03-21 23:40:33 UTC
Yay, that must be it! I manually re-added the property and xfce4-mouse-settings is working again. (I should also mention that the receiver node didn't see a change in properties, only the mouse node.)

It worked right away after doing the following, without restarting X:

  $ xinput set-prop 9 --type=int --format=8 "libinput Left Handed Enabled" 0

I'm not sure what the reasoning is behind the addition of "if (prop_left_handed != 0) return", but is it possible to restore the old behavior of always setting LIBINPUT_PROP_LEFT_HANDED?
Comment 8 Evangelos Foutras 2018-03-21 23:43:05 UTC
(In reply to Peter Hutterer from comment #6)
> Yeah, that condition seems like detritus left over from testing, can't think
> of why this would be there. And it would have that effect, only the first
> pointer-like device will get the left-handed property, everything else
> misses out. Can you create a git-formatted patch for removing that condition
> please, I'll get it upstream, thanks.

Sure, one patch coming right up.

Pretty sure I'll spend half the time trying not to write a silly commit message (due to unfamiliarity with this stuff). I suppose you can fix any obvious issues with it though!
Comment 9 Evangelos Foutras 2018-03-22 00:05:27 UTC
Created attachment 138265 [details] [review]
[PATCH xf86-input-libinput] Fix "left handed" property not set on all pointers

I have successfully tested the attached patch on top of xf86-input-libinput 0.27.0. Thank you for the quick follow up and confirmation on what the issue might be!
Comment 10 Peter Hutterer 2018-03-22 01:00:47 UTC
pushed, thanks.

commit 0db82219bb2ad10dcdf3ea8fe8e226858190c83b
Author: Evangelos Foutras <>
Date:   Thu Mar 22 01:47:07 2018 +0200

     Fix "left handed" property not set on all pointers


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.