Summary: | Random whole screen flashes/flicker on the desktop on Wayland when using AMS | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | nf.pereira |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | CLOSED UPSTREAM | ||
Severity: | major | CC: | nate, xaver.hugl |
Priority: | NOR | ||
Version: | 5.25.4 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://gitlab.freedesktop.org/drm/amd/-/issues/1991 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
debug plasma-kwin_wayland.txt
drm-debug.zip |
Description
nf.pereira
2022-08-31 13:37:34 UTC
Forgot to mention this is on a clean Arch install. Can you paste the output of qdbus org.kde.KWin /KWin supportInformation? Also helpful would be the output of drm_info, which you may have to install a new package to get. Sure thing! Here goes: qdbus: https://pastebin.com/xmGxH2j8 drm_info: https://pastebin.com/J6eEFZ6S I've also noticed my primary screen (the 1440p one) is the only one that flashes. My 1080p secondary screen does not seem to flash. Additionally, I've tested 180hz, 165hz and 60hz on the affected screen, but all refresh rates tested flash the screen all the same. The only difference being that at 60hz the flash seems longer, which is expected, as a single frame lasts longer at 60hz. I believe this bug might be masked for many users by the fact all users of this graphics card family also being affected by the cursor corruption bug in AMDGPU, which requires KWIN_DRM_NO_AMS=1 to work around on Wayland, which means they also don't observe this flashing bug. https://gitlab.freedesktop.org/drm/amd/-/issues/1513 Please tell me if I can help in any other way. Thanks a lot for the info! There's a few things you can do to narrow the source of this problem down. Unset KWIN_DRM_NO_AMS and 1. set QT_LOGGING_RULES="kwin_wayland_*.debug=true" instead, reproduce the problem and upload the output of "journalctl --user-unit=plasma-kwin_wayland" here 2. enable drm debug logging and record the output of dmesg with the problem happening at least once, and upload that here. See https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues for how to do that 3. set KWIN_DRM_USE_MODIFIERS=0 instead, check if the problem still happens 4. set KWIN_DRM_PREFER_COLOR_DEPTH=24 instead, check if the problem still happens Created attachment 151789 [details]
debug plasma-kwin_wayland.txt
Created attachment 151790 [details]
drm-debug.zip
(In reply to Zamundaaa from comment #5) > There's a few things you can do to narrow the source of this problem down. > Unset KWIN_DRM_NO_AMS and > 1. set QT_LOGGING_RULES="kwin_wayland_*.debug=true" instead, reproduce the > problem and upload the output of "journalctl > --user-unit=plasma-kwin_wayland" here Done. Attached it to the bug with the name "debug plasma-kwin_wayland.txt" > 2. enable drm debug logging and record the output of dmesg with the problem > happening at least once, and upload that here. See > https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues for how to > do that Done. Attached as "drm-debug.zip". I had to zip it to fit the upload constraints. > 3. set KWIN_DRM_USE_MODIFIERS=0 instead, check if the problem still happens This seems to fix the problem! I used it for half an hour without the problem ever manifesting. > 4. set KWIN_DRM_PREFER_COLOR_DEPTH=24 instead, check if the problem still > happens This does not fix it. After a minute or two, the screen flashed. KWIN_DRM_NO_AMS=1 effectively contains what KWIN_DRM_USE_MODIFIERS=0 does, so that explains why disabling AMS also solves the problem. The only error I see is that with KWIN_DRM_NO_AMS=1 set you get a large amount of these: > kwin_wayland_drm: Page flip failed: Device or resource busy which isn't necessarily ideal but with atomic modesetting enabled there's not a single warning or anything that I think would be relevant. As KWin has no information about the monitor flickering it can't do anything against it. The two things that could be at fault are either the GPU driver or possibly even the scanout hardware in the GPU. I recommend you to report this at https://gitlab.freedesktop.org/drm/amd/-/issues and use the KWIN_DRM_USE_MODIFIERS=0 workaround until it's fixed (In reply to Zamundaaa from comment #9) > The only error I see is that with KWIN_DRM_NO_AMS=1 set you get a large > amount of these: > > kwin_wayland_drm: Page flip failed: Device or resource busy > which isn't necessarily ideal but with atomic modesetting enabled there's > not a single warning or anything that I think would be relevant. KWIN_DRM_NO_AMS was not set when I saved those logs, as per your instructions. All the logs I posted here are with everything at defaults with no environment variables changed. (In reply to Zamundaaa from comment #9) > I recommend you to report > this at https://gitlab.freedesktop.org/drm/amd/-/issues and use the > KWIN_DRM_USE_MODIFIERS=0 workaround until it's fixed Indeed a bug has been opened for this issue here: https://gitlab.freedesktop.org/drm/amd/-/issues/1991 It seems it's related to the GPU not ramping the VRAM frequency up to the necessary level. I'm closing this as it's unrelated to KDE then. Thanks for the help and sorry for the trouble! |