Bug 101299

Summary: Touchpad multitouch (Synaptics / touchegg + libinput / libinput gestures) not working, but should be capable according to device props
Product: Wayland Reporter: nokodemus86
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Touchpad device Output, Touchpad device props output, xOrg installed Versions, xOrg.0.log

Description nokodemus86 2017-06-05 08:26:34 UTC
Created attachment 131705 [details]
Touchpad device Output, Touchpad device props output, xOrg installed Versions, xOrg.0.log

Hi guys :)

First of all i'd like to mention, that i'm using Linux (Mint 18) for the first 2 weeks and at the moment i'm checking different functionalities compared to Windows. Probably i'll be able to completely switch to Linux some day :)

One of the functionalities i'd like to keep is swiping functionality of touchpad, especially the back/forward swipe for browsing would be important to me.

As the touchpad didn't support this out of the box i researched a little and the first tried touchegg. But couldn't get it to work.
After a little more research i read that touchegg might not be able to work any more due to some recent Linux Mint and/or Ubuntu Changes.

After further research i switched to libinput and libinput gestures.
Unfortunately without success regarding multitouch and/or swiping.

Meanwhile i restored my (mostly) fresh install image, which i backupped before Touchpad trial and error.

I'd also like to share some (probably?) important information and outputs which i discovered and tried during research. I'll attach that stuff and if there's any more useful information i could share, please tell me ;-)

Thank you very much in advance, greets :)
Comment 1 Peter Hutterer 2017-06-06 04:10:45 UTC
you're still using the synaptics driver which doesn't do gestures. libinput does, but it merely passes on the recognised gestures to the next layer. in the case of Wayland, that's the compositor and some compositors support touchpad gestures. In the case of X, no touchpad gestures are available, so this won't work directly in X without some other tool.

touchegg is one of those, but I don't know how it works in detail, sorry.
libinput-gestures depends on libinput, but again it's plugged on top and if it doesn't work, I'm not sure I can help much.

run sudo libinput-debug-events and do a swipe/pinch. If it's recognised by libinput, you'll see output on the commandline to that effect. But: this line in your data "B: PROP=9" suggests that your device is a semi-mt device (sudo evemu-record will print it in human-readable form).

Unfortunately, those semi-mt devices are unreliable and on those we don't do multi-finger detection beyond two-finger scrolling and tapping (iirc). basically, the data gets unreliably bad when there's more than one finger down. There may be room for doing some on your device, but it'd require some effort from you to identify what is actually possible and how far we can get.
Comment 2 nokodemus86 2017-06-06 12:31:20 UTC
Hi there :-)

Thank you very much for your reply and all the useful information. And for editing the correct Bug specs of course.

I switched back to libinput again. So the Wayland package of libinput should be used, right?
I'm not sure if i am getting the stuff regarding different compositors right.
Do you mean there are different compositor versions of libinput or just of input packages in general? (like synaptics, libinput ... )

After uninstalling synaptics and re-installing libinput again, "dpkg -l" is showing up this input package:
ii  xserver-xorg-input-libinp 0.18.0-1        amd64 
X.Org X server -- libinput input driver


That's correct, isn't it?
------------------------------------

I'd also like to clear things up a little bit.
Multitouch in sense of 2-Finger-Swipes is working fine out of the box, no matter if i use synaptics or libinput, each one without any additional gesture-mapping tool like touchegg oder libinput gestures.

Just Pinching and / or 3 or more - finger gestures aren't recognized.
Touchpad debug also is telling the coordinates absolutely fine on 2-finger swipes. 

But on pinching or 3+ - Finger swipes i'm getting following output:
libinput error: libinput bug: Event for missing capability CAP_GESTURE on device "AlpsPS/2 ALPS GlidePoint"


To be honest, it would already be great if i could at least map ALT+left/ALT+right (Browser back/forward) to the 2-finger horizontal swipe. 
In my case there's no need for horizontal scrolling using touchpad.

