Bug 1318937

Summary: Mouse setting ignored in kernel 4.6
Product: [Fedora] Fedora Reporter: Russel Winder <russel>
Component: xorg-x11-drv-mouseAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab, peter.hutterer, russel, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-16 23:25:31 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 Russel Winder 2016-03-18 08:18:55 UTC
Kernel 4.6 has reintroduced the ignoring of the mouse settings.

Even though I have setting set to right button as primary, this kernel is ignoring this and making the left button primary.

Comment 1 Russel Winder 2016-03-18 12:25:42 UTC
I may have misdiagnosed this. It appears it may be an XOrg/XWayland thing, and I had not checked which I was using. The default login appears to have changed a couple of times and is now back to XOrg rather XWayland.

Evidence now indicates that mouse button allocation is fine under XWayland and ignored using XOrg. So this is not a kernel thing but an X/Wayland thing.

Comment 2 Jan Kurik 2016-07-26 05:12:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 3 Russel Winder 2016-08-01 09:28:50 UTC
Still seems to be a problem on F26 Rawhide.

Comment 4 Peter Hutterer 2016-10-27 06:09:04 UTC
"right button as primary" means you enabled the left-handed option in GNOME? or how did you set it?

fwiw, the xorg-x11-drv-mouse driver has been removed two years ago

Comment 5 Russel Winder 2016-10-27 07:21:25 UTC
I think the idea of "left handed" and "right handed" mouse got removed from the mouse setting a while back – which is a good thing as some of use use mouse with either hand and switch the buttons around as and when. I cannot check on Rawhide specifically just now as I am away from home and in Debian Sid mode. I'll be more Rawhide specific when I get back. But from the GNOME perspective, yes I switch which button (left or right) is primary using the GNOME Settings | Mouse dialogue.

Another element to this is the buttons of the laptop trackpad vs the buttons of a USB attached mouse. Sometimes they behave the same and sometimes they are opposite. I would need to perform a more structured check of the current state to say anything definite on this.

Second week of November would be a good time for me to do something more int he way of proper data on this.

Comment 6 Peter Hutterer 2016-10-28 04:59:12 UTC
run xinput watch-props "<device name>" using the device name of your mouse (xinput list shows it). When you hit the gnome toggle button, does the left-handed property change? same goes for your touchpad, just substitute the touchpad name

Comment 7 Russel Winder 2016-11-14 12:54:28 UTC
I didn't do the xinput thing yet. I just tried a USB mouse and touchpad via the "Mouse & Touchpad" "Test your Settings" on a Lenovo ThinkPad X1 and it all seems to work fine with both XOrg login and Wayland login on Rawhide with kernel 4.9.0 rc4 git3.1. I need to try this on my main workstation though before being able to say it has stopped being an issue.

I didn't post this against xorg-x11-drv-mouse, that was a change made by Josh Boyer.

Comment 8 Russel Winder 2016-11-15 08:41:13 UTC
The problem persists running an Xorg login on my workstation. A Wayland login is fine.

No amount of fiddling with the settings in "Mouse & Touchpad settings changes anything. The "Primary Button" remains the left button, and the scrolling remains window rather than content. The initial out of the two commands are as below. The mouse properties remain unchanged no matter what clicking is going on.


|> xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech M525                           	id=8	[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)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳   USB Keyboard                          	id=9	[slave  keyboard (3)]
    ↳   USB Keyboard                          	id=10	[slave  keyboard (3)]


