Graphical glitches in dual monitor setup with full-screen video player (direct scanout)
Brief summary of the problem:
In a dual display setup (may occur in more than 2), if a video player is full screen on one display, such as MPV or YouTube full screened in a web browser, windows and context menus experience graphical glitches on the other display.
This issue does not occur if a window is dragged onto the video, causing it to render above the video.
See the attached video, where the following is depicted:
- MPV is full-screened on the left display, with a window on the right display
- Dragging the window around shows the graphical rendering errors
- MPV is un-fullscreened down to a window
- Dragging the window around no longer shows any issues
- MPV, while still windowed, is played
- Dragging the window around still does not show any issues
- MPV is full-screened with the video still playing
- Dragging the window around shows the rendering issues once again
Hardware description:
- CPU: 24 × AMD Ryzen 9 3900X 12-Core Processor
- GPU: 0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev cc)
- System Memory: 31.3 GiB of RAM
- Display(s): 2560x1440, 3440x1440
- Type of Display Connection: DP
System information:
- Operating System: Arch Linux
- KDE Plasma Version: 6.0.4
- KDE Frameworks Version: 6.2.0
- Qt Version: 6.7.0
- Kernel Version: 6.9.1-arch1-2 (64-bit)
- Graphics Platform: Wayland
How to reproduce the issue:
- On one display, play a video in full screen (using MPV or a web browser)
- On the other display, right click to open a context menu, or drag a window around
Additional Information
Not a recent bug, has been occurring for a while. This bug is not visible using direct screen capture (e.g. screenshots or video recordings). Originally reported as a KDE bug (https://bugs.kde.org/show_bug.cgi?id=487479).
I also have the following kernel parameters set on boot: Tested without these - issue still occurs.amdgpu.sg_display=0 radeon.dpm=0
.
Interestingly, running MPV full-screen with the GPU API set as vulkan (flatpak run io.mpv.Mpv --gpu-api=vulkan file.mp4
) opens an MPV instance which still reports as not having hardware decode enabled, but the issue no longer occurs.