Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1421439 - Logitech Marble Mouse: No middle paste emulation in Wayland (works in X)
Logitech Marble Mouse: No middle paste emulation in Wayland (works in X)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libinput (Show other bugs)
25
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Hutterer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-12 06:00 EST by eagleton
Modified: 2017-03-09 08:23 EST (History)
5 users (show)

See Also:
Fixed In Version: libinput-1.6.2-3.fc25
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-09 08:23:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 99845 None None None 2017-02-16 20:07 EST

  None (edit)
Description eagleton 2017-02-12 06:00:53 EST
Description of problem:
The Logitech Marble Mouse has no scrollwheel. Using X, it is possible to get middle click emulation, but there is no obvious way to get this with Wayland.

Additional info:
http://forums.fedoraforum.org/showthread.php?t=312288
Comment 1 mjvaisane 2017-02-12 23:30:41 EST
I have tested this by trying to change dconf setting /org/gnomedesktop/peripherals/trackball/scroll-wheel-emulation-button to different value (I have tried all possible numbers from 3 to 9). But that setting does not seem to have any effect
Comment 2 Peter Hutterer 2017-02-13 17:45:19 EST
I'll need the pid/vid for this device, simplest way: attach the output from sudo evemu-describe please.

also the udevadm info output, because I'm pretty sure this one doesn't get tagged as a trackball with that name.

we'll need a hwdb entry for this device and then add code to libinput to enable middle button emulation by default. That's what we already do on devices without middle buttons anyway, I suspect in this case the device just says it has one when it really doesn't.

scroll-wheel-emulation-button: that setting is for button-based scrolling and has no effect on middle button behaviour.
Comment 3 mjvaisane 2017-02-14 00:49:32 EST
evemu-describe

Available devices:
/dev/input/event0:	Lid Switch
/dev/input/event1:	Sleep Button
/dev/input/event2:	Power Button
/dev/input/event3:	AT Translated Set 2 keyboard
/dev/input/event4:	SynPS/2 Synaptics TouchPad
/dev/input/event5:	TPPS/2 IBM TrackPoint
/dev/input/event6:	Video Bus
/dev/input/event8:	Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event9:	Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event10:	Logitech USB Trackball
/dev/input/event11:	C-Media Electronics Inc. ThinkPad OneLink Pro Dock Audio
/dev/input/event12:	ThinkPad Extra Buttons
/dev/input/event13:	HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event14:	HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event15:	HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event16:	HDA Intel PCH Mic
/dev/input/event17:	HDA Intel PCH Headphone
/dev/input/event18:	Integrated Camera


udevadm info /dev/input/event10

P: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.2/1-3.1.2:1.0/0003:046D:C408.0014/input/input34/event10
N: input/event10
S: input/by-id/usb-Logitech_USB_Trackball-event-mouse
S: input/by-path/pci-0000:00:14.0-usb-0:3.1.2:1.0-event-mouse
E: DEVLINKS=/dev/input/by-path/pci-0000:00:14.0-usb-0:3.1.2:1.0-event-mouse /dev/input/by-id/usb-Logitech_USB_Trackball-event-mouse
E: DEVNAME=/dev/input/event10
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.2/1-3.1.2:1.0/0003:046D:C408.0014/input/input34/event10
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_MODEL=USB_Trackball
E: ID_MODEL_ENC=USB\x20Trackball
E: ID_MODEL_ID=c408
E: ID_PATH=pci-0000:00:14.0-usb-0:3.1.2:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_3_1_2_1_0
E: ID_REVISION=1400
E: ID_SERIAL=Logitech_USB_Trackball
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Logitech
E: ID_VENDOR_ENC=Logitech
E: ID_VENDOR_ID=046d
E: LIBINPUT_DEVICE_GROUP=3/46d/c408/110:usb-0000:00:14.0-3.1
E: LIBINPUT_MODEL_TRACKBALL=1
E: MAJOR=13
E: MINOR=74
E: SUBSYSTEM=input
E: USEC_INITIALIZED=30144457462
Comment 4 Peter Hutterer 2017-02-14 17:14:21 EST
you forgot to select the event node in evemu-describe, that's just the list of devices :)
Comment 5 mjvaisane 2017-02-15 00:54:56 EST
Oh sorry :)

