Bug 90101 - ETPS/2 Touchpad 3-finger tap causing right click instead of middle
Summary: ETPS/2 Touchpad 3-finger tap causing right click instead of middle
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Benjamin Tissoires
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-19 16:47 UTC by Star Brilliant
Modified: 2015-07-06 04:15 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
01. tripple_tap.txt (5.31 KB, text/plain)
2015-04-19 16:47 UTC, Star Brilliant
Details
02. lr_button.txt (3.70 KB, text/plain)
2015-04-19 16:53 UTC, Star Brilliant
Details
3. tripple_fast.txt (4.25 KB, text/plain)
2015-04-20 14:42 UTC, Star Brilliant
Details
4. tripple_slow.txt (5.64 KB, text/plain)
2015-04-20 14:43 UTC, Star Brilliant
Details
5. resolved.txt (4.92 KB, text/plain)
2015-04-22 14:41 UTC, Star Brilliant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Star Brilliant 2015-04-19 16:47:55 UTC
Created attachment 115196 [details]
01. tripple_tap.txt

Versions:
Linux distribution: ArchLinux
wayland: 1.7.0-1
libinput: 0.13.0-2
gnome-shell: 3.16.1-2
xf86-input-evdev: 2.9.2-1

I am using Gnome 3.16.1 Wayland mode. I tripple tapped but it caused a right click instead of middle click.

Evemu-record is in the attachment.
Comment 1 Star Brilliant 2015-04-19 16:53:36 UTC
Append:

I have not yet test it in Weston or any other compositors. Because I do not know how to enable tap-to-click on Weston.

In X11, pressing L/R button at the same time can also trigger a middle click (if the mouse or trackpad does not have a physical middle button). However I can not get this to work.

So now there is no way to get middle click to work on a 2-button trackpad.

Appended another evemu-record of L/R button click. Hope this problem can be solved as well.
Comment 2 Star Brilliant 2015-04-19 16:53:56 UTC
Created attachment 115197 [details]
02. lr_button.txt
Comment 3 Peter Hutterer 2015-04-20 06:56:39 UTC
(In reply to m13253 from comment #0)
> Created attachment 115196 [details]
> 01. tripple_tap.txt

this looks like an incomplete recording, can you please re-attach a new one? the tripletap comes in before the device even sees two touches. I'd need the full recording from no fingers on the touchpad through to no fingers on the touchpad again.


(In reply to m13253 from comment #1)
> So now there is no way to get middle click to work on a 2-button trackpad.

only just got added, you'd need libinput from git (see Bug 89933)
Comment 4 Star Brilliant 2015-04-20 07:49:28 UTC
> this looks like an incomplete recording, can you please re-attach a new one?

Yes, I did get a full recording -- starting from no fingers on the touchpad, then start recording, then tap three fingers at the same time, then leave all fingers.

Is it because I tapped so quickly, that evdev didn't even think I did a double-tap?

Also, I did no editing on the resulting file.

I'll try to compile a git version and do  another record later this evening, to provide more info. Thanks.
Comment 5 Peter Hutterer 2015-04-20 08:01:27 UTC
huh, odd. in that case it looks like a kernel bug. the device has 2 slots but sends tripletap with only one slot open and used. libinput won't handle that correctly. What kernel version is this?
Comment 6 Star Brilliant 2015-04-20 14:42:58 UTC
Created attachment 115226 [details]
3. tripple_fast.txt

Kernel version:
Linux brilliant-laptop 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux

I tried tripple-tap at different speed. They all have BTN_TOOL_TRIPLETAP at the very beginning before evdev detects the second finger.

But it is fine under X11. I am not sure if it is a kernel bug.
Comment 7 Star Brilliant 2015-04-20 14:43:18 UTC
Created attachment 115227 [details]
4. tripple_slow.txt
Comment 8 Benjamin Tissoires 2015-04-20 22:12:24 UTC
Seems like the kernel is at fault. And this line seems to be the problem:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/input/mouse/elantech.c#n318

I guess a "elantech_set_slot(dev, 1, num_fingers >= 2, x2, y2);" should fix the problem.
Comment 9 Peter Hutterer 2015-04-21 01:18:04 UTC
m13253: any chance you can locally test this quick fix?
Comment 10 Star Brilliant 2015-04-21 16:07:27 UTC
(In reply to Peter Hutterer from comment #9)
> m13253: any chance you can locally test this quick fix?

Thank you for the patch.
I am building the patched Linux kernel package now.

But my computer is too slow to finish building within two hours before I go to sleep.
I'll report the result tomorrow.

Lots of thanks.
Comment 11 Star Brilliant 2015-04-22 14:41:33 UTC
Created attachment 115273 [details]
5. resolved.txt

The fix worked. Thank you!

As a reference, I uploaded a record again.

Then, could you help me get this patch accepted by kernel upstream?

Lots of thanks.
Comment 12 Benjamin Tissoires 2015-04-22 15:47:42 UTC
(In reply to m13253 from comment #11)
> The fix worked. Thank you!

Thanks for the tests.

> 
> Then, could you help me get this patch accepted by kernel upstream?

Given your results, I just submitted the patch here: 
https://patchwork.kernel.org/patch/6256741/

I marked it as stable so it will eventually end up in all supported long term kernels.

I'll close the bug when the patch hits the input maintainer's tree.
Comment 14 Peter Hutterer 2015-06-30 08:04:52 UTC
unrelated: what's the physical size of your touchpad? we need this for some other implementation. thanks
Comment 15 Star Brilliant 2015-07-04 05:52:37 UTC
(In reply to Peter Hutterer from comment #14)
> unrelated: what's the physical size of your touchpad? we need this for some
> other implementation. thanks

Touch active area: 8.6 cm × 4.4 cm,
including the 1.0 cm right edge marked as scroll bar (not in use if two fingers scrolling is enabled),
excluding the two buttons at the bottom.
Comment 16 Peter Hutterer 2015-07-06 04:15:12 UTC
thanks, much appreciated


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.