Double-tap bug due to stuck touch input event
Hey,
I was investigating into a bug in Phosh on the PinePhone, where every element of the Phosh UI had to be clicked twice to register.
It always follows the same pattern: the first click on an UI element does not register, while the second consecutive click registered, until clicking on a new element and having the same bug there again. So every button have to be pressed twice to register (mention of the bug on the Mobian wiki: https://wiki.mobian-project.org/doku.php?id=troubleshooting#taps-not-registering-on-the-lock-screen-double-tap-problem). Not only the lockscreen is affected, but also every other Phosh UI element and only restarting Phosh solves the issue. "Evtest" and "PHOC_DEBUG=touch-points" didn't reveal any issues with the touch screen input itself, the input appears to be correct.
How to reproduce
I found a consistent way to reproduce the issue on the PinePhone (the Librem 5 is probably affected too): If the user goes into the lockscreen and swipes the PIN unlock screen halfway up and holds it in the halfway position and turns off the screen once, the bug always occurs. The bug also happens on random events without the user forcing it.
Meaning of the finding
The touch event is stuck and constantly holding down on that position, causing the described behavior (see attached screenshot -> the left dot is the stuck touch event).
How to fix the issue
Cancel all touch events when the (touch-)screen is turned off.
Which version did you encounter the bug in?
Phosh Version: 0.5.0-1
What hardware are you running phosh on?
PinePhone PostmarketOS CE