Surface Pen Tool Selection Misbehaving
Summary
The Surface Pen triggers a proximity in event for the pen tool prior to issuing another for the eraser tool. As a result of tool exclusivity checks added in 1.14, the pen tool will always be used.
Steps to reproduce
Use the eraser side of a surface pen, it will behave as the pen tool.
libinput version you encountered the bug on
Any version after commit 9deb57e9.
Hardware information:
Surface Book 2 13" - Running Arch Linux with the latest jakeday kernel containing the necessary patches to get IPTS devices to register with udev.
Other log output:
-
record
log- I've snipped some excess movement event codes, this is tapping the pen to the display and then shorty after, the eraser.
-
debug-events
log- Same as above, briefly tapping the pen and then the eraser against the display.
-
debug-events
log (check patched)- This is the same process with the tool check revert functionality removed.
Notes:
If I patch out the above check, the device actually seems to work as intended. I'm not familiar enough with kernel programming to be certain that this is an issue with the hardware itself, but if someone wants to point me in the right direction to tracking that down I'd be happy to do what I can.
I don't know what the most elegant way to handle this would be- there's no way to predict that an eraser proximity enter event is coming, so attempting to ignore the pen proximity event probably isn't an option. Perhaps the addition of a device quirk to bypass the check?