Wayland Linux

Introduction

Wayland is a protocol for organizing a graphics server in Linux and other UNIX-like operating systems.

Wayland development was started by Kristian Høgsberg (Danish: Kristian Høgsberg), at that time an employee of Red Hat, now a member of the Intel Open Technology Center.

Wayland is free software. The name comes from the town of Wayland; when Høgsberg was driving through this town, the concept of the system came to his mind.

Basic principles

According to the developers, Wayland is a “fixing of the mistakes” of X.org that accumulated over four decades of its development.

The fundamental difference from X.org is that Wayland only manages window buffers (surfaces) and delegates all rendering of their contents to toolkit packages (GTK, Qt, and so on).

A drawing API is completely absent. All protocol versions are strictly defined, and the versioning system itself is well thought out.

X.org has a serious problem with the versions of different extensions, which often overlapped or complemented each other instead of being self-contained and mutually exclusive. Buffer composition is performed by the reference compositing manager (compositor) Weston, which uses both OpenGL ES and software rendering. Wayland also includes a unified input device protocol that provides one virtual keyboard, one virtual mouse and one touchscreen interface — shared by all applications. Wayland is aware of input device states and is able to remember them. (X.org, by contrast, does not preserve device states (a stateless protocol), but can be configured through configuration files.)

Its creator describes Wayland as follows:

Wayland is a new graphics server that performs only a tiny part of the X functions that we actually use when we run a compositing desktop. Wayland is essentially a buffer manager (like DRI2 for X.org) and an input handler. All rendering is done on the client side — the way OpenGL works today — while mode setting and other hardware configuration are done in the kernel. This approach greatly simplifies the organization of the server.

Wayland uses technologies that already exist in the Linux kernel, such as Kernel mode-setting (KMS), Direct Rendering Manager (DRM) and Graphics Execution Manager (GEM).

Banner image

Weston

Weston is the reference implementation of the Wayland compositing manager. It is written in the language C , first published under the GPLv2 license and later released under MIT. Weston was originally created for the Linux kernel API, so it officially supports working only with the Linux kernel due to its dependence on KMS, GEM and udev.

Weston uses GEM to exchange buffers between the graphics server and applications. For rendering it can use OpenGL, cairo and pixman.

Maynard

Maynard is a graphical shell that was created as a plugin for Weston, just as GNOME Shell was created as a plugin for Mutter.

Maynard was originally designed for the Raspberry Pi as a lightweight graphical shell, because at that time (2014) lightweight desktop environments such as LXDE did not support Wayland, and feature-rich environments like GNOME and KDE were too resource-intensive.

The project is not limited to the Raspberry Pi platform and can be used on ordinary workstations.

The shell is notable for its low resource consumption, high performance, quality design and lightness.

Usage

Mark Shuttleworth announced in his blog that Ubuntu would use Wayland instead of X.org for its Unity desktop environment.

However, on March 4, 2013, the developers at Canonical decided to write their own graphics server, which received the name Mir. On April 5, 2017, they abandoned Mir and Unity in favor of Wayland and GNOME.

In the Fedora operating system, starting with version 25, the GNOME desktop environment based on Wayland is used by default.

Compatibility with X.org

xwayland was developed, which allows X11 applications to run on top of Wayland. Similarly to X.org, applications also run under the native Mac OS X environment.

Article author: Andrei Olegovich