Xwayland on-demand does not autoterminate

It is my understanding that mutter should only start Xwayland as needed (on demand), and terminate it when no X11 apps require it.

Xwayland is running constantly here on an up to date arch install with gnome-shell / mutter 45.0, and as of today packaged against git main head. This is just a curiosity.

$ xlsclients 
myhostname  gsd-xsettings

Xwayland is launch at login and persists. Perhaps due to nVidia?

  • Arch Linux | Kernel 6.5.7
  • nVidia | Wayland
  • Gnome-shell | Mutter 45
  • NVIDIA Driver Version: 535.113.01

What is the output of gsettings get org.gnome.mutter experimental-features?

$ gsettings get org.gnome.mutter experimental-features
@as []

Oh, I didn’t realize this was something that needs to be set manually.

EDIT:

Now it’s:

$ gsettings get org.gnome.mutter experimental-features
['autoclose-xwayland']

So,

  1. Xwayland was not running at login
  2. Launched an X11 app, Xwayland fired up.
  3. Closed X11 app, Xwayland still running
$ ps -ef | grep [X]w
myusername       16704   16087  0 09:57 ?        00:00:00 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.6ZRVC2 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7 -byteswappedclients -terminate 10

I don’t see the -terminate switch on the man page for Xwayland.

EDIT 2:

I noticed

$ xlsclients 
myhostname  gsd-xsettings
myhostname  mutter-x11-frames

Out of curiosity I killed both processes, but XWayland persists.

Completely disabling X11 with the following does prevent Xwayland.

$ systemctl --user edit org.gnome.Shell@wayland.service
[Service]
ExecStart=
ExecStart=/usr/bin/gnome-shell --no-x11

However, that’s not a viable workaround as I’ve still got at least one critical X11-based app I rely on.

Just looking for the on-demand functionality of Xwayland to work properly.

Should I file a bug with Mutter regarding this failure?

I filed an issue with mutter for this:

This is working as expected after building mutter from renderer/native: Send modifiers even without AddFb2 (909cc6c2) · Commits · GNOME / mutter · GitLab

Closing.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.