If you have been using Linux for the past decade you surely have heard about this technology called "Wayland".
Disclaimer:
This article is sort of a work in progress and I will try to keep it updated.
First, let's explain what Wayland actually is: Wayland is a display protocol designed by the original maintainers of Xorg which is the implementation of the X11 protocol employed by all modern Linux distributions and by result used by Linux users. Wayland is being marketed as the successor and a drop-in replacement for X11 which seems to be deemed "abandonware" and therefore should be completely dropped, no questions asked.
Don't be fooled: the X11 protocol itself is not perfect in any means whatsoever.
In this section I will illustrate my thoughts about Wayland and what I've observed in my decade experience with Linux.
Wayland is designed with the client-server architecture which is explained here and really, it's not that much different from how an X11 server works so I do not understand what improvement there is since the GPU can be accessed directly from Xorg.
What did change is that in Wayland the compositor is also the display server.
That's right! Now all the features that were present in a X11 server must be re-implemented for each compositor. Oh and if the compositor crashes, you are shit out of luck and you lose whatever work you were doing. On X11, the compositor can be either integrated with the window manager or it can be a separate application (see xcompmgr) which means that if the compositor dies you can manage your windows. In fact, X11 compositors make use of the XCOMPOSITE extension which is optional while on Wayland you are essentially forced to use the compositor, kinda like how Windows 8 on-wards acts.
One of the things that I never understood is why Wayland developers and proponents want to market a gimped technology in the name of security.
You see, Wayland has been designed from the start to be "secure", something that X11 is generally not considered even though there is the XACE extension that allows for a fine grained control on which X11 resources can be accessed or not. One aspect of Wayland's "secure" design choice is the fact that clients cannot see in any way the contents of other windows which makes it impossible to create programs that need to take screenshots/record the screen (or part of it or even a specific window), programmatically manage the windows via hotkeys, you know, things that on Windows and X11 work out of the box. Granted, it is possible to implement this kind of functionality for your Wayland compositor but that requires the so fabled protocol extensions which are exactly what they sound like: extensions to the base protocol which brings me to the next point.
Basic functionality like managing windows, accessing the contents of them, taking screenshots, screen recording must be defined via a set of protocols that are not reinforced in any way whatsoever which means that some Wayland compositors have more features than others and that there is no standard behaviour between different compositors.
In X11, programs will work with any desktop environment, window manager, etc. because of the fact that there is a de-facto standard and mature X11 implementation and there are well defined standards like ICCCM and it's "successor" which builds upon it, EWMH.
You can easily test this: try to use for example scrot, maim, xfce4-screenshooter, SimpleScreenRecorder with different DEs and WMs, these applications will work regardless of the environment that you are using.
Now try to do that with your favourite Wayland compositor and pray that the application that you use for screenshots, screen recording, supports your compositor. It will probably not unless the compositor and specific application support the same protocol extension which might even be a non-standard one. GNOME does this but we all know that GNOME sucks dick (and by extension GTK too does). The sole fact that pipewire is required to perform screen recording and/or sharing on Wayland is bullshit and a clear demonstration that Wayland has not been designed well (or at all for that matter).
Wayland lacks appropriate APIs (and especially a strong reference implementation) to manage it's surfaces in a compositor agnostic way. wlroots exists because there were no standard APIs for dealing with writing a Wayland compositor and you still are going to only target wlroots based compositors. If you want to port your app to Wayland, be prepared to write the corresponding code for the four types of compositors available.
And before you come to attack me, no. I am not the only one that has detected serious problems while porting programs to Wayland.
Look at what one of the developers of mpv has to say about Wayland.
With X11 you have Xlib and xcb which are also compatible with each other.
If you ever engage in discussion about Wayland and it's fallacies be prepared to face a swarm of Wayland cultists.
Usually Wayland proponents will always reiterate the same shit about X11: it's old, it's insecure, blah blah blah...
No shit, you fucking retard! Everyone knows this and we are not pretending that X11 is perfect, on the contrary.
X11 (both as a protocol and it's only active implementation, Xorg) are not perfect but they are good enough in the eyes of most people.
Wayland really is CADT all over again just like systemd and pulseaudio.
Just stick to X11 for the foreseeable future if you want something that works.