Bug 105974 - Logitech K400: double tap on touchpad is filtered by debouncing code
Summary: Logitech K400: double tap on touchpad is filtered by debouncing code
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other other
: medium normal
Assignee: Wayland bug list
QA Contact:
Depends on:
Blocks: 106534
  Show dependency treegraph
Reported: 2018-04-10 16:12 UTC by 1762536
Modified: 2018-05-30 22:50 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

lsusb output of the device (4.15 KB, text/plain)
2018-04-10 16:12 UTC, 1762536
evemu-record of device (19.59 KB, text/plain)
2018-04-12 04:42 UTC, 1762536
recording of good and bad double-tappings (24.58 KB, text/plain)
2018-04-12 07:46 UTC, 1762536

Description 1762536 2018-04-10 16:12:03 UTC
Created attachment 138740 [details]
lsusb output of the device

this is a copy of:

i have a Logitech K400 wireless keyboard-touchpad-combo.
ID 046d:c52b Logitech, Inc. Unifying Receiver

up to ubuntu 17.10.1, i hadn't any issues with it using ubuntu.
since ubuntu 18.04 (daily-build / beta2) when do a double tap to the touchpad, it will always be recognized as single click only.

i tried to use ubuntu 18.04 on my notebook and used the notebook's touchpad there.
there, ubuntu 18.04 is recognizing a double tap as double click, when using the notebook's touchpad.

if i connect the Logitek K400 keyboard-touchpad-combo to the notebook and use the K400's touchpad, a double tap is still recognized as single click only.

i tried to change touchpad settings in the ubuntu's settings panel without getting double tap working.
then i installed gnome-tweak-tools and changes touchpad settings in the gnome-tweaks settings panel. aslo without getting double tap recognized as double click.
Comment 1 Peter Hutterer 2018-04-12 03:39:33 UTC
Please attach an evemu-record of the device while doing a double-tap (one that's not recognised), thanks.
Comment 2 1762536 2018-04-12 04:42:08 UTC
Created attachment 138772 [details]
evemu-record of device

here the evmu-record of the device i made under ubuntu 18.04 daily-live.

i made:
3x a double tap on the touchpad of the device (not recognized as double click),
2x a double click by mouse buttons below the touchpad of the device (recognized as double click),
3x double tap on the touchpad again (not recognized as double click).

i tried to make as less movements as possible.
Comment 3 Peter Hutterer 2018-04-12 04:52:49 UTC
This device isn't recognised as touchpad by the kernel and just exposes a mouse emulation interface. Which means all we see is relative motion and button clicks, tapping is handled by the device's firmware.

The only solution there would be to switch the touchpad to actual touchpad mode in the kernel. This requires knowing the magic sequence (if any exists), so far we haven't been able to do that.

Either way, this is a kernel bug, once the touchpad appears like a normal touchpad, libinput will work with it.
Comment 4 1762536 2018-04-12 05:22:20 UTC
watchinf the content of the evemu-record the only different between double-tap on the touchpad and double-click on the mouse buttons i saw, is the timing.

double-tap is way faster than the double-click.

going back to ubuntu 18.04 daily-live is made sligktly slower double-tap on the touchpad with the result, that some of the slower double-taps were recognized as double-click.

is there somewhere a kind of "debouncung"-algorithm that let the double-tap recognized as "bouncing" and is filtered out - so it is only seen as single-click... ?
Comment 5 Peter Hutterer 2018-04-12 05:43:09 UTC
huh, indeed, I misread the request, thanks. Yes, debouncing kicks in here because the events are impossibly close together. So this is a libinput bug.

Have a look at commit 3a3fd645c4a78ff85e66327d51c4262292c5b09a, you need a (new) LIBINPUT_MODEL_LOGITECH_K400 tag in the hwdb and its parsing, and that flag checked in fallback_init_debounce(). Should be a fairly simple patch, any chance you can work on it?
Comment 6 1762536 2018-04-12 05:48:40 UTC
you mean, i have to compile something in the kernel / lib?
sorry, that is way above my skills.
or are there a simple scripts and instructions i can use?
Comment 7 Peter Hutterer 2018-04-12 06:02:36 UTC
This this particular patch would be easy even with little experience in C. But yes, you'd have to add a hwdb entry and build libinput for testing.

Comment 8 1762536 2018-04-12 07:46:55 UTC
Created attachment 138776 [details]
recording of good and bad double-tappings

i attached a recording of good and bad double-tappings (with comments, what is good and what failed).
maybe it will help a little bit to improve the handling.

it looks like there is a small window where it is recognized as double-click.
the tap must be bigger than 8ms but less than 368ms.
is the device kind of synthesizing those press/release events?

BTW: no, i can't compile my own libinput... sorry for that. :(
Comment 9 1762536 2018-04-12 07:53:24 UTC
do you need something else i can easily provide?

i only booting ubuntu 18.04 daily-live from DVD / NFS - i have no installation on hard disk of that version.
Comment 10 Peter Hutterer 2018-04-13 00:46:56 UTC
commit 23614f75515ddb97089e2554a304aac3d951cff3
Author: Peter Hutterer <>
Date:   Fri Apr 13 08:57:05 2018 +1000

     debounce: disable debouncing on the Logitech K400

Comment 11 errolbury 2018-05-29 08:18:33 UTC
I'm responding to 
and in particular

I don't know where... but I recall seeing that this bug also affected 
so I--wrongly--assumed that this would also be included with this hwdb fix

What additional input may I provide?
Comment 12 1762536 2018-05-29 20:38:07 UTC
this is the commit for my Logitech K400

i think you have to ad something like

EVDEV_MODEL_LOGITECH_K400 = (1 << 11),
# Logitech K400

# Logitech K400 +

but Peter Hutterer knows it better.

i think at least you have to provide the ids of the Logitech K400+
(those in the header of evemu output)
# EVEMU 1.3
# Input device name: "Logitech K400"
# Input device ID: bus 0x03 vendor 0x46d product 0x4024 version 0x111
Comment 13 1762536 2018-05-29 21:08:08 UTC
only in case you don't know how to get the ids...

1. to install evemu-tools to have evemu-record command available

sudo apt install -y evemu-tools

2. execured the evemu-record command as root and redirect the output to a file

sudo evemu-record > log-file.txt

3. enter the entry number of Logitech K400+ in the list
4. and then [Ctrl]+[C] to abord the logging to the file.
5. the log-file should contain the ids needed for the fix.
Comment 14 Peter Hutterer 2018-05-29 22:55:22 UTC
see this commit here:

but this commit is not in the 1.10-branch and hasn't been released. So either ubuntu ships it separately or you wait until it either ends on 1.10.8 (unlikely I'lll have the time to do that though) or until they update to 1.11.

If it's a different device, just add a line in the form of

where you replace 404C with the product ID of your device. Uppercase hex or it won't work.

https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#hwdb has more info on how to do all this.

but this looks to be a ubuntu bug now, they just need to update the package.

closing again, because the K400+ is listed as one of the device in this commit.
Comment 15 Peter Hutterer 2018-05-30 22:50:37 UTC
*** Bug 106720 has been marked as a duplicate of this bug. ***

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.