|Summary:||amdgpu driver: Flickering in Wayland session after suspend without lock screen enabled|
|Product:||[Plasma] kwin||Reporter:||Jan Rathmann <jan.rathmann>|
|Component:||wayland-generic||Assignee:||KWin default assignee <kwin-bugs-null>|
|Severity:||normal||CC:||jsteinaker, nate, postix|
|Latest Commit:||Version Fixed In:|
Video showing the flickering
Output of lshw
radeon driver: Corrupted screen after suspend
Output of lshw in english
Description Jan Rathmann 2022-05-31 07:36:27 UTC
Comment 1 Jan Rathmann 2022-05-31 07:37:19 UTC
Created attachment 149346 [details] Output of lshw
Comment 2 Jan Rathmann 2022-05-31 07:38:26 UTC
Created attachment 149347 [details] radeon driver: Corrupted screen after suspend
Comment 3 Jan Rathmann 2022-05-31 07:44:36 UTC
Created attachment 149348 [details] Output of lshw in english Sorry, the output of lshw I first posted was in german, attaching an english version.
Comment 4 Javier Steinaker 2022-06-02 20:06:06 UTC
(In reply to Jan Rathmann from comment #2) > Created attachment 149347 [details] > radeon driver: Corrupted screen after suspend Jan, the exact same thing is happening to me ever since I've switched to Plasma (using Wayland). I'm using an old HP Sleekbook 14 (old AMD card, radeon graphics driver) and I get the same results as you. Things I've tried: - Disabling screen lock on suspend: same results, so likely kscreenlocker is not the culprit. - Using a different DE/Compositor: resuming behaves correctly (tested on Sway and gtkgreet using Cage), so it seems to be a Plasma thing. Running updated Arch Linux here. Might be a little difficult for me to try patches, unstable versions and the like since this is an old computer, but I can provide logs and run some tests if the devs need them.
Comment 5 Jan Rathmann 2022-06-04 09:22:59 UTC
Javier, is your card also supported by the amdgpu driver? (You can check by running 'lspci -k' and see if there is a line that says something like "Kernel modules: radeon, amdgpu") If yes, it could be helpful if you try it out and see if you can confirm the behaviour that I'm getting when using amdgpu (flickering when lock screen is disabled). Have you tested if everything works fine when you use Plasma X11 session instead? This would also be interesting to know.
Comment 6 Javier Steinaker 2022-06-04 21:02:23 UTC
No, unfortunately my card is not supported, there's no way I'd be using the radeon driver if AMDGPU was available. About the Plasma X11 thing, I gave it a try the other day, the session never started, and I kind of gave up for now. Might give it a try again in a few days.
Comment 7 Javier Steinaker 2022-06-05 22:44:55 UTC
Ok so I did the test using a Fedora KDE Live CD and suspending and resuming a Wayland session brings the same results to the table. On the X11 session suspending and resuming works fine for me.
Comment 8 Jan Rathmann 2022-10-15 09:05:00 UTC
Update: I recently got a new PC and I don't see the bug there anymore, without changing anything on the installed OS. For graphics now I use the integrated GPU of the Ryzen 7 5700G that also uses the amdgpu driver, same as before. So this bug may be a special problem related to my old graphics card, an Asus Radeon R7 240. For other people still affected, I can present you a really ugly workaround that nevertheless worked for me: * Create a systemd service roughly like this (Don't know if all of those environment variables are actually necessary. Don't forget to insert your actual user name/computer name etc.): ------------------------ [Unit] Description=Workaround to fix flickering after suspend under Wayland After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target [Service] ExecStart=/path/to/kwin-suspend-fix-flicker.sh User=YOUR_USER_NAME Environment=DISPLAY=:1 Environment=DESKTOP_SESSION="plasmawayland" Environment=DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/YOUR_NUMERICAL_USERID/bus" Environment=SESSION_MANAGER="local/YOUR_COMPUTER_NAME:@/tmp/.ICE-unix/1467,unix/YOUR_COMPUTER_NAME:/tmp/.ICE-unix/1467" Environment=XDG_RUNTIME_DIR="/run/user/YOUR_NUMERICAL_USERID" Environment=DESKTOP_SESSION="plasmawayland" declare -x DISPLAY=":1" Environment=XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0" Environment=XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session2" Environment=XDG_SESSION_TYPE="wayland" [Install] WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target ------------------------ * Then create a script kwin-suspend-fix-flicker.sh : ------------------------ #!/bin/bash qdbus org.kde.KWin /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "MinimizeAll" sleep 0.5 qdbus org.kde.KWin /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "MinimizeAll" ------------------------ This will run the Kwin effect "Minimize all" to stop the flickering, and the run the same effect a second time to restore the original positions of all windows.
Comment 9 Nate Graham 2022-10-15 14:00:33 UTC
It makes a lot of sense this this would be a GPU driver issue, yeah. You can file those at https://gitlab.freedesktop.org/drm/amd/-/issues.