Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Wayland - too early to try?
Date: Tue, 11 Jul 2017 22:06:05
Message-Id: 2383528.VzSdvfzbaC@dell_xps
In Reply to: Re: [gentoo-user] Re: Wayland - too early to try? by Mart Raudsepp
1 On Tuesday 11 Jul 2017 22:27:03 Mart Raudsepp wrote:
2 > Random information dump on the subject.
3 >
4 > Wayland is no program, it is a protocol, that's it. dev-libs/wayland is
5 > essentially a helper library to speak that IPC protocol.
6 >
7 > The window manager has to be the compositor and other things as well
8 > and do the input handling, window drawing, screenshot support, screen
9 > capture support, etc etc.
10 > Random programs can not take screenshots, listen to keys (think global
11 > keys, e.g outside desktop shortcuts/push2talk voip) without some
12 > protocol between the WM and the program. The Xorg programs for that
13 > essentially make use of Xorg design security issues to do stuff like
14 > take screenshots (random program can see your whole desktop screen with
15 > Xorg), listen to input (keyloggers are trivial with Xorg), etc.
16 > There are some standardization efforts going on between the desktop in
17 > various areas of this, to define wayland protocols to more securely
18 > support these things for applications. In some areas things are still
19 > lacking.
20 >
21 > To detect native wayland vs Xwayland or Xorg I like to use xprop.
22 > Running that command and clicking it on a window will give information
23 > about that window IFF it's using Xwayland or your whole session is in
24 > Xorg.
25 > But if you are still using Xorg, then you'll have a /usr/bin/X running.
26 > There is no X running with a wayland WM, just Xwayland at most for
27 > programs that don't support wayland natively.
28 > Xwayland is a rootless X server to run on top of a wayland supporting
29 > compositor. It's conceptually the same like Xquartz or Xming to run X11
30 > clients in some other environment.
31 >
32 > Wayland strives towards the "every frame is perfect" mantra. It is very
33 > hard for toolkits and other things to draw things halfway on monitor
34 > scan-out, so things like tearing are rather hard to accomplish, albeit
35 > possible still in certain situations.
36 >
37 > With wayland your programs need to do all the drawing themselves, which
38 > actually means often pure software rendering, but thanks to the
39 > smoothness of "every frame is perfect", it'll feel faster on your
40 > common system. You don't have RENDER extension to do some acceleration
41 > like you do in Xorg with many toolkits knowing about X RENDER (cairo in
42 > the gtk+ world). To get hardware acceleration, the toolkit itself needs
43 > to be able to use OpenGL (full or GLES), Vulkan, or similar. GTK+ 4
44 > will be able to do both. Games typically already use OpenGL or Vulkan
45 > and if they run natively on Wayland, they are still accelerated, often
46 > with some things out of the way compared to Xorg. Programs that don't
47 > run natively and end up using Xwayland are also accelerated via RENDER,
48 > as Xwayland makes use of GLAMOR, which implements RENDER in the
49 > (Xwayland rootless) X server on top of OpenGL. But as said, in practice
50 > things are fast and smooth already as-is, even if software rendering.
51 >
52 > One caveat of Wayland is that if the WM/compositor crashes, your whole
53 > graphical session dies, while with Xorg the WM typically just restarts
54 > and for the session to die, Xorg itself would have to die (and that's
55 > been ironed out over the decades to very rarely do).
56 >
57 > GNOME is indeed one of the leaders in adoption and implementing various
58 > extra features on top of it (even middle-click PRIMARY paste,
59 > seriously). EFL is probably another, and I think plasma is getting
60 > there. And then you have the dedicated wayland compositors like Sway (a
61 > i3-compatible approach). I bet there are something similar openbox-like
62 > out there as well, but openbox itself definitely won't work, as it'd
63 > have to be the compositor and not talk libX11..
64 >
65 >
66 > HTH,
67 > but probably you should have just googled ;)
68 >
69 >
70 > Mart
71
72 Thank you very much for a comprehensive information chapter on Wayland! :-)
73
74 Clearly I run Xorg:
75
76 4418 ? SLsl 0:00 /usr/sbin/lightdm
77 4427 tty7 Ssl+ 1:00 \_ /usr/bin/X :0 -seat seat0 -auth
78 /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
79
80 xprop does not reveal wayland anywhere either.
81
82 I copied /usr/share/xsessions/enlightenment.desktop to /usr/share/wayland-
83 sessions/ and tried to select it in LightDM. Unfortunately LightDM returns me
84 back to the login page. I don't know if this is a result of LightDM not being
85 compatible with Wayland and friends, or if I need to install some other
86 package in addition to what has been emerged already.
87 --
88 Regards,
89 Mick

Attachments

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

Replies

Subject Author
Re: [gentoo-user] Re: Wayland - too early to try? Mart Raudsepp <leio@g.o>