Spurious events when USB mouse button is held
Summary
I very often get spurious events when holding down the left mouse button. Oftentimes this results in double clicks instead of single clicks, aborted drags and even right button clicks.
Steps to reproduce
Hold down the left mouse button.
libinput version you encountered the bug on
1.14.3 and 1.15.1
Hardware information:
Logitech B100 USB mouse directly connected to a Lenovo ThinkPad T490 (20N2) laptop USB port. But this has also happened with other Logitech mice, and also when the mice were connected through a docking station.
Other log output:
For both of these logs I only pressed the left mouse button once.
-
libinput record
output of pressing and holding down left mouse button:
version: 1
ndevices: 1
libinput:
version: "1.15.1"
git: "unknown"
system:
kernel: "5.5.3-gentoo"
dmi: "dmi:bvnLENOVO:bvrN2IET82P(1.60):bd12/30/2019:svnLENOVO:pn20N2S04R00:pvrThinkPadT490:rvnLENOVO:rn20N2S04R00:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrNone:"
devices:
- node: /dev/input/event15
evdev:
# Name: Logitech USB Optical Mouse
# ID: bus 0x3 vendor 0x46d product 0xc077 version 0x111
# Supported Events:
# Event type 0 (EV_SYN)
# Event type 1 (EV_KEY)
# Event code 272 (BTN_LEFT)
# Event code 273 (BTN_RIGHT)
# Event code 274 (BTN_MIDDLE)
# Event type 2 (EV_REL)
# Event code 0 (REL_X)
# Event code 1 (REL_Y)
# Event code 8 (REL_WHEEL)
# Event code 11 (REL_WHEEL_HI_RES)
# Event type 4 (EV_MSC)
# Event code 4 (MSC_SCAN)
# Properties:
name: "Logitech USB Optical Mouse"
id: [3, 1133, 49271, 273]
codes:
0: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # EV_SYN
1: [272, 273, 274] # EV_KEY
2: [0, 1, 8, 11] # EV_REL
4: [4] # EV_MSC
properties: []
hid: [5, 1, 9, 2, 161, 1, 9, 1, 161, 0, 5, 9, 25, 1, 41, 3, 21, 0, 37, 1, 149, 8, 117, 1, 129, 2, 5, 1, 9, 48, 9, 49, 9, 56, 21, 129, 37, 127, 117, 8, 149, 3, 129, 6, 192, 192 ]
udev:
properties:
- ID_INPUT=1
- ID_INPUT_MOUSE=1
- LIBINPUT_DEVICE_GROUP=3/46d/c077:usb-0000:00:14.0-4
quirks:
events:
- evdev:
- [ 0, 0, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- evdev:
- [ 0, 0, 1, 272, 1] # EV_KEY / BTN_LEFT 1
- [ 0, 0, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
- evdev:
- [ 4, 296023, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 4, 296023, 1, 272, 0] # EV_KEY / BTN_LEFT 0
- [ 4, 296023, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +4296ms
- evdev:
- [ 8, 319879, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 8, 319879, 1, 272, 1] # EV_KEY / BTN_LEFT 1
- [ 8, 319879, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +4023ms
- evdev:
- [ 8, 343923, 4, 4, 589826] # EV_MSC / MSC_SCAN 589826
- [ 8, 343923, 1, 273, 1] # EV_KEY / BTN_RIGHT 1
- [ 8, 343923, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +24ms
- evdev:
- [ 8, 384008, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 8, 384008, 1, 272, 0] # EV_KEY / BTN_LEFT 0
- [ 8, 384008, 4, 4, 589826] # EV_MSC / MSC_SCAN 589826
- [ 8, 384008, 1, 273, 0] # EV_KEY / BTN_RIGHT 0
- [ 8, 384008, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +41ms
- evdev:
- [ 8, 895937, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 8, 895937, 1, 272, 1] # EV_KEY / BTN_LEFT 1
- [ 8, 895937, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +511ms
- evdev:
- [ 8, 919852, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 8, 919852, 1, 272, 0] # EV_KEY / BTN_LEFT 0
- [ 8, 919852, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +24ms
- evdev:
- [ 9, 48252, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 9, 48252, 1, 272, 1] # EV_KEY / BTN_LEFT 1
- [ 9, 48252, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +129ms
- evdev:
- [ 9, 71961, 4, 4, 589825] # EV_MSC / MSC_SCAN 589825
- [ 9, 71961, 1, 272, 0] # EV_KEY / BTN_LEFT 0
- [ 9, 71961, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +23ms
-
libinput debug-events --verbose
output of another test of pressing and holding down the mouse button:
# libinput debug-events --verbose /dev/input/event15
libinput version: 1.15.1
event15 - Logitech USB Optical Mouse: is tagged by udev as: Mouse
event15 - Logitech USB Optical Mouse: device is a pointer
-event15 DEVICE_ADDED Logitech USB Optical Mouse seat0 default group1 cap:p left scroll-nat scroll-button
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_WAITING
event15 POINTER_BUTTON +0.000s BTN_LEFT (272) pressed, seat count: 1
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_DOWN
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS
event15 POINTER_BUTTON +0.928s BTN_LEFT (272) released, seat count: 0
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_IS_UP_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_WAITING → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_DELAYING
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_DELAYING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_DOWN
event15 POINTER_BUTTON +0.952s BTN_LEFT (272) pressed, seat count: 1
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS
event15 POINTER_BUTTON +1.344s BTN_LEFT (272) released, seat count: 0
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_IS_UP_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_WAITING → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_DOWN
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_WAITING → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_DOWN
event15 POINTER_BUTTON +3.984s BTN_LEFT (272) pressed, seat count: 1
event15 POINTER_BUTTON +3.984s BTN_RIGHT (273) pressed, seat count: 1
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS
event15 POINTER_BUTTON +4.000s BTN_RIGHT (273) released, seat count: 0
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_IS_UP_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_WAITING
event15 POINTER_BUTTON +4.680s BTN_RIGHT (273) pressed, seat count: 1
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_WAITING → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DELAYING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DELAYING → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS
event15 POINTER_BUTTON +4.688s BTN_RIGHT (273) released, seat count: 0
event15 POINTER_BUTTON +4.704s BTN_LEFT (272) released, seat count: 0
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_IS_UP_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_UP
event15 - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_IS_DOWN_WAITING
event15 POINTER_BUTTON +4.824s BTN_LEFT (272) pressed, seat count: 1
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_DOWN
event15 - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS
event15 POINTER_BUTTON +4.864s BTN_LEFT (272) released, seat count: 0
event15 - debounce state: DEBOUNCE_STATE_IS_UP_DETECTING_SPURIOUS → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_IS_UP_WAITING
event15 - debounce state: DEBOUNCE_STATE_IS_UP_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_UP
^C
event15 - Logitech USB Optical Mouse: device removed