Summary: | Debouncing causes "sticky" buttons | ||
---|---|---|---|
Product: | Wayland | Reporter: | Lewis Diamond <bugs.freedesktop.org> |
Component: | libinput | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | an, Hi-Angel, peter.hutterer |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | evemu test, doesn't repro for me, but might be helpful. |
Description
Lewis Diamond
2017-11-09 05:18:05 UTC
Created attachment 135336 [details]
evemu test, doesn't repro for me, but might be helpful.
E: 4.135016 0004 0004 589825 # EV_MSC / MSC_SCAN 589825 E: 4.135016 0001 0110 0000 # EV_KEY / BTN_LEFT 0 E: 4.135016 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +9ms E: 4.136733 0004 0004 589825 # EV_MSC / MSC_SCAN 589825 E: 4.136733 0001 0110 0001 # EV_KEY / BTN_LEFT 1 E: 4.136733 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +1ms This is your problem. A button left press comes 1ms after the previous button release, libinput assumes that this is a bouncing button with a flaky contact and enables button debouncing. From then on, button events are debounced, so anything within the 12ms debounce timeout will be filtered. See https://wayland.freedesktop.org/libinput/doc/latest/button_debouncing.html When you run libinput debug-events you should see a "Enabling button debouncing" message when this happens. I question your ability to really release and click within 1ms though :) I think we need some special timeout to paper over multiple button releases, afaict this only happens when multiple buttons change state. There's another patch on the list atm that will have to be merged first before we can fix this issue here though https://lists.freedesktop.org/archives/wayland-devel/2017-November/035666.html For the record, this also triggered the issue: https://gist.github.com/lewisdiamond/cb22aa11a3eee8305fd636b40f889b2f No "Enabling button debouncing" message was printed Maybe we could simply have an option to disable debouncing. https://wayland.freedesktop.org/libinput/doc/latest/faq.html#faq_configuration You need to use --verbose to see that message *** Bug 103673 has been marked as a duplicate of this bug. *** reproduced it with attachment 135377 [details] from 103673 after some modifications (reduced the timeout for the right button release and removed the 'cycle the stuck button once' bit. but I find I can only trigger it if I replay the recording twice with quick succession (i.e. hitting enter twice with evemu-play). The good news is that this is fixed by the debounce patches I just sent to the list. [1] With those, the state is always reset correctly. Some of the button events get 'lost' but that's kinda the point of the debouncing code. Let's wait for those to get merged and then we can check again whether there are any issues left. [1] https://lists.freedesktop.org/archives/wayland-devel/2017-November/035782.html I second the request for having a way to disable debouncing. This new feature breaks high frequency input in video games. Along with this issue, my left/right mouse buttons stop working correctly when switching from a video game window (Dota 2) and another workspace in i3 window manager, making input very inconsistent. This doesn't happen in 1.8.3, only started with 1.9.1, still occurs in 1.9.2. I also have some trouble getting consistent output of the "debouncing" messages with libinput-debug-events --verbose. Don't mind me, I'm a clueless user. Didn't realize Peter's patch wasn't merged yet. Sorry for adding noise, and thanks a lot Peter. *** Bug 103811 has been marked as a duplicate of this bug. *** Should be fixed with 0e0dfe9bdfa0, please test git master and re-open if it's still an issue Confirming: current git master (following 0e0dfe9bdfa0) fixes this for me. @Peter Hutterer I just built from the git for testing. I see something weird is happening, I don't know if it's relevant or a new problem. After installing libinput I ran Xonotic from a terminal, and played a bit, then I switched to workspace with browser to type something. After a while I switched to the workspace with game, and noticed movement became oddly slow. I closed the game, switched back to the terminal, and then in terminal started self-typing the following: fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint:fingerprint: Thanks though it's not ":7 days left:". Can't reproduce another time. I just hope you have any ideas, that sounds like some forgotten debugging code in the library. no idea what that could be. the closest would be that you had "fingerprint:" highlighted and a set of ghost middle button events kept pasting this. There's nothing else in libinput that could otherwise trigger this... (In reply to Peter Hutterer from comment #14) > no idea what that could be. the closest would be that you had "fingerprint:" > highlighted and a set of ghost middle button events kept pasting this. > There's nothing else in libinput that could otherwise trigger this... Thank you, I thought it'd be nice to mention it's probably something with my mouse, i.e. not libinput. About 15 minutes ago for no reason stopped working wheel scroll (middle button works though), though touchpad side-scroll still works. `evemu-record` shows no events; I tried different usb-ports, different libinput versions, reboots with them… To no avail. That said, I don't really see how could that influence my in-game movement, but oh well, can't reproduce anymore anyway. |
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.