mutter headless kills Xwayland with a protocol error on NVIDIA proprietary driver
Affected version
- Fedora 39
- mutter 45.0
- Wayland headless
- NVIDIA driver 535.113.01
Bug summary
I have been working lately on a Python script to spawn X11 clients on Xwayland on top of various headless Wayland compositors:
https://gitlab.freedesktop.org/ofourdan/xwayland-run
This works fine on the Open Source drivers, yet it fails with the NVIDIA proprietary driver, Xwayland itself gets killed by a protocol error:
libmutter-WARNING **: 12:11:20.147: WL: error in client communication (pid 5787)
XWAYLAND: [destroyed object]: error 7: failed to import supplied dmabufs: One or more argument values are invalid.
(EE) failed to dispatch Wayland events: Protocol error
The same works fine with say Weston or cage (a wlroots based kiosk compositor). but fails reliably on mutter or gnome-kiosk.
Steps to reproduce
Simply run mutter headless with any X11 client:
mutter --wayland --headless --virtual-monitor 1920x1080 -- xterm
What happened
Xwayland dies, and so does mutter.
libmutter-Message: 13:15:53.853: Using public X11 display :2, (using :3 for managed services)
libmutter-Message: 13:15:53.853: Using Wayland display name 'wayland-1'
libEGL warning: egl: failed to create dri2 screen
libmutter-WARNING **: 13:15:54.127: WL: error in client communication (pid 6400)
XWAYLAND: [destroyed object]: error 7: failed to import supplied dmabufs: One or more argument values are invalid.
(EE) failed to dispatch Wayland events: Protocol error
libmutter-WARNING **: 13:15:54.137: Connection to xwayland lost
libmutter-WARNING **: 13:15:54.137: Xwayland terminated, exiting since it was mandatory
What did you expect to happen
Xwayland works
Relevant logs, screenshots, screencasts etc.
Not sure if this is a bug in mutter, or in Xwayland, or in the NVIDIA proprietary driver.
Another finding, weston-simple-dmabuf-feedback
also fails when running in mutter nested on NVIDIA proprietary driver, regardless of Xwayland:
$ mutter --no-x11 --wayland --headless --virtual-monitor 1920x1080 -- weston-simple-dmabuf-feedback
[…]
weston-simple-dmabuf-feedback: ../clients/simple-dmabuf-feedback.c:419: create_fbo_for_buffer: Assertion `buffer->egl_image != EGL_NO_IMAGE_KHR && "error: EGLImageKHR creation failed"' failed.
whereas the same works fine in weston headless:
$ weston --no-config --backend headless --renderer gl --socket wayland-1234 & sleep 1; WAYLAND_DISPLAY=wayland-1234 weston-simple-dmabuf-feedback