Running an app on another AMD GPU (offload, DRI_PRIME) produces corrupted frames on Wayland.
(When I say "offload an app" I mean to run it on the GPU that the Wayland Compositor isn't running on)
Brief summary of the problem:
I have an AMD gpu and AMD igpu. When I run a Wayland Compositor(tested wlroots[Sway, Hyprland]) on one GPU and offload an app to the other GPU, I get corrupted frames of the application.
(On KDE[Wayland] instead of showing corrupt frames the application just segfaults)
However, this doesn't happen in every application. Chromium isn't affected by this and can be offload just fine.
Also, if I offload an app and run it through XWayland instead of native Wayland, it works fine.
Firefox and MPV used to also not work with offload for a while, but after updating my system they work fine..
Nautilus and Waydroid have the issue.
Hardware description:
- CPU: AMD Ryzen 9 7900X AM5 Tray
- GPU:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5)
12:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c2)
- System Memory: 2 x 16GB of DDR5 RAM @ 5600MHz
- Display(s): External monitor 1920x1080 @ 60 Hz.
- Type of Display Connection: Cable connects to the IGPU with HDMI, then uses an HDMI to VGA adapter to connect to the monitor that receives VGA.
- Motherboard: Gigabyte B650M AORUS ELITE AX
System information:
- Distro name and Version: NixOS Unstable
- Kernel version: 6.5.1
- Custom kernel: Not custom.
- AMD official driver version: N/A
How to reproduce the issue:
Run a wlroots Wayland compositor(such as Sway or Hyprland) on one GPU and run Nautilus on the other GPU(offload).
Offloading an app is a very common practice, which leads me to believe the issue is with the AMD GPU drivers(of either the igpu, dgpu or both) and not with the Wayland compositors I've tried. I may be wrong though.
Attached files:
In the video demonstrating the bug I run a Wayland Compositor based on wlroots named "Hyprland" on my IGPU(12:00.0).
I then open Nautilus without offloading it to the DGPU(03:00.0).
After reviewing it functions as excepted, I close Nautilus and open it again on the DGPU(03:00.0) (offload) and the app produces corrupted frames.
From what it seems, the corruption appears where there's damage to the surface. Resizing corrupts the entire frame as seen in the video.
Log files (for system lockups / game freezes / crashes)
None