# EVEMU 1.3
# Kernel: 4.9.8-201.fc25.x86_64
# DMI: dmi:bvnLENOVO:bvrN14ET38W(1.16):bd12/07/2016:svnLENOVO:pn20BS003LMS:pvrThinkPadX1Carbon3rd:rvnLENOVO:rn20BS003LMS:rvrSDK0E50510WIN:cvnLENOVO:ct10:cvrNone:
# Input device name: "Logitech USB Trackball"
# Input device ID: bus 0x03 vendor 0x46d product 0xc408 version 0x110
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#   Event type 1 (EV_KEY)
#     Event code 272 (BTN_LEFT)
#     Event code 273 (BTN_RIGHT)
#     Event code 274 (BTN_MIDDLE)
#     Event code 275 (BTN_SIDE)
#     Event code 276 (BTN_EXTRA)
#   Event type 2 (EV_REL)
#     Event code 0 (REL_X)
#     Event code 1 (REL_Y)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
# Properties:
N: Logitech USB Trackball
I: 0003 046d c408 0110
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 1f 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 03 00 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
Comment 6 Fedora Update System 2017-02-21 18:22:44 EST
libinput-1.6.2-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-67d4fc728f
Comment 7 mjvaisane 2017-02-22 01:56:14 EST
After installing this update manually, middle click emulation seems to work by using both 1 and 3 mouse buttons simultaneously.
Comment 8 Peter Hutterer 2017-02-22 02:01:39 EST
thanks!
Comment 9 eagleton 2017-02-22 04:44:48 EST
Awesome, it's working! It's even better than under X, where you needed a config file. I submitted a Karma point for this.
Comment 10 Fedora Update System 2017-02-22 16:08:55 EST
libinput-1.6.2-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-67d4fc728f
Comment 11 Jens Lody 2017-02-23 19:01:39 EST
I just gave negative karma, because middle-mouse-button-emulation does not work for me under wayland and additionaly the scroll-wheel-emulation under x is broken.
Downgrading to 1.6.0-2 makes scroll-wheel-emulation under x work again.
Note: to make it work under x I use the following script:

#!/bin/sh
xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9
xinput set-prop "Logitech USB Trackball" "libinput Button Scrolling Button" 8

The script has to be run in a running x-session once after the trackball (mouse) is plugged in.
Comment 12 Peter Hutterer 2017-02-23 23:53:10 EST
What's the output of libinput-list-devices. And what is the output of libinput-debug-events --verbose when you press the l+r button on the trackball?
That should narrow down where the bug is.

Run it with libinput-debug-events --set-scroll-method=button --set-scroll-button=BTN_SIDE --verbose and check if the button scrolling works (I think BTN_SIDE is what the device has, pls verify with evemu-record)