|> xinput watch-props "Logitech M525"
Device 'Logitech M525':
	Device Enabled (144):	1
	Coordinate Transformation Matrix (146):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (277):	0
	Device Accel Constant Deceleration (278):	1.000000
	Device Accel Adaptive Deceleration (279):	1.000000
	Device Accel Velocity Scaling (280):	10.000000
	Device Product ID (266):	1133, 16403
	Device Node (267):	"/dev/input/event4"
	Evdev Axis Inversion (281):	0, 0
	Evdev Axes Swap (283):	0
	Axis Labels (284):	"Rel X" (154), "Rel Y" (155), "Rel Horiz Wheel" (275), "Rel Vert Wheel" (276)
	Button Labels (285):	"Button Left" (147), "Button Middle" (148), "Button Right" (149), "Button Wheel Up" (150), "Button Wheel Down" (151), "Button Horiz Wheel Left" (152), "Button Horiz Wheel Right" (153), "Button Side" (270), "Button Extra" (271), "Button Forward" (272), "Button Back" (273), "Button Task" (274), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269), "Button Unknown" (269)
	Evdev Scrolling Distance (286):	1, 1, 1
	Evdev Middle Button Emulation (287):	0
	Evdev Middle Button Timeout (288):	50
	Evdev Third Button Emulation (289):	0
	Evdev Third Button Emulation Timeout (290):	1000
	Evdev Third Button Emulation Button (291):	3
	Evdev Third Button Emulation Threshold (292):	20
	Evdev Wheel Emulation (293):	0
	Evdev Wheel Emulation Axes (294):	0, 0, 4, 5
	Evdev Wheel Emulation Inertia (295):	10
	Evdev Wheel Emulation Timeout (296):	200
	Evdev Wheel Emulation Button (297):	4
	Evdev Drag Lock Buttons (298):	0

Comment 9 Russel Winder 2016-11-15 08:55:22 UTC
In contrast on the X1, which works fine, I have:

|> xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=9	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=10	[slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                        	id=11	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=14	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=15	[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)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=12	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=16	[slave  keyboard (3)]
    ↳ Logitech USB Receiver                   	id=17	[slave  keyboard (3)]


I have no idea if it is id=9 or id=10 that is the mouse, but as with the M525 on the workstation, it is a Logitech mouse (M187) attached via a USB device.



|> xinput watch-props 9
Device 'Logitech USB Receiver':
	Device Enabled (136):	1
	Coordinate Transformation Matrix (138):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Accel Speed (275):	-0.313653
	libinput Accel Speed Default (276):	0.000000
	libinput Accel Profiles Available (277):	1, 1
	libinput Accel Profile Enabled (278):	1, 0
	libinput Accel Profile Enabled Default (279):	1, 0
	libinput Natural Scrolling Enabled (280):	1
	libinput Natural Scrolling Enabled Default (281):	0
	libinput Send Events Modes Available (259):	1, 0
	libinput Send Events Mode Enabled (260):	0, 0
	libinput Send Events Mode Enabled Default (261):	0, 0
	libinput Left Handed Enabled (282):	1
	libinput Left Handed Enabled Default (283):	0
	libinput Scroll Methods Available (284):	0, 0, 1
	libinput Scroll Method Enabled (285):	0, 0, 0
	libinput Scroll Method Enabled Default (286):	0, 0, 0
	libinput Button Scrolling Button (287):	2
	libinput Button Scrolling Button Default (288):	274
	libinput Middle Emulation Enabled (289):	0
	libinput Middle Emulation Enabled Default (290):	0
	Device Node (262):	"/dev/input/event4"
	Device Product ID (263):	1133, 50479
	libinput Drag Lock Buttons (291):	<no items>
	libinput Horizontal Scroll Enabled (264):	1

|> xinput watch-props 10
Device 'Logitech USB Receiver':
	Device Enabled (136):	1
	Coordinate Transformation Matrix (138):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Natural Scrolling Enabled (280):	1
	libinput Natural Scrolling Enabled Default (281):	0
	libinput Send Events Modes Available (259):	1, 0
	libinput Send Events Mode Enabled (260):	0, 0
	libinput Send Events Mode Enabled Default (261):	0, 0
	Device Node (262):	"/dev/input/event5"
	Device Product ID (263):	1133, 50479
	libinput Drag Lock Buttons (291):	<no items>
	libinput Horizontal Scroll Enabled (264):	1


Device 10 responded to changes in natural scrolling button but not to changes of left and right button as primary.  Device 9 responded to both changes of natural scrolling and changes of primary button.

Comment 10 Russel Winder 2016-11-15 08:55:40 UTC
In contrast on the X1, which works fine, I have:

|> xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=9	[slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                   	id=10	[slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                        	id=11	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=14	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=15	[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)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=12	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=16	[slave  keyboard (3)]
    ↳ Logitech USB Receiver                   	id=17	[slave  keyboard (3)]


I have no idea if it is id=9 or id=10 that is the mouse, but as with the M525 on the workstation, it is a Logitech mouse (M187) attached via a USB device.



|> xinput watch-props 9
Device 'Logitech USB Receiver':
	Device Enabled (136):	1
	Coordinate Transformation Matrix (138):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Accel Speed (275):	-0.313653
	libinput Accel Speed Default (276):	0.000000
	libinput Accel Profiles Available (277):	1, 1
	libinput Accel Profile Enabled (278):	1, 0
	libinput Accel Profile Enabled Default (279):	1, 0
	libinput Natural Scrolling Enabled (280):	1
	libinput Natural Scrolling Enabled Default (281):	0
	libinput Send Events Modes Available (259):	1, 0
	libinput Send Events Mode Enabled (260):	0, 0
	libinput Send Events Mode Enabled Default (261):	0, 0
	libinput Left Handed Enabled (282):	1
	libinput Left Handed Enabled Default (283):	0
	libinput Scroll Methods Available (284):	0, 0, 1
	libinput Scroll Method Enabled (285):	0, 0, 0
	libinput Scroll Method Enabled Default (286):	0, 0, 0
	libinput Button Scrolling Button (287):	2
	libinput Button Scrolling Button Default (288):	274
	libinput Middle Emulation Enabled (289):	0
	libinput Middle Emulation Enabled Default (290):	0
	Device Node (262):	"/dev/input/event4"
	Device Product ID (263):	1133, 50479
	libinput Drag Lock Buttons (291):	<no items>
	libinput Horizontal Scroll Enabled (264):	1

|> xinput watch-props 10
Device 'Logitech USB Receiver':
	Device Enabled (136):	1
	Coordinate Transformation Matrix (138):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Natural Scrolling Enabled (280):	1
	libinput Natural Scrolling Enabled Default (281):	0
	libinput Send Events Modes Available (259):	1, 0
	libinput Send Events Mode Enabled (260):	0, 0
	libinput Send Events Mode Enabled Default (261):	0, 0
	Device Node (262):	"/dev/input/event5"
	Device Product ID (263):	1133, 50479
	libinput Drag Lock Buttons (291):	<no items>
	libinput Horizontal Scroll Enabled (264):	1


Device 10 responded to changes in natural scrolling button but not to changes of left and right button as primary.  Device 9 responded to both changes of natural scrolling and changes of primary button.

Comment 11 Peter Hutterer 2016-11-15 21:51:08 UTC
GNOME has dropped support for the legacy input drivers except for the new one with libinput. On the X1 you have xorg-x11-drv-libinput, on the other ones you have evdev and probably synaptics for the touchpad. Install xorg-x11-drv-libinput and the problem should go away. If not, check whether you have a custom xorg.conf.d snippet that assigns the evdev driver to the mouse and remove that.

Comment 12 Russel Winder 2016-11-16 06:50:36 UTC
Peter,

Your analysis turns out to be spot on (which you expected :-). I do not have any extras in xorg.conf.d, but the X201, T500 and workstation did not have libinput just evdev and synaptics. As you predicted install libinput and it works as required.

Should I leave evdev and synaptics installed?

Thank you for sorting my machines out, much appreciated. Though I suspect I will now be trying to use the Wayland login rather than the XOrg login now that it has returned as the default in Rawhide.

It is comforting that this was just a plugin error, but on the other hand might there be a problem with package dependencies leading up to this?

Comment 13 Peter Hutterer 2016-11-16 23:25:31 UTC
We've installed libinput by default for a couple of releases now but there are systems that were upgraded from before F22 (iirc) and they may have it missing. For F26 any install of xorg-x11-drv-synaptics will be replaced by xorg-x11-drv-libinput. So there may be a few leftovers like yours until then but it'll go away over time.