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> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | fgonzalez.neso, jsteinaker, nate, postix, thanantonop, wojtasjd |
Priority: | NOR | Flags: | jan.rathmann:
Wayland+
|
Version: | 5.24.5 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
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
Created attachment 149346 [details]
Output of lshw
Created attachment 149347 [details]
radeon driver: Corrupted screen after suspend
Created attachment 149348 [details]
Output of lshw in english
Sorry, the output of lshw I first posted was in german, attaching an english version.
(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. 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. 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. 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. 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. 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. I have similar issue with corrupted screen ( https://bugsfiles.kde.org/attachment.cgi?id=149347 ) in: - openSUSE 15.4, kernel 5.14.x and KDE Plasma 5.24.4 (installed on disk) - neon-user-20230420-0722.iso (kernel 5.19; KDE Plasma 5.27.4 ; with user "neon" logged out from X11 and logged in to Wayland live session) I have AMD Radeon HD 6570 (GPU name: TURKS, generation: Northern Islands) - with radeon driver; amdgpu does not support this card. In my case I don't need to suspend the machine, it is enough to switch from TTY1...6 (text login prompt) to TTY8 (Plasma) and screen is corrupted (with good mouse cursor). To 'repair' this I need to switch to TTY7 (SDDM) and back to TTY8 (Plasma). After repair, again switching to TTY1...6 (but not TTY7 (SDDM)) and back to TTY8 (Plasma) - screen is distorted (with good mouse cursor)... Same behavior with KDE neon (TTY numbers different). (In reply to WojtasJD from comment #10) > I have similar issue with corrupted screen ( > https://bugsfiles.kde.org/attachment.cgi?id=149347 ) in: > - openSUSE 15.4, kernel 5.14.x and KDE Plasma 5.24.4 (installed on disk) > - neon-user-20230420-0722.iso (kernel 5.19; KDE Plasma 5.27.4 ; with user > "neon" logged out from X11 and logged in to Wayland live session) > > I have AMD Radeon HD 6570 (GPU name: TURKS, generation: Northern Islands) - > with radeon driver; amdgpu does not support this card. > > In my case I don't need to suspend the machine, it is enough to switch from > TTY1...6 (text login prompt) to TTY8 (Plasma) and screen is corrupted (with > good mouse cursor). > To 'repair' this I need to switch to TTY7 (SDDM) and back to TTY8 (Plasma). > After repair, again switching to TTY1...6 (but not TTY7 (SDDM)) and back to > TTY8 (Plasma) - screen is distorted (with good mouse cursor)... > > Same behavior with KDE neon (TTY numbers different). Got a HD 7750 (VERDE, Southern Islands). In my system, the screen corruption appears with both of them radeon and amdgpu, in the same fashion and equally work-aroundable as yours. At this point, I'm unsure if this is a GPU driver bug, from KDE or even Wayland, since this doesn't happen in GNOME (Wayland). Maybe they implemented some way to switch back from TTY without screen artifacts. By the way, this corruption doesn't occur on XOrg. I can confirm the same with old AMD HD 5450 video card. With X11 all works fine. I can confirm that in Gnome with wayland everything also works fine so the problem is on Plasma. My current version is 5.27.10 |