Gentoo Archives: gentoo-user

From: Mart Raudsepp <leio@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gdm is running Xwayland, what about startx?
Date: Sat, 12 Jun 2021 08:53:53
Message-Id: 3f81eaf74e30079d29c4e342717b14a05d578fc0.camel@gentoo.org
In Reply to: [gentoo-user] gdm is running Xwayland, what about startx? by Adam Carter
1 Ühel kenal päeval, T, 08.06.2021 kell 18:04, kirjutas Adam Carter:
2 > I've noticed that my gdm system is running /usr/bin/Xwayland instead of
3 > /usr/bin/Xorg, so I infer that Gentoo devs, or upstream, are preferring
4 > it now.
5
6 It isn't really running in Xwayland really, it's running natively with
7 the Wayland protocol. Xwayland is a by-product of supporting
8 applications that still use X11 and settings for such applications. gdm
9 itself does not implement a GUI - it makes use of a login mode of
10 gnome-shell for that purpose. Future versions of GNOME will be able to
11 default to running Xwayland on-demand, so in the future you won't see
12 Xwayland running with just gdm, as no legacy applications are needed.
13 Right now I believe some accessibility things might need it still in
14 theory, so it isn't yet always skipped with GDM either.
15
16 GDM uses wayland when it can and all the support has been built for
17 that with USE=wayland on a bunch of packages, including GDM itself.
18
19 > Can i try Xwayland with startx?
20
21 No, Xwayland isn't something that can really run without a native
22 Wayland compositor, to my knowledge.
23 You can read up on what Xwayland is from
24 https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Compatibility_with_X
25 and elsewhere through your favorite Internet search engine.
26
27 > pstree shows the execution paths as below. Inscrutable to me and
28 > interesting that they're so different.
29 >
30 > gdm: systemd -> gnome-shell -> Xwayland
31 > startx: startx -> xinit -> X (AND in parallel) gnome-session -> gnome-
32 > shell
33
34 startx is incapable of running Wayland sessions, so it forces the
35 legacy Xorg GNOME session, which you'd also get if you explicitly
36 choose "GNOME on Xorg" from gdm.
37
38 One big benefit of having GDM running with Wayland, even if you have to
39 pick Xorg for your GNOME due to some legacy app not supporting
40 screencasting portal or something along those lines, is that GDM when
41 using Wayland is capable of shutting down the gnome-shell it uses when
42 you aren't on GDM VT (i.e, have logged into a desktop session) and will
43 start it back up when you go back to GDM VT (i.e, you log out of your
44 desktop), which is not implemented for Xorg using GDM. This saves on
45 memory usage, as you don't have a background gnome-shell kept running.
46 Currently GDM also is incapable of starting Wayland session when it
47 itself isn't "using" Wayland.
48
49
50 Best,
51 Mart

Attachments

File name MIME type
signature.asc application/pgp-signature