sway
sway copied to clipboard
Major visual glitches when fullscreening video in two-gpu amdgpu setup
- Sway version: 1.7
- Log: https://dpaste.com/FQCE96L2Y
- Issue exists with default config
Image showing problem: https://i.imgur.com/Jo68i7u.jpg
Basic issue
Basically, when I fullscreen certain applications on the screen driven by the secondary/passive GPU in a 2-GPU setup, I get a bunch of artifacts as output, which change according to what is being displayed in the background (e.g. you see motion when a video is playing), but you can't make anything out. I do not see this behaviour when fullscreening apps on the screen driven by the 'primary' gpu.
The problem only happens when the cursor and is not visible on that screen: if I move the cursor off the screen, or if it drops into the 'background'. As soon as the cursor is visible on the screen, no more corruption.
If I leave it fullscreened with artifacts showing, after a time (sometimes almost immediately) it will seemingly cause my video cards to 'lock up': both screens go black, the RGB lights on the video card will shut off, and the system seems responsive but can't soft-shutdown. This might be AMDGPU crashing or something.
Some background/contextual stuff:
GPU1: AMD RX 580 - AMDGPU GPU2: AMD R9 270X - AMDGPU (also happened using Radeon) CPU: Ryzen 3600 Mobo: ASUS Strix B450F - most recent BIOS OS: Gentoo - Linux 5.16.17
I start sway like this:
WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 dbus-run-session sway
I believe this just makes my primary card render video, with the other card playing a more passive role.
When I flip the order of cards in WLR_DRM_DEVICES (card1:card0), this issue starts happening on the monitor driven by card0. So the problem applies to whichever is the secondary/passive gpu.
I only recently started using my second gpu, and I noticed it right away. It didn't appear with a sway version change or anything.
I am willing to provide a stack trace, but I'm not using systemd so I don't think I can follow the instructions included in the template. I'm also not sure if sway technically crashes.
Testing various apps
I don't see the corruption when fullscreening every application.
I get corruption using:
- alacritty
- nextcloud client
- mpv
- vlc
- signal-desktop
- steam
- gcolor2 (gtk2 color picker)
- imv
- gimp
but not:
- Firefox
- Chromium
- keepassxc
- transmission-gtk
- zathura-pdf-mupdf
- evince
- seahorse
- pavucontrol
- obs
- LibreOffice
- qemu window
This is likely fixed by https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f350ddadca3b96c72ed1481875f0b8fc1a01612 released in kernel 5.16.
Cool, thank you!
I have upgraded to Kernel 5.16.16 and unfortunately the problem persists :( It also happens for other apps besides video players,. Can't believe I didn't try this earlier.
So far I get this corruption using:
- alacritty
- nextcloud client
- mpv
- vlc
- signal-desktop
- steam
- gcolor2 (gtk2 color picker)
- imv
- gimp
but not:
- Firefox
- Chromium
- keepassxc
- transmission-gtk
- zathura-pdf-mupdf
- evince
- seahorse
- pavucontrol
- obs
- LibreOffice
- qemu window
Edit: I'm going to order a new power supply to take that out of the equation. It's due for replacement anyway.
Just updating to say that I am using a new power supply and the issue persists, so we can rule that potential cause out.
Another update: Following the advice here I added the -Dnoscanout
option to sway, and the problem goes away.
This will probably be my last bump on this unless someone would like me to try something out.
Thank you, -Dnoscanout
worked for me as well. I only use a single AMD GPU though and my kernel version is 5.17.3.
Also saw these artifacts in the form of banding on one of two monitors. This was without any application being fullscreen and with only waybar running. Moving the cursor was enough to agitate it. The -Dnoscanout
option also seems to fix it. Experienced this with both the Vulkan and GLES renderers.
GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] (rev c8) OS: Arch Linux Kernel: 6.8.1-arch1-1 Mesa: 1:24.0.3-2 Vulkan: vulkan-radeon 1:24.0.3-2 Sway: sway version 1.9