The way that Mutter manages multiple GPUs on wayland is by selecting a primary GPU (which can be overridden with udev rules, which I have done), then putting other GPUs in copy mode and having the primary write frames to the others’ memory.
This works well for desktop tasks, but I’m specifically trying to have videos on the internal monitor accelerated by the internal GPU. Has anyone managed this? Right now, with YouTube playing on the second monitor, intel_gpu_top shows that the secondary GPU is rendering frames, but not using video acceleration, because the actual work is being done by the primary GPU and then copied to the second. I can confirm that video acceleration on the integrated GPU works when it’s selected as the primary gpu or when my eGPU is disconnected. Any thoughts?
Nvidia’s proprietary GLX library breaks PRIME offload - due to being incompatible.
What you’re doing ‘just works’ with Dual stack AMDGPU/INTEL;
i’ve managed to cobble nvidia prime rendering offload between scannout on AMDGPU and external Nvidia by forcing several things, but it’s horribly broken (glitches, colour surface conversions, broken refresh rates between outputs)- but it’s going to suck due to the above. You could possibly use sway and a create a virtual output and then a viewer using something like sunshine or looking glass if you want a reasonable experience.
You ‘might’ be able to get it to work with NVK nowdays.
Basically anything with upstream Mesa will support copy buffers between scanouts. As soon as you’re running proprietary you’re not going to have a good time.
I don’t think this is prime offload or reverse prime. Neither work on Wayland due to lack of nvidia support for the right swapchain Vulkan extension, not GLX.
I’m aware of copy buffers, I specifically don’t want a copy buffer for the internal screen to be written to by the external GPU for video because then the video hardware that’s meant to be for the internal screen goes unused.