On 16/09/2025 05:33, Alexis wrote:
Wayland is a protocol - and more loosely, a collection of protocols[a] -
not a server. There is no 'Wayland server' analogous to an X server. One
doesn't start 'Wayland' and then start a WM/DE; one starts a compositor,
which can be thought of as a combination of a server and a WM/DE. So
it's possible to have Wayland libraries on one's system that aren't
used / 'running' until one actively starts up a Wayland compositor.
Their mere presence doesn't indicate that there must be a Wayland
session running, or that a Wayland session is required to be running.
I had this explained to me on LWN, so I hope I get it right ...
The X server is basically the protocol manager AND the compositor
combined. But because the protocol was designed with last-century
hardware in mind, the compositor element must pretend to be an old video
card and then convert everything over to the new hardware protocols. The
result is loads of cruft.
Wayland splits the protocol server and compositor. The result is a lot
simpler, as the compositor basically speaks DRM to the kernel (Display
wotsit Manager).
So we've now basically got four compositors to replace the X server.
People think it would make sense to have only one but really it's just a
historical accident. We have Weston, the demo compositor, Plasma, the
KDE compositor, whatever the Gnome compositor is, and Xorg!!! That's why
Xorg is still alive, but the X server is walking dead - all the stuff
that talks direct to the hardware is pretty much abandonware - Xorg now
sits on top of Wayland and that's the only bit that's actively maintained.
So the reason we have four Wayland compositors is that Xorg, KDE and
Gnome all pre-date Weston, and the cost of migrating over isn't worth
it. Pretty much all new stuff targets Weston.
Don't forget that X is a protocol. So Wayland is an exact replacement
for X, but the new Wayland compositor stuff is simply a refactored
replacement for the X server stuff. With all the cruft (hopefully)
ditched. The refactoring is a complete change of structure because the
X-server is basically a dinosaur not fit for the modern world.
(And historically there were multiple X servers - the two I can think of
instantly are X-Free86 and Xorg - there are certainly more ...)
Cheers,
Wol