Bug 97526 - Handle wacom tablet delayed serial events
Summary: Handle wacom tablet delayed serial events
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 05:02 UTC by Peter Hutterer
Modified: 2016-09-02 00:08 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
evemu log for a delayed serial (31.76 KB, text/plain)
2016-08-29 05:02 UTC, Peter Hutterer
Details

Description Peter Hutterer 2016-08-29 05:02:04 UTC
Created attachment 126092 [details]
evemu log for a delayed serial

Some sensors take a few events until they can read the serial number from the pen. This means that the serial is initially 0, then updates to the real serial number later.

See also:
https://lists.freedesktop.org/archives/wayland-devel/2016-August/030751.html

There are a couple of options to deal with this, based on the assumption that once we announce a tool in libinput, we cannot afterwards change its serial number.

1) delay initialization of a tool until the serial comes. this would result in the device not reacting until potentially well into the interaction
2) disable serial reporting on affected tablets. this requires a hwdb
3) ignore late serials. we get a serial of 0 and that's a good hint that we just don't know yet. we can then ignore whatever serial comes next
4) a combination of 1 with memory - delay the initial sequence and remember the last-seen tool. Re-use that for the next unknown sequence and where incorrect fake a prox out + prox in for the new tool

Option 1) is complicated for making sure button events are correct. 2) requires updating of the hwdb. 3) is simple, 4) is probably the best user experience and should be implemented once 3) proves insufficient (e.g. use of multiple tools on such tablet)
Comment 2 Peter Hutterer 2016-09-02 00:08:33 UTC
commit d686e13338522ce920a88dffb636facbb90658a5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 29 15:14:55 2016 +1000

    tablet: if a serial comes in late, discard it


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.