mutter/wayland doesn't support multiple drm devices with EGLStreams
Setup : Ubuntu 20.04 (focal)
- /dev/dri/card0 is tegra_drm_next
- /dev/dri/card1 is nvidia-drm
- Mutter (3.36.9)
- gnome-shell (Wayland)
Mutter fails to run EGLStream (H/w) accelerated backend and falls back to CPU fallback and crashes with below logs.
Jan 17 18:10:45 localhost gnome-shell[1421]: Failed to initialize accelerated iGPU/dGPU framebuffer sharing: Do not want to use software renderer (llvmpipe (LLVM 12.0.0, 128 bits)), falling back to CPU copy path Jan 17 18:10:45 localhost gnome-shell[1421]: Could not create onscreen: Failed to allocate surface Jan 17 18:10:46 localhost systemd[972]: gnome-shell-wayland.service: Main process exited, code=dumped, status=11/SEGV
The steps are simple where we have more than one drm devices (/dev/dri/card[0,1]) nvidia-drm driver is the one which has drm-kms and lists the physical connector/crtcs/encoders. The gnome-shell --wayland backend should be able to launch but it fails due to count_drm_devices check present which causes the EGLStream backend to return.
When checking the latest code this function is not used. Refer : mutter@d4e8cfa1
Locally by removing the above check, the mutter (wayland) with EGLStream backend runs well. Could you comment on if the count_drm_devices check which is prohibiting us to use EGLStream on Ubuntu focal (20.04) can be removed?