After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759538 - mutter requires X11/Xwayland even on Wayland
mutter requires X11/Xwayland even on Wayland
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 776684 780728 784834 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-12-16 11:03 UTC by Olivier Fourdan
Modified: 2020-11-13 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Fourdan 2015-12-16 11:03:09 UTC
Summary:

When using GNOME on Wayland session, mutter/gnome-shell will spawn Xwayland even if no X11 application requires it (unlike Weston which spawns Xwayland only when needed).

Looking into mutter code, it appears that its event loops is still based on X11, making much harder to remove Xwayland/X11 at startup.
Comment 1 Owen Taylor 2015-12-16 14:06:52 UTC
Hi Olivier. I'm going to close this as NOTABUG - not because it's not an area for improvement, but because a bug to track this doesn't seem particularly useful to me.

It's a major work item to fix this - an even bigger problem than event handling is that we use the X11 backend to GTK+ for various things within Mutter and GNOME Shell, such as theme drawing and input methods. I think we'd need to eliminate the use of GTK+ for input methods, then have some no-backend mode to use GTK+ for theme drawing without actually opening a connection to a display server.
Comment 2 Olivier Fourdan 2015-12-16 14:17:02 UTC
Sure, but I'd rather have kept the bug opened, possibly as an enhancement/low priority bug so we don't forget that getting rid of X11 in gnome-shell/mutter on Wayland remains a goal (even if a long term one :-) ).
Comment 3 Jasper St. Pierre (not reading bugmail) 2015-12-16 18:20:25 UTC
Well theme drawing isn't used on pure Wayland, since those decorations are only used by X11 applications.

I don't think it's that realistic of a goal -- I got it working by commenting out various pieces before, but everywhere is littered with core X calls. (I got it to work by stubbing out the X error handler and having those X calls silently fail, which is actually similar to what we even to today -- we make lots of X calls with "window ID 0" for Wayland windows that we trap errors on).

I agree that we should open and leave at low priority.
Comment 4 Olivier Fourdan 2017-01-02 14:29:46 UTC
*** Bug 776684 has been marked as a duplicate of this bug. ***
Comment 5 Jeremy Bicha 2017-04-01 15:22:09 UTC
*** Bug 780728 has been marked as a duplicate of this bug. ***
Comment 6 what103 2017-04-01 16:38:43 UTC
(In reply to Olivier Fourdan from comment #2)
> Sure, but I'd rather have kept the bug opened, possibly as an
> enhancement/low priority bug so we don't forget that getting rid of X11 in
> gnome-shell/mutter on Wayland remains a goal (even if a long term one :-) ).

nice :) gg gl gj wp

but imh0 all simle. some packages example nautilus have depends X of gvfs and more libice6 and libxtst6 or libsm6.

if install pure gnome-shell without depends in aptitude. we have X depends from gnome-session-bin, gnome-session, dbus-x11, libice6, libxklavier16, libxtst6, xwayland. and only self gnome-shell package depends from this apps, other depends gnome-shell no have depends x depends.

then i think is veeeery long time term, you right.
Comment 7 Florian Müllner 2017-07-12 08:52:21 UTC
*** Bug 784834 has been marked as a duplicate of this bug. ***
Comment 8 Ray Strode [halfline] 2017-10-18 18:21:23 UTC
see also https://github.com/krezovic/mutter/commits/gsoc-final
Comment 9 Ray Strode [halfline] 2017-10-18 18:21:45 UTC
(and https://armin-gnome.blogspot.ba/2017/08/the-gsoc-wrap-up.html )
Comment 10 Ray Strode [halfline] 2017-10-18 18:53:43 UTC
(and https://git.gnome.org/browse/mutter/log/?h=wip/xwayland-on-demand )
Comment 11 Jonas Ådahl 2018-01-03 08:34:43 UTC
Current relatively up to date branches:

mutter:
https://github.com/jadahl/mutter/commits/wip/xwayland-on-demand-rebased (based on https://gitlab.gnome.org/carlosg/mutter/commits/gsoc-final-v2 )

gnome-shell:
https://github.com/jadahl/gnome-shell/commits/wip/libmutter-2

gnome-shell-extensions:
https://gitlab.gnome.org/jadahl/gnome-shell-extensions/tree/wip/libmutter-2

Testing done:

I can start gnome-shell with these branches, and things seems to work, but haven't done any extensive testing. gnome-shell-extensions I have not tested.

Note that this is just the gsoc branch rebased, i.e. the API changes and code refactoring done in preparation, as well as gnome-shell/gnome-shell-extensions being updated. X11 is still very much relied upon.
Comment 12 Carlos Garnacho 2018-01-11 15:42:22 UTC
(In reply to Jonas Ådahl from comment #11)
> Current relatively up to date branches:
> 
> mutter:
> https://github.com/jadahl/mutter/commits/wip/xwayland-on-demand-rebased
> (based on https://gitlab.gnome.org/carlosg/mutter/commits/gsoc-final-v2 )
> 
> gnome-shell:
> https://github.com/jadahl/gnome-shell/commits/wip/libmutter-2

I tested these two branches, and testing looks positive without --no-x11 flag (had to manually bump libmutter api version though, I guess you have that commit locally).

> Note that this is just the gsoc branch rebased, i.e. the API changes and
> code refactoring done in preparation, as well as
> gnome-shell/gnome-shell-extensions being updated. X11 is still very much
> relied upon.

As announced here, running with --no-x11 doesn't get too far yet. The points of failure are easily visible though. It would be awesome to iron out enough low hanging fruits to run x11-less gdm before this cycle's freeze, but I already consider this a wonderful start.

So, +1 to get it merged ASAP :). Seeing there's a few fixup commits there, can I assume you will sort the merge out?
Comment 14 André Klapper 2020-11-13 20:00:04 UTC
Superseded by https://gitlab.gnome.org/GNOME/mutter/-/issues/1243