Summary: | plasma-integration inappropriately forces software rendering for certain NVIDIA GPU when checkContext.create() fails, but hardware rendering actually works better for it | ||
---|---|---|---|
Product: | [Plasma] plasma-integration | Reporter: | benmordecai |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | kde, kdedev, nate |
Priority: | NOR | ||
Version: | 5.27.2 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 6.0 | |
Sentry Crash Report: | |||
Attachments: | Opacity Mask Failure |
Description
benmordecai
2023-03-04 03:56:02 UTC
Passing QT_QPA_PLATFORMTHEME=qt5ct works just as well as QT_QPA_PLATFORMTHEME=gtk3. Since reporting this bug I have discovered that whatever is underlying the problem is also causing kdenlive to crash on launch. Passing QT_QPA_PLATFORMTHEME=qt5ct on the launch of kdenlive resolves the problem. *** Bug 466274 has been marked as a duplicate of this bug. *** There's probably a problem with your graphics card or its driver if it's not capable of displaying this content properly. Using a QPT other than plasma-integration seems to work around the issue by avoiding the code that plasma-integration sets to initialize GPU rendering properly (based on its definition of properly!). So something that plasma-integration does triggers the bug in your graphics card. Let's go over what it does: - Falls back to software rendering if it can't create an OpenGL context properly - Sets QSG_RENDER_LOOP=basic on Wayland if you're using an NVIDIA GPU So let's see if we can find which combination of settings causes it to get broken. Please try to run each of the following: # Software rendering, basic render loop: QT_QPA_PLATFORMTHEME=qt5ct QT_OPENGL=software QT_QUICK_BACKEND=software QML_SCENE_DEVICE=softwarecontext QSG_RENDER_LOOP=basic kasts # Software rendering, threaded render loop: QT_QPA_PLATFORMTHEME=qt5ct QT_OPENGL=software QT_QUICK_BACKEND=software QML_SCENE_DEVICE=softwarecontext QSG_RENDER_LOOP=threaded kasts # hardware rendering, basic render loop: QT_QPA_PLATFORMTHEME=qt5ct QSG_RENDER_LOOP=basic kasts # hardware rendering, threaded render loop: QT_QPA_PLATFORMTHEME=qt5ct QSG_RENDER_LOOP=threaded kasts Let's see which one breaks. If nothing does, we have a better guess that something else in plasma-integration triggers this. Command: QT_QPA_PLATFORMTHEME=qt5ct QT_OPENGL=software QT_QUICK_BACKEND=software QML_SCENE_DEVICE=softwarecontext QSG_RENDER_LOOP=basic kasts Result: fail Command: QT_QPA_PLATFORMTHEME=qt5ct QT_OPENGL=software QT_QUICK_BACKEND=software QML_SCENE_DEVICE=softwarecontext QSG_RENDER_LOOP=threaded kasts Result: fail Command: QT_QPA_PLATFORMTHEME=qt5ct QSG_RENDER_LOOP=basic kasts Result: success Command: QT_QPA_PLATFORMTHEME=qt5ct QSG_RENDER_LOOP=threaded kasts Result: success Just a note, I am on X11 and NOT wayland Interesting results. This means that hardware rendering is actually working properly, and the problem is that plasma-integration is forcing software rendering instead. There are two code paths to make this happen: 1. OpenGL isn't available (clearly not the case here) 2. The function call `checkContext.create()` fails Looks like the latter thing is happening, which does imply a bug in our code somewhere. CCing David for further investigation. Curious if anyone has had the chance to look at this recently. Don't want to be a nag. I would look at it myself if I knew C++ and how the functions worked, but I've seen a few released of plasma-integration without any motion. I have finally found the solution to this problem. Source: https://www.reddit.com/r/kde/comments/obqe82/system_monitor_unable_to_use_hardware_acceleration/?rdt=40203 I ran `kcmshell5 qtquicksettings` and my backend was set to `software`. I changed it to automatic and rebooted and my problems seem to be globally fixed. I do not believe that I ever set this setting to `software` so I do not know if there is a bug that caused the default setting to be set that way rather than automatic, so if this is not a bug, someone is free to mark this as resolved. It's done automatically on Plasma 5. On Plasma 6 we don't do this anymore as the upstream bug it's working around has been fixed. So we can consider this fixed on Plasma 6, and essentially unfixable on Plasma 5 (only workaround-able). Feel free to continue using that workaround on Plasma 5; glad you found it! |