Bug 502203 - Stylus stopped working in Wayland, but works in X11. The Systems detects the stylus but the cursor doesn’t follow it.
Summary: Stylus stopped working in Wayland, but works in X11. The Systems detects the ...
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 6.3.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-30 15:10 UTC by Andre85
Modified: 2025-04-06 11:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre85 2025-03-30 15:10:32 UTC
SUMMARY
My main PC is an Envy x360, Ryzen 5 2500U, which is running KDE fully updated.
My stylus (to write directly on the screen, not in a drawing tablet) stopped working in Wayland. It works if I login in X11.
It worked ok when I installed Manjaro, in late 2024. I believe it stopped working with the inclusion of the “Drawing Tablet” menu in the System Settings.
It looks like the Systems detects the stylus since the mouse cursor blinks when i touch the screen, but it doesn’t follow the stylus.
Thanks for the awesome work


STEPS TO REPRODUCE
1.  Just use the stylus in a wayland session 
2.  If the session is changed to X11, it woks as expected
3. Back to the wayland session and the problem returns

OBSERVED RESULT
This happens allways. It is not an issue with apps or particular tasks. It can be reproduced in the desktop screen.
When I move the stylus closer to the screen, the PC detects the pen, the mouse cursor dissapears, as expected. 
When I touch the screen, que cursor reapears in the position it was before. It doesn't track tip of the stylus.
When I lift the stylus, the cursor disseapears.

EXPECTED RESULT
Cursor tracking correctly, click when touch, etc.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:  KDE Plasma
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
This behaviour was observed with 3 different stylus. An original HP stylus, an Uogic (borrowed) and a Lazarite M (borrowed).
All 3 stylus worked fine in a similar PC with Win11.

here is the log from inxi -zv8

https://pastebin.com/H7Nhbawy
Comment 1 Joshua Goins 2025-04-04 11:25:39 UTC
Do you have anything in ~/.config/kcminputrc? And if so, post it here.

I would also like you to run libinput debug-events while trying to move the pen, to see if your system does pick up on the movements (it should, if this worked under X11.)
Comment 2 Andre85 2025-04-06 11:46:23 UTC
Hello. Thanks for helping.

This is the content of kcminputrc:

[Libinput][1267][10009][ELAN0732:00 04F3:2719 Stylus]
CalibrationMatrix=-1.341104507446289e-07,-7.543712854385376e-08,-6.063298192519884e-13,0,1.0761949909010582e-07,6.05359673500061e-08,-5.0527483808288434e-14,0,0,0,1,0,0,0,0,1
MapToWorkspace=false
Orientation=0
OutputArea=0,0,1,1
OutputName=

[Libinput][2][7][SynPS/2 Synaptics TouchPad]
ClickMethod=1
DisableEventsOnExternalMouse=true
NaturalScroll=true
PointerAcceleration=0.200
PointerAccelerationProfile=1

[Mouse]
X11LibInputXAccelProfileFlat=true
Comment 3 Andre85 2025-04-06 11:56:20 UTC
Regarding the libinput debug-events output, everithing seems to be OK. I tried to make a swype fron the botom left cornet to the top right corner of the screen.
I only posted the start and the end of the log, as it seemed enough.


➜  ~ sudo libinput debug-events
-event2   DEVICE_ADDED                 Power Button                      seat0 default group1  cap:k
-event3   DEVICE_ADDED                 Video Bus                         seat0 default group2  cap:k
-event0   DEVICE_ADDED                 Power Button                      seat0 default group3  cap:k
-event1   DEVICE_ADDED                 Lid Switch                        seat0 default group4  cap:S
-event7   DEVICE_ADDED                 ELAN0732:00 04F3:2719             seat0 default group5  cap:t  size 289x163mm ntouches 10 calib
-event10  DEVICE_ADDED                 ELAN0732:00 04F3:2719 Stylus      seat0 default group5  cap:T  size 293x165mm left calib
-event4   DEVICE_ADDED                 AT Translated Set 2 keyboard      seat0 default group6  cap:k
-event13  DEVICE_ADDED                 SynPS/2 Synaptics TouchPad        seat0 default group7  cap:pg  size 69x51mm tap (dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwtp-on
-event11  DEVICE_ADDED                 HP WMI hotkeys                    seat0 default group8  cap:kS
-event5   DEVICE_ADDED                 Wireless hotkeys                  seat0 default group9  cap:k
-event10  TABLET_TOOL_PROXIMITY        +0.000s          2.16*/151.84*   pressure: 0.00* pen      (0, id 0) proximity-in     axes:p  btn:S
 event10  TABLET_TOOL_PROXIMITY        +0.050s          2.16/151.84     pressure: 0.00  pen      (0, id 0) proximity-out
 event10  TABLET_TOOL_PROXIMITY        +0.270s          0.97*/152.16*   pressure: 0.00* pen      (0, id 0) proximity-in     axes:p  btn:S
 event10  TABLET_TOOL_AXIS             +0.278s          0.97/152.16     pressure: 0.03*
 event10  TABLET_TOOL_TIP              +0.284s          0.97/152.16     pressure: 0.05* down
 event10  TABLET_TOOL_AXIS             +0.293s          0.97/152.16     pressure: 0.08*
 event10  TABLET_TOOL_AXIS          2  +0.299s          0.97/152.16     pressure: 0.11*
 event10  TABLET_TOOL_AXIS          3  +0.308s          0.97/152.16     pressure: 0.14*
....
 event10  TABLET_TOOL_AXIS        672  +2.832s          288.14*/0.25*   pressure: 0.69
 event10  TABLET_TOOL_AXIS        673  +2.837s          288.29*/0.24*   pressure: 0.69*
 event10  TABLET_TOOL_AXIS        674  +2.839s          288.40*/0.22*   pressure: 0.69
 event10  TABLET_TOOL_AXIS        675  +2.844s          288.51*/0.21*   pressure: 0.69*
 event10  TABLET_TOOL_AXIS        676  +2.847s          288.60*/0.19*   pressure: 0.69
 event10  TABLET_TOOL_AXIS        677  +2.851s          288.70*/0.17*   pressure: 0.69*
 event10  TABLET_TOOL_AXIS        678  +2.854s          288.79*/0.17*   pressure: 0.69
 event10  TABLET_TOOL_AXIS        679  +2.859s          288.94*/0.17*   pressure: 0.18*
 event10  TABLET_TOOL_AXIS        680  +2.861s          289.00*/0.19*   pressure: 0.18
 event10  TABLET_TOOL_TIP              +2.874s          288.98*/0.19    pressure: 0.00* up
 event10  TABLET_TOOL_PROXIMITY        +2.922s          288.98/0.19     pressure: 0.00  pen      (0, id 0) proximity-out

Please let me know if you need something more. 
Thank you.