Created attachment 175513 [details] Example of OBS running on integrated GPU (using DRI_PRIME=1!) and attempting to screenshare SUMMARY I have a system with two GPUs, the one built-in to the 7800x3d and my dedicated GPU is a Radeon RX580. When running applications on a different GPU, I can not use the screensharing portal from that application as it results in corrrupted output. Applications running on the other GPU display properly but if from inside that application I attempt to screenshare I get something like what I've attached. I have reproduced it both ways. In my usual setup I have all display outputs connected to the dedicated GPU, and if I open OBS/Firefox/Chrome (or any other application with screensharing functionality) I get corrupted output. If I switch all my outputs to my iGPU, restart KDE and then run OBS on my dedicated GPU, then I get corrupted output. For what it is worth, this does not seem to be a kde-only issue either, the same happens in Hyprland using their portal. If I were to guess it is because my dedicated GPU does not support modifiers at all (only LINEAR it seems), and otherwise uses INVALID/internal modifiers. But I have a feeling this might still be a portal bug since I don't think portals should give buffers with internal modifiers but maybe a linear copy instead. I have attached wayland-info output for this as well. STEPS TO REPRODUCE 1. Use a multi-gpu setup, open an application using an alternate GPU and attempt to screenshare 2. Select any window/display/etc in the screen share portal OBSERVED RESULT Corrupted output SOFTWARE/OS VERSIONS Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.2 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 Kernel Version: 6.11.6-cb3.0.lto.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor Memory: 30.5 GiB of RAM Graphics Processor: AMD Radeon Graphics ADDITIONAL INFORMATION Here is some output from OBS that might be useful info: [pipewire] Created stream 0x5f42746152e0 info: [pipewire] Stream 0x5f42746152e0 state: "connecting" (error: none) info: [pipewire] Playing stream 0x5f42746152e0 info: [pipewire] Stream 0x5f42746152e0 state: "paused" (error: none) info: [pipewire] Negotiated format: info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA) info: [pipewire] Modifier: 0x0 info: [pipewire] Size: 1920x1080 info: [pipewire] Framerate: 0/1 info: [pipewire] Negotiated format: info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA) info: [pipewire] Modifier: 0xffffffffffffff info: [pipewire] Size: 1920x1080 info: [pipewire] Framerate: 0/1
Created attachment 175514 [details] output of wayland-info
> If I were to guess it is because my dedicated GPU does not support modifiers at all (only LINEAR it seems), and otherwise uses INVALID/internal modifiers. But I have a feeling this might still be a portal bug since I don't think portals should give buffers with internal modifiers but maybe a linear copy instead The problem is that with implicit modifiers, there's no way to tell the other application that we're making the buffer linear. Maybe we can special case the situation where the receiving application requests explicit modifiers and we don't support them (-> definitely on another GPU), and claim only a linear modifier as supported... that *might* work out for your case. For a more general fix for when the receiving application only does implicit modifiers, we'd likely need pipewire to add new API and apps would need to use it, so that we can tell them the buffer is linear.