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.