Do you think there could be a chance of at least realizing this?
For sure i'm absolutely happy to help with any information you need. At least i'll try as good as i can ;-)

Thank you very much for your support regarding my issue and of course your offer to further investigate this.

I'm happy to help with any information needed :-)
Comment 3 Peter Hutterer 2017-06-06 21:30:32 UTC
libinput is a library, it can be either used by the wayland compositor or by the xf86-input-libinput driver. Or commandline tools. Right now, all major compositors use libinput to process input events. Synaptics is an xorg driver alone, it sits next to xf86-input-libinput and the two are mutually exclusive, you have to pick one of the two for your touchpad device.

(In reply to nokodemus86 from comment #2)
> But on pinching or 3+ - Finger swipes i'm getting following output:
> libinput error: libinput bug: Event for missing capability CAP_GESTURE on
> device "AlpsPS/2 ALPS GlidePoint"

oops, that is indeed a bug. Please record a gesture that triggers that bug with sudo evemu-record and attach the output in a separate bug (as attachment, not as comment).

> To be honest, it would already be great if i could at least map
> ALT+left/ALT+right (Browser back/forward) to the 2-finger horizontal swipe. 
> In my case there's no need for horizontal scrolling using touchpad.
> 
> Do you think there could be a chance of at least realizing this?
> For sure i'm absolutely happy to help with any information you need. At
> least i'll try as good as i can ;-)

libinput only interprets and forwards the gestures, it doesn't actually handle them or convert them to semantic events. That's something that's up to the compositor (for global gestures) or the client/toolkit for local gestures. But - no chance of that happening in X, the bits in between are simply missing, sorry. It's a Wayland-only feature.
Comment 4 Peter Hutterer 2017-06-06 21:31:18 UTC
oh, and the error message indicates that your device has the gestures disabled (semi-mt) which explains why gestures won't work on your device, even in wayland. Two-finger scrolling is the only exception here.
Comment 5 nokodemus86 2017-06-07 10:36:49 UTC
(In reply to Peter Hutterer from comment #3)
> libinput is a library, it can be either used by the wayland compositor or by
> the xf86-input-libinput driver. Or commandline tools. Right now, all major
> compositors use libinput to process input events. Synaptics is an xorg
> driver alone, it sits next to xf86-input-libinput and the two are mutually
> exclusive, you have to pick one of the two for your touchpad device.

Ahh ... thank you for clarification. i think i'm starting to understand ... 

> oops, that is indeed a bug. Please record a gesture that triggers that bug
> with sudo evemu-record and attach the output in a separate bug (as
> attachment, not as comment).

Thanks for the hint. I created the outputs and attached them to a new bug:
https://bugs.freedesktop.org/show_bug.cgi?id=101327

> 
> libinput only interprets and forwards the gestures, it doesn't actually
> handle them or convert them to semantic events. That's something that's up
> to the compositor (for global gestures) or the client/toolkit for local
> gestures. But - no chance of that happening in X, the bits in between are
> simply missing, sorry. It's a Wayland-only feature.

Alright, i understand ... thank you for clarifying :-)
Comment 6 Peter Hutterer 2017-06-07 11:24:29 UTC
Ok, with that bug filed (Thanks!) I think all I can do here is close this one as WONTFIX - as said in comment 3 this is mostly a wayland feature and touchegg/libinput-gestures are out of my control here. Depending on bug 101327 we may re-open it if the device turns out to be useful enough, but don't pin your hope on that, sorry.
Comment 7 nokodemus86 2017-06-07 14:11:31 UTC
(In reply to Peter Hutterer from comment #6)
> Depending on bug
> 101327 we may re-open it if the device turns out to be useful enough, but
> don't pin your hope on that, sorry.

Hi :-)

No need to feel sorry about that. For now i think i can setup a pretty nice workaround regarding browser back/forward using one of those Firefox gesture addons. 

And probably, as you say, it's not the end of the story :-)
I'm happy to help as good as i can, if there's a way to give this touchpad it's superpowers  :-D

Thank you very much for your commitment regarding this issue ;-)

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.