[Wayland-bugs] [Bug 102385] Forced touchscreen input device remove action via udev does not trigger touch-ups appropriately
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Aug 24 11:06:16 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=102385
Bug ID: 102385
Summary: Forced touchscreen input device remove action via udev
does not trigger touch-ups appropriately
Product: Wayland
Version: unspecified
Hardware: ARM
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: libinput
Assignee: wayland-bugs at lists.freedesktop.org
Reporter: ppaalanen at gmail.com
We have a system with two touchscreens connected and a modified Weston based on
1.11.1 release. Libinput is 1.4.3. The two touch devices are aggregated into a
single wl_seat in Weston.
We need to be able to do touchscreen calibration on the fly by user request
without restarting Weston and keep the existing calibration across reboots. As
we do not have a protocol extension for touchscreen calibration, there is a
calibration script, that clears the existing calibration, flushes the
calibration in udev, uses udev API for force-remove and re-add the touchscreen
input device, launches weston-calibrator, refreshes the calibration matrix in
udev, and uses udev API for force-remove and re-add the touchscreen input
device in question. This force-remove and re-add triggers Weston to re-read the
calibration from udev. As only one touch device is force-removed at a time, the
wl_seat never loses the touch capability.
In our case the following process is enough to trigger this:
1) Place finger on touchscreen
2) Run "udevadm trigger -c remove -s input --name-match=/dev/input/event7"
(This being out touchscreen input device)
3) Remove finger
4) Run "udevadm trigger -c add -s input --name-match=/dev/input/event7"
5) Note touchscreen is unresponsive
If there is a touch down on the touch device at the time of its forced removal,
Weston's DRM backend does not relay the required touch-up events to Weston core
to update the touch-down counts. This leaves Weston core to believe there is a
touch down, which cannot be released anymore, leading to essentially dead
touchscreen.
Based on the IRC discussion with Peter Hutterer, the issue of the missing
touch-ups might be a race in libinput. Or not. This bug report is to figure out
if there would be anything to fix in libinput, or should Weston do something
different.
Quoting Peter: "if I can reproduce it with a delayed libinput_dispatch() then
I'll fix it in libinput for sure because that's what we promise."
It was tested once that if one physically unplugs the touch device from USB
while a finger is down, then the touch-up came as it should.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20170824/28eca26b/attachment.html>
More information about the wayland-bugs
mailing list