Comment 17 for bug 602809

Revision history for this message
Yei Gei (yzgyzg) wrote :

Here is a patch for libinput which worked for me. The debounce time is hard coded to 25 ms and 12 ms. The patch will increase it to 100 ms and 50 ms. I hope it will help.

libinput_debounce_time.patch

--- a/src/evdev-debounce.c 2020-06-19 10:00:40.778552300 +1000
+++ b/src/evdev-debounce.c 2020-07-27 02:02:52.343254576 +1000
@@ -124,7 +124,7 @@
 debounce_set_timer(struct fallback_dispatch *fallback,
                   uint64_t time)
 {
- const int DEBOUNCE_TIMEOUT_BOUNCE = ms2us(25);
+ const int DEBOUNCE_TIMEOUT_BOUNCE = ms2us(100);

        libinput_timer_set(&fallback->debounce.timer,
                           time + DEBOUNCE_TIMEOUT_BOUNCE);
@@ -134,7 +134,7 @@
 debounce_set_timer_short(struct fallback_dispatch *fallback,
                         uint64_t time)
 {
- const int DEBOUNCE_TIMEOUT_SPURIOUS = ms2us(12);
+ const int DEBOUNCE_TIMEOUT_SPURIOUS = ms2us(50);

        libinput_timer_set(&fallback->debounce.timer_short,
                           time + DEBOUNCE_TIMEOUT_SPURIOUS);