Screen is artifacting after resume on Wayland

Hi!

I’m trying to get my computer to behave after resume. With X11 the screenlocker hangs and I have to switch to the virtual console (see post screen-locker-must-switch-to-virtual-console-and-back-to-get-password-dialog/18475/1).
Got an idea and tried wayland instead. Now the screenlocker works ever after the screens have been turned off.

But if the computer suspends, the screen is artifacting instead:

New windows seem to render somewhat better, but there are still a lot of glitches (I could make a screenshot using Spectacle etc).

If I switch to a virtual console and restart sddm everything is back to normal again, so it does not appear to be an issue with the graphics card itself.

The issue is 100% reproducible, so a clear bug. Don’t even know where to report it however.

How does the interaction between SDDM, Plasma and Wayland works? :thinking:

In dmesg, I see some "Graphics Exception"s:

[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 1 Error
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 2 Error
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 3 Error
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 9 Error
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: Shader Program Header 18 Error
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: ESR 0x405840=0x8204020e
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: ESR 0x405848=0x80000000
[fre jul 19 23:00:28 2024] NVRM: Xid (PCI:0000:03:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception: ChID 0088, Class 0000b197, Offset 00003498, Data 00000012

No idea if that’s related.

Any ideas?

I do have graphical glitches from time to time after resuming, I seems that some graphics memory seems to be decaying while suspended. Getting the system do redraw (by logging out or restarting) does eliminate the glitches. The glitches also flicker, but I think this might be due to the double buffering.

Here is an example of the glitch:

If you have an NVIDIA GPU, make sure you’ve followed Distributions/Packaging Recommendations - KDE Community Wiki if you’re using a distro that didn’t do it automatically.

Yes - I double checked - these instructions were already implemented.

Here is another view of the artifacts on the desktop.
They exhibit a strange behavior in that they flicker, however they can be altered, for example by drawing a marking rectangle on the desktop or dragging a window over it.

All that stays on the desktop image. Windows above it are not affected by that.

I do have a video, but how could I upload it here?

Changing the resolution (and back) did reset that behavior on the background.