Bug 505421

Summary: Canvas Acceleration Renderer settings breaks/interferes with Tablet Input API under Windows
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: affected kritarc 1
affected kritarc 2

Description Tyson Tan 2025-06-10 10:18:08 UTC
On Windows, Krita's Canvas Acceleration Renderer settings seem to break/interfere with Tablet Input API. Changing the renderer can cause either/both of the 2 following symptoms: 
1) Slower frame rate;
2) Broken Tablet Input. 

The problem is, I was unable to reproduce these problems reliably. I tested on 2 PCs:

PC1: Ryzen 7 7840U, LPDDR5X 7500, 64GB, 16GB assigned to VRAM, Cintiq Pro 24 Pen Display.
PC2: Ryzen 7 8845HS, DDR5 5600, 32GB, 8GB assigned to VRAM, Huion Frego S L310 Tablet.

Both are running Windows 11 24H2 with all the patches and the latest drivers installed. PC1's Windows is only for testing purposes, so it is very clean and rarely used. PC2's Windows is freshly installed with nothing else but Krita.

I was unable to trigger anything on PC1. While I can always trigger something on PC2, the combination of the settings is different every time.

The following description only applies to PC2:

1. ANGLE is noticeably slower than OpenGL. Maybe half of the frame rate. Not to the point of unusable, but certainly not very enjoyable to draw under such condition.

2. Switching between ANGLE and OpenGL can sometimes break the Tablet Input API. When it happens, there is no pressure sensitivity, sample rate is so low, a curve becomes a poly-line. Restarting Krita doesn't help. I must change the Tablet Input API settings for it to work again. It sometimes breaks under Wintab, sometimes under Window Ink, regardless of the Huion Driver's Windows Ink option. While things are broken inside Krita, everything still works as intended outside Krita.

I have tested both Krita 5.2.9 and the latest Krita Next, they are all affected. 

Same hardware, no problem under Linux at all.

A considerable amount of users from my community reported similar issues in the past. If you need more information, please tell me how to test, and I will try my best.
Comment 1 Tyson Tan 2025-06-10 10:31:01 UTC
My guess is that Krita has some built-in mechanism to detect which Canvas Acceleration Renderer/Tablet Input API to use, but it either has conflict with manual settings or doesn't show it on the UI correctly.
Comment 2 Tyson Tan 2025-06-11 00:40:31 UTC
I think I should do more test before you spend time on this.
Comment 3 Tyson Tan 2025-06-11 01:56:29 UTC
So I have done more tests on PC3:
Intel Core i7-8700 64GB,  UHD Graphics 630, Windows 11 24H2

ANGLE Renderer has a noticeably lower FPS, same.
Changing Renderer can break Tablet Input API sometimes, same.

ANGLE lagging can be reproduced reliably, I think you can easily confirm that one.

Tablet Input API on the other hand, is more complicated. It breaks on a Huion Frego S L310 tablet, but not on a Wacom Cintiq Pro 24 or Wacom One 12. It happened 2 time when the tablet driver's Windows Ink option OFF, Restoring Krita settings to Defaults, then changing the Canvas Renderer.
 
How I reproduced this:

1) Huion Tablet Driver -> Windows Ink OFF (Huion Driver window still open)
2) Menu -> Settings -> Reset Settings
3) Configure Krita -> Display -> Restore Defaults
4) Configure Krita -> Display -> Restore Defaults
5) Restart Krita
6) Tablet Input OK

7) Change Renderer, either by manually choosing OpenGL or Restore Defaults
8) Restart Krita
9) Tablet Input Breaks, restarting Krita again did not help

10) Change anything in Krita's Renderer or Tablet Input API settings
11) Restart Krita
12) Tablet Input OK

I think the Tablet Input API issue is a configuration conflict. I will attach 2 different kritarc below with Tablet Input broken (Both Huion Driver and Krita are set to Wintab mode).
Comment 4 Tyson Tan 2025-06-11 01:59:36 UTC
Created attachment 182159 [details]
affected kritarc 1
Comment 5 Tyson Tan 2025-06-11 01:59:54 UTC
Created attachment 182160 [details]
affected kritarc 2
Comment 6 Tyson Tan 2025-06-11 02:07:34 UTC
kritarc 1 is using OpenGL renderer.
kritarc 2 is using Auto (ANGLE) renderer.
Both are using WinTab Tablet Input API.
Huion driver's Windows Ink option is OFF.