Bug 1491525

Summary: Touchpad tap timestamps can confuse some applications
Product: Red Hat Enterprise Linux 7 Reporter: Peter Hutterer <peter.hutterer>
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: mboisver, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libinput-1.6.3-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:50:39 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:
Embargoed:

Description Peter Hutterer 2017-09-14 05:25:38 UTC
Description of problem:
libinput's timestamps for press and release events on 2-finger touchpad taps are identical. Some applications (e.g. some run under wine) get confused because they cannot order the events correctly. 

This only affects 2 and 3 finger tap, single-finger taps are fine.

Version-Release number of selected component (if applicable):
libinput-1.6.*

How reproducible:
sudo libinput-debug-events --enable-tap

Then do a two-finger tap and observe the timestamps:
-event20  POINTER_BUTTON    +1.43s	BTN_RIGHT (273) pressed, seat count: 1
 event20  POINTER_BUTTON    +1.43s	BTN_RIGHT (273) released, seat count: 0
 event20  POINTER_BUTTON    +2.65s	BTN_RIGHT (273) pressed, seat count: 1
 event20  POINTER_BUTTON    +2.65s	BTN_RIGHT (273) released, seat count: 0
 event20  POINTER_BUTTON    +4.39s	BTN_RIGHT (273) pressed, seat count: 1
 event20  POINTER_BUTTON    +4.39s	BTN_RIGHT (273) released, seat count: 0
 event20  POINTER_BUTTON    +5.46s	BTN_MIDDLE (274) pressed, seat count: 1
 event20  POINTER_BUTTON    +5.46s	BTN_MIDDLE (274) released, seat count: 0


Actual results:
The timestamps should differ slightly between the press and release events.

Comment 1 Peter Hutterer 2017-09-26 03:37:13 UTC
libinput-1.6.3-3.el7 is available in brew

Comment 4 Michael Boisvert 2018-01-09 21:13:32 UTC
Using the reproducer in the description, I am able to see that the timestamps differ slightly between the press and release events:

-event4  POINTER_BUTTON    +1.24s	BTN_RIGHT (273) pressed, seat count: 1
 event4  POINTER_BUTTON    +1.34s	BTN_RIGHT (273) released, seat count: 0
 event4  POINTER_BUTTON    +2.22s	BTN_RIGHT (273) pressed, seat count: 1
 event4  POINTER_BUTTON    +2.29s	BTN_RIGHT (273) released, seat count: 0
 event4  POINTER_BUTTON    +3.15s	BTN_RIGHT (273) pressed, seat count: 1
 event4  POINTER_BUTTON    +3.18s	BTN_RIGHT (273) released, seat count: 0
 event4  POINTER_BUTTON    +6.07s	BTN_MIDDLE (274) pressed, seat count: 1
 event4  POINTER_BUTTON    +6.16s	BTN_MIDDLE (274) released, seat count: 0

Comment 7 errata-xmlrpc 2018-04-10 11:50:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0736