XP-Pen Deco01 v2, event stream breaks after pressing stylus button
Summary
Firstly, thank you so much for all the work you do on libinput. It's an amazing and seamless library that does a lot.
I have been trying to get my XP-PEN Deco01 v2 working (ID 28bd:0905 XP-Pen 10 inch PenTablet
). It works fine without any modification when plugged in - until I hit one of the buttons on the stylus, at which point the tablet events stop being picked up on entirely. The problem can be fixed by unplugging and replugging the device. I'm using Wayland/Sway.
I suspect this is a libinput issue due to the fact that I can reproduce the event stream break using libinput debug-events
. The steps are:
- Plug in the tablet.
- Run
libinput debug-events
. This produces output as I move the stylus around. - As soon as I hit the button on the stylus, the output events stop. There is no line to indicate the button press.
- If I restart
libinput debug-events
(without replugging), the events come through again.
This suggests to me that the button press is breaking the libinput connection somewhere - which Sway cannot handle without a replug, whereas libinput just needs me to restart debug-events.
If I run libinput record
however, it continues to show events before and after the press - suggesting to me that the problem is somewhere in libinput. The button event is an EV_MSC:MSC_SCAN
followed by an EV_KEY:BTN_TOUCH
.
# Previous logs omitted ...
- evdev:
- [ 0, 885954, 3, 0, 10365] # EV_ABS / ABS_X 10365 (-36)
- [ 0, 885954, 3, 1, 23231] # EV_ABS / ABS_Y 23231 (-140)
- [ 0, 885954, 3, 26, -33] # EV_ABS / ABS_TILT_X -33 (-5)
- [ 0, 885954, 3, 27, -36] # EV_ABS / ABS_TILT_Y -36 (-4)
- [ 0, 885954, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +4ms
- evdev:
- [ 0, 889984, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 0, 889984, 1, 330, 0] # EV_KEY / BTN_TOUCH 0
- [ 0, 889984, 3, 26, 0] # EV_ABS / ABS_TILT_X 0 (+33)
- [ 0, 889984, 3, 27, 0] # EV_ABS / ABS_TILT_Y 0 (+36)
- [ 0, 889984, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +4ms
# Continues to emit ABS_X/ABS_Y events as I move the pen around, although debug-events does not.
Other notes
- I have tried setting a quirk to ignore
BTN_TOUCH
andMSC_SCAN
events, but this had no effect. - The buttons on the tablet (which come on a separate libinput device) are unaffected.
I'm wondering if you could help diagnose this further? I wasn't sure whether the issue is in libinput or in the downstream consumer (Sway), but the fact that we still get evdev
events but not libinput debug-events
events pointed me here.
Steps to reproduce
If you have the tablet, which I guess you don't:
- Run
libinput debug-events --verbose
. - Bring the stylus to the tablet and press the higher of both buttons (BTN_TOUCH)
- Events are no longer printed until you restart
libinput debug-events
.
I have attached a short recording.
Required information
- libinput version: 1.22.0
- hardware information: Framework gen12, 6.0.12-arch1-1
-
libinput record
record.yml . This was a short test of pressing the button to show what happens before and after - in this casedebug-events
would hang and not show the after events.