I’ve been having this issue for a while where using my tablet to draw or simply using it as a mouse will result in the cursor disappearing whenever the pen is detected as not moving. This happens regardless of me being on Wayland or xorg.
System: Fedora 42 Tablet Model: Huion H1161 Drivers: Tested with Kernel included drivers and OpenTabletDriver Note: Tested on my Desktop PC with an AMD GPU and also on a Dell Latitude E6440, happens on both.
I’ve contacted the developers of OpenTabletDriver with a video (attached to this post) and I was told this was the desktop’s fault, since it handles the cursor. The behavior is quite bothersome as even when I’m drawing, just hovering with the pen over the tablet can cause it to start flickering. It’s both unpleasant to the eye but also makes it difficult for me to quickly assess where my cursor is if I put my pen down.
Not an expert, but had the same problem on Arch. It’s about hardware rendered cursors (GPU renders the cursor on some apps) and the Huion hover events somehow interfere and makes the flickering happen. You can fix it by either disabling hardware cursors when running your drawing software or set it globally and permanently. The environment variable is this: “WLR_NO_HARDWARE_CURSORS=1”
I use Hyprland so it goes into the config file as “env = WLR_NO_HARDWARE_CURSORS,1”
You’re maybe using something else, for Gnome I think you can do “echo ‘export WLR_NO_HARDWARE_CURSORS=1’ >> ~/.profile” for example.
Otherwise look up how to set environment variables in your DE or WM.
My guess is that the tablet when it reaches zero pressure also sends a proximity out event. this causes mutter to hide the cursor. If the tablet hovers at the zero pressure mark and keeps going in/out then the flickering can happen.
Probably best to file an issue in the libinput issue tracker and attach the output of libinput record for such a (ideally short) sequence, that can tell us more. If that’s the case the solution is either to delay the proximity events for that device to paper over those or… dunno, maybe we’ll come up with something else.
First for those who just want the quick and temporary fix (that atleast works for me as of writing this):
You have to be on Linux-lts kernel. Set the variable “export WLR_NO_HARDWARE_CURSORS=1” in your .bashrc for example. Then on every boot, after you have first introduced your tablet to the system (hovered the pen), you have to reload your system (for me on Hyprland I do “hyprctl reload”). Also works if you just toggle the variable from 1 to 0 or vice versa. Just make a script with this and bind it onto something or run it when launching Krita (remember to always introduce the tablet to the sytem in this case before launching Krita).
Now for those interested in resolving this issue in a more proper way:
It seems to be a problem on Huion tablets, I have a Huion HS611, and the two issues alike that I have seen are also Huion (this one and other on this thread: Cursor flickers when hovering using a graphics tablet - Kernel, boot, graphics & hardware - EndeavourOS ) Both posts are recent, and I had not encountered this issue in the past either. The issue appears on both Fedora and Arch and on different WM’s and DE’s, so we can rule those out. We all are also using an AMD GPU.
Results from my testing point to maybe a kernel and gpu level bug. Firstly, the problem only occurs on apps that use hardware rendering (Krita, Discord…) and not on Firefox or desktop/no app –> GPU rendering issue.
Secondly the only fix that is working for me right now is a sort of “refresh” to the cursor planes. NOTE this only works on the Linux-lts kernel, I didn’t find any solutions on the Linux or Linux-zen kernels. Example: Boot –> Having a variable set, like WLR_NO_HARDWARE_CURSORS actually does nothing before the issue appears –> issue appears when the system first recognises the hover events from the tablet –> only after the issue has first appeared one of these will fix it: Setting the variable (WLR_NO_HARDWARE_CURSORS), toggling the variable if already set (=0–>1 or vice versa) or reloading the system if the variable is already set (on Hyprland “hyprctl reload”).
The issue seems to be something along the lines of the hover events of the Huion tablets messing up when introduced to GPU rendering/acceleration on the Linux kernels. A simple refresh to the hardware rendered cursor planes fixes this (only on the Linux-lts kernel, and it is possible that this stops working in the future too).
If someone more knowledgeable could give their take on this, I would appreciate it.
I’ve created the issue here, thanks for the input everyone! I tested some more today and made sure to use a clean installation, no external drivers, no nothing. I hope my logs can help the developers.
Any relevant updates and I’ll post more information here if necessary, until then, cheers!