tldr; I want to enable a different openGL backend on Linux by default and I need your input if you think it is safe or not, this is especially important for the users of proprietary GPU drivers
Problem
We’ve got a few weird bugs with low framerate on Linux when using Krita 6.x in X11 (or XWayland) mode (this and that). One of the solutions to the bugs is to switch the backend that Qt uses to access openGL on Linux.
Before recently, Krita used the GLX backend exclusively, which was vulnerable to these issues (due to a bug in Qt). Yesterday I implemented a switch to the “newer” backend, called “EGL”.
This backend should resolve the bugs completely, and I would really like to enable this backend by default, but…
But there are rumors that some proprietary drivers, like Nvidia’s, don’t work with this backend properly. We did some local testing and we couldn’t confirm this statement. Could you help me with testing this backend on different GPUs/drivers?
Go to the Settings dialog and switch the “openGL interface” to “EGL”
Restart Krita and make sure that the backend got activated, the switch should say “EGL (current)”
Try to do your normal stuff in Krita, like paint, use assistants, enable “Text Properties” docker (it can help forcing the framerate issue). Check if everything works fine and no framerate issues happen.
If Krita refuses to start or activate the EGL backend, try getting the log by running Krita with the following enviornment:
If you have some troubles with the EGL backend, please attach the full unclipped eglinfo output
PS:
Some clarifying notes:
Krita 5.x is not affected
Krita 6.x in native Wayland mode is not affected
the latest nightly AppImage builds of Krita 6.x have a workaround in the GLX backend, so the original bug should not be visible unless you disable the workaround by setting export QT_GLX_SWAP_INTERVAL_SYNC_WORKAROUND=0
the distribution builds of Krita will have this bug visible unless the user manually switches to the EGL backend, that is why I want to make it the default choice
Complete no go, launching Krita with the mentioned command worked (a lot slower to open but it got there), after switching to EGL, closing Krita and after that the application wont run at all i get errors
“Krita has encountered an internal error:
SAFE ASSERT (krita): “result” in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2092
Please report a bug to developers!
Press Ignore to try to continue.
Press Abort to see developers information (all unsaved data will be lost)” i can abort or ignore about 5 times after that krita launches into a black window with no ui or feedback
eglinfo | grep -A5 “X11 platform”
X11 platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
EGL extensions string:
libEGL warning: pci id for fd 27: 10de:2702, driver (null)
pci id for fd 29: 10de:2702, driver (null)
pci id for fd 30: 10de:2702, driver (null)
libEGL warning: egl: failed to create dri2 screen
libEGL warning: pci id for fd 27: 10de:2702, driver (null)
pci id for fd 29: 10de:2702, driver (null)
pci id for fd 30: 10de:2702, driver (null)
libEGL warning: egl: failed to create dri2 screen
libEGL warning: pci id for fd 27: 10de:2702, driver (null)
the complete eglinfo pasted here, the forum doesnt allow text files
SAFE ASSERT (krita): “result” in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2092
This assert looks unrelated to the problem. Please try to move your resources folder (~/.local/share/krita) into some safe space a try to run Krita fresh.
We can try to debug this assert separately (the log in the terminal should say what exact resource is causing this issue).
Well, it actually means that the EGL backend managed to start and is being used successfully. There are some not yet investigated warnings in the logs all the time, but I have a feeling like they are more related to some issues inside Qt’s backend…
Does Krita actually work fine for you in such state? I mean, framerate is fine, no artifacts or slowdowns?
I’ve been using the nightly (6.1.0-prealpha git 802cded) for about 2 hours now and everything seems fine for me with EGL enabled on my AMD card.
I haven’t had any issues with Krita 6.0.0-beta1 or beta2 relating to low or mixed framerates, tho. I have 3 monitors, one at 120Hz (Primary), one at 75Hz, and the other at 60Hz. I only ever use Krita on the 60hz one because it’s a tablet.