(In reply to Jens Lody from comment #11)
> xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9

this maps the middle button to button 8 and physical button 4 to middle. So with middle button emulation enabled, that would now generate "back" while button 4 would generate a middle click. This is what you intended?
Comment 13 Jens Lody 2017-02-24 03:03:47 EST
The button mapping worked for my normal usecase (I never use the back-button of the mouse), but any way I slightly changed it now to be:
xinput set-button-map "Logitech USB Trackball" 1 9 3 4 5 6 7 2 8

This makes left and right-button behave normally, BTN_SIDE (the little left-button) is the middle-button, if clicked and used to emulate the mouse-wheel together with the ball if hold. The little right-button (BTN_EXTRA) is now the back-button.
All this only works with 1.6.0 and the mapping-script.

I put a tar-ball with all possible variants of libinput-list-devices and libinput-debug-events on my site: https://rpm.jenslody.de/libinput/libinput.tar.xz

The device-list is always the same for all variants with 1.6.0 and and all variants 1.6.2 (as expected), but differs between the versions.
For the debug-events, I always pressed all buttons from left to right once, the moved the cursor, clicked left, moved the cursor again, then pressed BTN_SIDE and moved the ball again (should be wheel emulation).
Comment 14 Peter Hutterer 2017-02-26 20:00:02 EST
fwiw, libinput-* commands aren't affected by anything in X/Wayland, they run in their separate libinput context and always provide the same results. Think of it more like running cat on a read-only file, it doesn't matter which text editor you have it open in already. 

ok, log file analysis of the libinput-list-devices:
* 1.6.0 has middle button emulation config disabled but available, 1.6.2 has the config non-available. That is intended, libinput 1.6.2 doesn't expose the config option anymore, MB emulation is always on.
* 1.6.0 has scroll method button enabled by default, 1.6.2 has it disabled by default. That is intended, previously the device announced a middle button (it didn't have) and enabled button-scroll on middle button.

that's for the wayland logs, what is strange is that some xorg logs have different values - and that cannot be, see first paragraph. I wonder if you ran the commands in the wrong order between downgrading? The 1.6.2 'mapped' xorg output shows the 1.6.0 output.

Anyway, the wayland/1.6.2/no-mapping/libinput_debug_events file shows that it's working, based on your description. middle button emulation is present but since you're not triggering it by pressing l+r simultaneously it just passes through. button scrolling works and generates axis events.

Since the device does not have announce a physical middle button after the 1.6.2 patch set, libinput defaults to button 0 as scroll wheel emulation button (i.e. it needs to be configured and enabled). That's probably the wayland issue now, you would need to set org.gnome.desktop.peripherals.trackball scroll-wheel-emulation-button for button scrolling to work.  The same applies to X (and that is what your script does). 

Given that we already have model-specific quirks for this device this seems like something we might as well ship by default.

but now I'm wondering if we talk about the same thing... "middle button emulation" has a very specific meaning [1] and based on the above I'm wondering if you talk about button mapping instead?

[1] https://wayland.freedesktop.org/libinput/doc/latest/middle_button_emulation.html
Comment 15 Jens Lody 2017-02-27 09:02:43 EST
I just reverted my negative karma, because the driver works as described.
To think that the middle-mouse-button-emulation is not working, was my mistake, sorry for the noise.

I'm used to map middle-mous-button to the left extra-button, but this does not work under wayland.
And the scrollwheel-emulation does not work under x and wayland.
I can change the value of "org.gnome.desktop.peripherals.trackball scroll-wheel-emulation-button" to any of the allowed values, but scroll-wheel-emulation does not work.

By the way is there a way to map buttons under wayland as it was possible with xinput ?
Comment 16 Peter Hutterer 2017-02-27 17:06:04 EST
(In reply to Jens Lody from comment #15)
> I just reverted my negative karma, because the driver works as described.
> To think that the middle-mouse-button-emulation is not working, was my
> mistake, sorry for the noise.

thanks!

> I'm used to map middle-mous-button to the left extra-button, but this does
> not work under wayland.

button mapping beyond the physical button set is out of scope for libinput, that is part of the compositor's functionality. so this is something that mutter would have to provide.

> And the scrollwheel-emulation does not work under x and wayland.
> I can change the value of "org.gnome.desktop.peripherals.trackball
> scroll-wheel-emulation-button" to any of the allowed values, but
> scroll-wheel-emulation does not work.

does it work with the xinput commands though? specifically, you need to enable it and set the scroll button correctly because the current defaults in libinput have it effectively disabled. Specifically:
xinput set-prop "device name" "libinput Scroll Method Enabled" 0 0 1
xinput set-prop "device name" "libinput Button Scrolling Button" 8

to have button 8 as scroll button. If it works setting these things manually, then the issue is in the gnome stack and we can continue there.
 
> By the way is there a way to map buttons under wayland as it was possible
> with xinput ?

see above, that's a compositor-specific functionality, so if anything it'd be in gsettings somewhere. That does not however exist just yet.
Comment 17 Jens Lody 2017-02-27 17:47:52 EST
(In reply to Peter Hutterer from comment #16)
> (In reply to Jens Lody from comment #15)
> > I just reverted my negative karma, because the driver works as described.
> > To think that the middle-mouse-button-emulation is not working, was my
> > mistake, sorry for the noise.
> 
> thanks!
> 
> > I'm used to map middle-mous-button to the left extra-button, but this does
> > not work under wayland.
> 
> button mapping beyond the physical button set is out of scope for libinput,
> that is part of the compositor's functionality. so this is something that
> mutter would have to provide.
> 
> > And the scrollwheel-emulation does not work under x and wayland.
> > I can change the value of "org.gnome.desktop.peripherals.trackball
> > scroll-wheel-emulation-button" to any of the allowed values, but
> > scroll-wheel-emulation does not work.
> 
> does it work with the xinput commands though? specifically, you need to
> enable it and set the scroll button correctly because the current defaults
> in libinput have it effectively disabled. Specifically:
> xinput set-prop "device name" "libinput Scroll Method Enabled" 0 0 1
> xinput set-prop "device name" "libinput Button Scrolling Button" 8
> 
> to have button 8 as scroll button. If it works setting these things
> manually, then the issue is in the gnome stack and we can continue there.
>  
Yes it works fine with xinput and "Scroll Method Enabled" in X.
Many thanks !

It does not work in wayland, because xinput does not see the trackball, but I guess that is expected with xinput under wayland.

> > By the way is there a way to map buttons under wayland as it was possible
> > with xinput ?
> 
> see above, that's a compositor-specific functionality, so if anything it'd
> be in gsettings somewhere. That does not however exist just yet.
Comment 19 Fedora Update System 2017-03-06 19:18:30 EST
libinput-1.6.2-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-89f8404bd9
Comment 20 Fedora Update System 2017-03-07 09:22:31 EST
libinput-1.6.2-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-89f8404bd9
Comment 21 Fedora Update System 2017-03-09 08:23:02 EST
libinput-1.6.2-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.