Bug 481182 - Using Wayland only, when resuming from sleep the taskbar and desktop are always corrupted
Summary: Using Wayland only, when resuming from sleep the taskbar and desktop are alwa...
Status: CLOSED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.93.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-10 19:33 UTC by briguy992
Modified: 2024-02-12 00:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Video taken moments after resuming from sleep. Note I use the standard Breeze Dark theme. (2.45 MB, video/mp4)
2024-02-10 19:35 UTC, briguy992
Details

Note You need to log in before you can comment on or make changes to this bug.
Description briguy992 2024-02-10 19:33:00 UTC
SUMMARY
Using KDE 6 RC2, when using Wayland only, when I resume from sleep the desktop is completely corrupted and unusable 100% of the time, and the taskbar, and other KDE items are missing text, missing UI elements, flashing colors, etc.

I use the Breeze Dark theme, but as seen in the video taken moments after I resumed from sleep, it is not my theme.

This repro's using both the nvidia stable and nvidia beta proprietary drivers.

When I switch back to X11, this does not repro.

STEPS TO REPRODUCE
1. Using KDE 6 RC2 with Wayland, at the desktop use Sleep to put the PC to sleep
2. Wake the PC once it has gone to sleep
3. Observe task bar and desktop

OBSERVED RESULT
Taskbar and Desktop are corrupted, preventing you from using your system

EXPECTED RESULT
When resumed, there should not be corruption and it should match the state when you put it to sleep.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Linux Kernel: 6.7.4-arch1-1
Nvidia driver version: 550.40.07
Comment 1 briguy992 2024-02-10 19:35:25 UTC
Created attachment 165732 [details]
Video taken moments after resuming from sleep. Note I use the standard Breeze Dark theme.
Comment 2 kde.4c12n 2024-02-11 23:35:34 UTC
(In reply to briguy992 from comment #0)
> SUMMARY
> Using KDE 6 RC2, when using Wayland only, when I resume from sleep the
> desktop is completely corrupted and unusable 100% of the time, and the
> taskbar, and other KDE items are missing text, missing UI elements, flashing
> colors, etc.
> 
> I use the Breeze Dark theme, but as seen in the video taken moments after I
> resumed from sleep, it is not my theme.
> 
> This repro's using both the nvidia stable and nvidia beta proprietary
> drivers.
> 
> When I switch back to X11, this does not repro.
> 
> STEPS TO REPRODUCE
> 1. Using KDE 6 RC2 with Wayland, at the desktop use Sleep to put the PC to
> sleep
> 2. Wake the PC once it has gone to sleep
> 3. Observe task bar and desktop
> 
> OBSERVED RESULT
> Taskbar and Desktop are corrupted, preventing you from using your system
> 
> EXPECTED RESULT
> When resumed, there should not be corruption and it should match the state
> when you put it to sleep.
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: 
> (available in About System)
> KDE Plasma Version: 5.93.0
> KDE Frameworks Version: 5.249.0
> Qt Version: 6.7.0
> 
> ADDITIONAL INFORMATION
> Linux Kernel: 6.7.4-arch1-1
> Nvidia driver version: 550.40.07

I had a similar issue on KDE 5.27, have you followed the steps under https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend ? That completely fixed it for me.
Comment 3 briguy992 2024-02-12 00:25:44 UTC
(In reply to kde.4c12n from comment #2)
> (In reply to briguy992 from comment #0)
> 
> I had a similar issue on KDE 5.27, have you followed the steps under
> https://wiki.archlinux.org/title/NVIDIA/
> Tips_and_tricks#Preserve_video_memory_after_suspend ? That completely fixed
> it for me.

Just tried this, and it did work! Thanks! One of my biggest issues with switching to KDE 6 release instantly solved for me. I will go ahead and close this as it looks like this issue is not for KDE, rather Nvidia and/or distro maintainers.

Just to explain what I did for anyone who stumbles on this. Per the wiki, I made a conf file in /etc/modprobe.d/ with the NVreg_PreserveVideoMemoryAllocations option. I also enabled the three services listed. Because I'm on EndeavourOS I used dracut to regenerate the initrds ( https://discovery.endeavouros.com/installation/dracut/2022/12/ ). Restart the PC and I was able to sleep twice in a row without any issue, whereas before it was 100% hitting this after every sleep.