Wayland
Wayland [0] is a display protocol that aims to be a simpler and modern replacement for the X Window System. [1] The Wayland protocol follows a client–server model in which clients are the graphical applications requesting the display of pixel buffers on the screen, and the server (compositor) is the service provider controlling the display of these buffers. [2]
Unlike Xorg, which is at the center of the universe (and everyone must talk to), Wayland puts the Linux kernel and its components (DRI, DRM, etc) in the middle. This effectively leaves the Wayland compositor off in the corner as its little more than a special application. [3]
Wayland has been in development since September of 2008 [4] and is usable today for a large number of use-cases. Some hardware configurations (namely NVIDIA GPUs) [5] [6] and a number of features are not currently supported by compositors.
Caveats
While the Wayland protocol is more or less done, the growing list of compositors are in differing stages of completeness. Xorg is still in wide use and a lot of software still requires it.
The major downside to Wayland (compositors) is the reduction in choice. While the Wayland protocol does not define what a compositor shall depend on, they typically lock the user into udev, libinput and systemd/logind.
The lack of standardized, desktop-oriented protocols has created a situation where software may only work in some compositors and not others. This should improve over time as more protocols become standardized.
- Limited hardware and driver support. [5] [6] [7] [8]
- Non-standard and compositor specific software. [10] [11] [12]
- No Wayland support in SDL 1 (must use XWayland). [13]
- Starting compositors without logind requires SUID permissions. [14]
- Locked into using udev. [15]
Benefits
Wayland has a large number of benefits and improvements over Xorg. The above caveats do not apply to everyone (or every system). Those unaffected or willing to live with the caveats will have no problem swapping over.
- Less moving parts [13], although some software still heavily relies on the Xorg libraries (Mesa [16], Firefox [17], etc).
- No screen tearing by design [18].
- Hardware accelerated video playback in Firefox [19] and Webkit2GTK (webkit2gtk VAAPI source needed)
Installation
Wayland is now officially supported by KISS in the main repositories (see /archive/blog/20210711a/).
Post installation
- In environments without systemd/elogind/consolekit the
XDG_RUNTIME_DIR
variable must be set manually. Export this in your shellrc (.ashrc, .bashrc, .zshrc, etc)
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/$(id -u)-runtime-dir}
[ -d "$XDG_RUNTIME_DIR" ] || {
mkdir -p "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"
}
- Install a Compositor of your choosing.