Bug 95295

Summary: BUG: triggered 'if (buttons >= 256)' BUG: getevents.c:1640 in GetPointerEvents() after unlocking monitor
Product: Wayland Reporter: darkbasic <darkbasic>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: evemu-describe

Description darkbasic 2016-05-06 08:28:51 UTC
I left my pc on for the night, then I moved my mouse to turn the screen on and I unlocked the screen. I was playing with snapshots and I found something got modified in /var/log/Xorg.0.log:

$ sudo snapper -c @ diff 14..0 /var/log/Xorg.0.log
--- /.snapshots/14/snapshot/var/log/Xorg.0.log  2016-05-06 01:20:05.505976044 +0200
+++ /var/log/Xorg.0.log 2016-05-06 10:17:14.207630308 +0200
@@ -426,3 +426,38 @@
 [    73.171] (II) intel(0): resizing framebuffer to 2560x1440
 [    75.299] (II) intel(0): resizing framebuffer to 5120x1440
 [    75.334] (II) intel(0): switch to mode 2560x1440@60.0 on DP1-1 using pipe 0, position (2560, 0), rotation normal, reflection none
+[ 32251.834] (II) SYN_DROPPED event from "Microsoft Microsoft® 2.4GHz Transceiver v7.0" - some input events have been lost.
+[ 32303.873] (EE) BUG: triggered 'if (buttons >= 256)'
+[ 32303.873] (EE) BUG: getevents.c:1640 in GetPointerEvents()
+[ 32303.873] (EE) 
+[ 32303.873] (EE) Backtrace:
+[ 32303.873] (EE) 0: /usr/lib/xorg-server/Xorg (GetPointerEvents+0x82) [0x44e5e2]
+[ 32303.873] (EE) 1: /usr/lib/xorg-server/Xorg (QueuePointerEvents+0x20) [0x44ebd0]
+[ 32303.874] (EE) 2: /usr/lib/xorg-server/Xorg (xf86PostButtonEvent+0xdd) [0x48641d]
+[ 32303.874] (EE) 3: /usr/lib/xorg/modules/input/libinput_drv.so (_init+0x1a9a) [0x7f668202e30a]
+[ 32303.874] (EE) 4: /usr/lib/xorg-server/Xorg (xf86Wakeup+0xe6) [0x477666]
+[ 32303.874] (EE) 5: /usr/lib/xorg-server/Xorg (WakeupHandler+0x6d) [0x43ad5d]
+[ 32303.874] (EE) 6: /usr/lib/xorg-server/Xorg (WaitForSomething+0x1ef) [0x58d54f]
+[ 32303.874] (EE) 7: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x10e) [0x43606e]
+[ 32303.874] (EE) 8: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x453) [0x43a263]
+[ 32303.874] (EE) 9: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7f668a8d8710]
+[ 32303.875] (EE) 10: /usr/lib/xorg-server/Xorg (_start+0x29) [0x424589]
+[ 32303.875] (EE) 11: ? (?+0x29) [0x29]
+[ 32303.875] (EE) 
+[ 32304.033] (EE) BUG: triggered 'if (buttons >= 256)'
+[ 32304.033] (EE) BUG: getevents.c:1640 in GetPointerEvents()
+[ 32304.033] (EE) 
+[ 32304.033] (EE) Backtrace:
+[ 32304.033] (EE) 0: /usr/lib/xorg-server/Xorg (GetPointerEvents+0x82) [0x44e5e2]
+[ 32304.033] (EE) 1: /usr/lib/xorg-server/Xorg (QueuePointerEvents+0x20) [0x44ebd0]
+[ 32304.033] (EE) 2: /usr/lib/xorg-server/Xorg (xf86PostButtonEvent+0xdd) [0x48641d]
+[ 32304.034] (EE) 3: /usr/lib/xorg/modules/input/libinput_drv.so (_init+0x1a9a) [0x7f668202e30a]
+[ 32304.034] (EE) 4: /usr/lib/xorg-server/Xorg (xf86Wakeup+0xe6) [0x477666]
+[ 32304.034] (EE) 5: /usr/lib/xorg-server/Xorg (WakeupHandler+0x6d) [0x43ad5d]
+[ 32304.034] (EE) 6: /usr/lib/xorg-server/Xorg (WaitForSomething+0x1ef) [0x58d54f]
+[ 32304.034] (EE) 7: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x10e) [0x43606e]
+[ 32304.034] (EE) 8: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x453) [0x43a263]
+[ 32304.034] (EE) 9: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7f668a8d8710]
+[ 32304.034] (EE) 10: /usr/lib/xorg-server/Xorg (_start+0x29) [0x424589]
+[ 32304.035] (EE) 11: ? (?+0x29) [0x29]
+[ 32304.035] (EE)

It happened in the past 15 minutes so it must be due to the screen turning on or the KDE session unlocking. Anyway except for the log everything else works flawlessly.
Comment 1 darkbasic 2016-05-06 08:29:50 UTC
Forgot to say distro is Arch Linux.

$ pacman -Ss libinput
extra/libinput 1.2.4-1 [installato]
    library that handles input devices for display servers and other applications that need to directly deal with input devices.
extra/xf86-input-libinput 0.19.0-1 (xorg-drivers xorg) [installato]
    Generic input driver for the X.Org server based on libinput
$ pacman -Ss xorg-server
extra/xorg-server 1.18.3-1 (xorg) [installato]
    Xorg X server
Comment 2 Peter Hutterer 2016-05-08 22:01:59 UTC
Can you give me the evemu-describe for this device please? The quickfix for this is easy but I want to verify it's not some other bug
Comment 3 Peter Hutterer 2016-05-09 03:37:46 UTC
commit ce85432f41549cd6f3c6e0c5e2e39d0c1aee8dfd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon May 9 07:58:51 2016 +1000

    Discard buttons >= 256
Comment 4 darkbasic 2016-05-09 14:18:01 UTC
Created attachment 123572 [details]
evemu-describe

Here it is.
Comment 5 Peter Hutterer 2016-05-10 03:14:14 UTC
Ok, this is a bug in libinput, specifically the key group starting at KEY_KBDINPUTASSIST_PREV are supported by this keyboard but are sent as button events. Reassigning.
Comment 7 Peter Hutterer 2016-05-16 23:01:00 UTC
commit 8527242ed9bdfc97ba248d3e36a1641213e62ca2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 10 12:07:36 2016 +1000

    evdev: the range between dpad and trigger-happy are keys, not buttons

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.