Pipewire Screen Capture Broken on Unredirected Windows [45] [Wayland] [Nvidia]
Affected version
Hardware Information:
- Hardware Model: ASRock A320M-DGS
- Memory: 16,0 GiB
- Processor: AMD Ryzen™ 5 3600 × 12
- Graphics: NVIDIA GeForce RTX™ 3070
- Disk Capacity: 1,8 TB
Software Information:
- Firmware Version: P7.30
- OS Name: Fedora Linux 39.20231009.n.0 (Silverblue Prerelease)
- OS Build: (null)
- OS Type: 64-bit
- GNOME Version: Not Available
- Windowing System: Wayland
- Kernel Version: Linux 6.5.6-300_tkg_zen2.fc39.x86_64
(I'm using a Dual Monitor system with Different Refresh Rates, I wonder if that might be a factor)
Bug summary
When opening a fullscreen window, XWayland or Native, if it hits the Direct Scanout path the Pipewire Screen Capture (Both discord-screenaudio & Firefox & OBS) freezes on the last frame.
A temporary workaround would be to disable Unredirection with the appropriate extension although, because of the performance, latency and efficiency implications, it does not qualify as a fix.
I've been able to reproduce this issue on Stock Gnome 44-45 and on a patched version (Triple Buffering and other optimisations, some of which make Direct Scanout more likely to be hit making this more noticeable) (I also used the Stock Fedora Kernel so it doesn't seem to be a relevant factor).
Interestingly enough the integrated screen recorder, although laggy, seems to be working as expected.
This issue should already be fixed and, hopefully but I don't have the technical knowledge to determine it, not by disabling Direct Scanout entirely while streaming.
I would be glad if someone could test this on their system, especially if they have a GPU relying on Mesa (AMD/Intel)
Steps to reproduce
- Start a Pipewire Screen Recording (not Window as that works perfectly)
- Fullscreen any Native or XWayland Software that gets Directly Scanned Out (Proton Games as well as most native software)
What happened
The stream freezes until compositing resumes (ex. Opening the Overview).
What did you expect to happen
The stream should have continued to work, rendering the appropriate fullscreened window (Without disabling Unredirection as well).
Relevant logs, screenshots, screencasts etc.
I will provide a demonstration recording soon, take this line as a digital post-it.