HP Tilt Pen not recognised as stylus
I have an HP Envy 360 laptop which comes with an HP Tilt Pen. This connects by bluetooth and is recognised as input devices but not as a stylus or tablet. The Settings app's "Wacom Tablet" page always displays "No stylus found" and "No tablet detected."
Here is the output of xinput list
; devices 10 and 11 are the pen and eraser ends of the pen respectively.
$ xinput list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ xwayland-pointer:19 id=6 [slave pointer (2)]
⎜ ↳ xwayland-relative-pointer:19 id=7 [slave pointer (2)]
⎜ ↳ xwayland-touch:19 id=9 [slave pointer (2)]
⎜ ↳ xwayland-stylus:19 id=10 [slave pointer (2)]
⎜ ↳ xwayland-eraser:19 id=11 [slave pointer (2)]
⎜ ↳ xwayland-cursor:19 id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ xwayland-keyboard:19 id=8 [slave keyboard (3)]
Here's an example of xinput list --long
for one of those devices, showing the six axes (not entirely sure what the wheel axis is); the other device has the same axes:
$ xinput list --long 10
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
xwayland-stylus:19 id=10 [slave pointer (2)]
Reporting 7 classes:
Class originated from: 10. Type: XIButtonClass
Buttons supported: 9
Button labels: None None None None None None None None None
Button state:
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 0:
Label: Abs X
Range: 0.000000 - 262143.000000
Resolution: 10000 units/m
Mode: absolute
Current value: 65058.133333
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 1:
Label: Abs Y
Range: 0.000000 - 262143.000000
Resolution: 10000 units/m
Mode: absolute
Current value: 174762.666667
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 2:
Label: Abs Pressure
Range: 0.000000 - 65535.000000
Resolution: 1 units/m
Mode: absolute
Current value: 0.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 3:
Label: Abs Tilt X
Range: -64.000000 - 63.000000
Resolution: 57 units/m
Mode: absolute
Current value: 0.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 4:
Label: Abs Tilt Y
Range: -64.000000 - 63.000000
Resolution: 57 units/m
Mode: absolute
Current value: 0.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 5:
Label: Abs Wheel
Range: -900.000000 - 899.000000
Resolution: 1 units/m
Mode: absolute
Current value: 0.000000
I'm running Ubuntu 20.04 with GNOME 3.30. I've tried both the Xorg and Wayland sessions with very similar results (the xinput output above is for Wayland; the Xorg session handles the axes differently but shows the same devices).
The main problem for me is that this (AFAICT) makes it impossible to configure the transformation between input coordinates and screen coordinates. When I'm using the laptop on its own this is fine, but as soon as I connect an external monitor, the pointer scaling is all wrong (placing the pen at one point on the laptop screen results in the pointer being elsewhere, not necessarily on the laptop screen). The results here are somewhat different between Xorg and Wayland; on Wayland the scaling on the laptop screen is correct but it's still impossible to change the calibration to something else (eg map the laptop screen to another screen).
While a fix would be great, a workaround would be nearly as good. I'm comfortable installing test packages or rebuilding from source etc if testing is required.