communication protocol
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchroniza ...
that specifies the communication between a
display server
In computing, a windowing system (or window system) is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP (windows, icons, menus, pointer) paradigm for ...
and its clients, as well as a C library implementation of that protocol. A display server using the Wayland protocol is called a ''
Wayland compositor
Wayland is a communication protocol that specifies the communication between a display server and its clients, as well as a C library implementation of that protocol. A display server using the Wayland protocol is called a '' Wayland composito ...
'', because it additionally performs the task of a compositing window manager.
Wayland is developed by a group of volunteers initially led by Kristian Høgsberg as a free and open-source community-driven project with the aim of replacing the
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
with a modern, secure simpler
windowing system
In computing, a windowing system (or window system) is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP (windows, icons, menus, pointer) paradigm fo ...
in
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
and other
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems. The project's source code is published under the terms of the
MIT License
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
, a
permissive free software licence
A permissive software license, sometimes also called BSD-like or BSD-style license, is a free-software license which instead of copyleft protections, carries only minimal restrictions on how the software can be used, modified, and redistributed, ...
.
As part of its efforts, the Wayland project also develops a
reference implementation
In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation o ...
of a Wayland compositor called ''
Weston
Weston may refer to:
Places Australia
* Weston, Australian Capital Territory, a suburb of Canberra
* Weston, New South Wales
* Weston Creek, a residential district of Canberra
* Weston Park, Canberra, a park
Canada
* Weston, Nova Scotia
* ...
''.
Overview
The Wayland Display Server project was started by Red Hat developer Kristian Høgsberg in 2008.
Beginning around 2010, Linux desktop graphics have moved from having "a pile of rendering interfaces... all talking to the X server, which is at the center of the universe" towards putting the Linux kernel and its components (i.e. Direct Rendering Infrastructure (DRI), Direct Rendering Manager (DRM)) "in the middle", with "window systems like X and Wayland ... off in the corner". This will be "a much-simplified graphics system offering more flexibility and better performance".
Høgsberg could have added an extension to X as many recent projects have done, but preferred to " ushX out of the hotpath between clients and the hardware" for reasons explained in the project's FAQ:
Wayland consists of a protocol and a reference implementation named
Weston
Weston may refer to:
Places Australia
* Weston, Australian Capital Territory, a suburb of Canberra
* Weston, New South Wales
* Weston Creek, a residential district of Canberra
* Weston Park, Canberra, a park
Canada
* Weston, Nova Scotia
* ...
. The project is also developing versions of
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
and Qt that render to Wayland instead of to X. Most applications are expected to gain support for Wayland through one of these libraries without modification to the application.
Initial versions of Wayland have not provided
network transparency
Network transparency, in its most general sense, refers to the ability of a protocol to transmit data over the network in a manner which is not observable (“ transparent” as in invisible) to those using the applications that are using the prot ...
, though Høgsberg noted in 2010 that network transparency is possible.
It was attempted as a
Google Summer of Code
The Google Summer of Code, often abbreviated to GSoC, is an international annual program in which Google awards stipends to contributors who successfully complete a free and open-source software coding project during the summer. , the program is ...
project in 2011, but was not successful.
Adam Jackson has envisioned providing remote access to a Wayland application by either "pixel-scraping" (like VNC) or getting it to send a "rendering command stream" across the network (as in RDP,
SPICE
A spice is a seed, fruit, root, bark, or other plant substance primarily used for flavoring or coloring food. Spices are distinguished from herbs, which are the leaves, flowers, or stems of plants used for flavoring or as a garnish. Spice ...
or
X11
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
). As of early 2013, Høgsberg is experimenting with network transparency using a proxy Wayland server which sends compressed images to the real compositor. In August 2017, GNOME saw the first such pixel-scraping VNC server implementation under Wayland.
Software architecture
Protocol architecture
The Wayland protocol follows a
client–server model
The client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate ove ...
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.
The Wayland reference implementation has been designed as a two-layer protocol:
* A low-level layer or ''wire protocol'' that handles the inter-process communication between the two involved processesclient and compositorand the marshalling of the data that they interchange. This layer is message-based and usually implemented using the kernel IPC services, specifically
Unix domain sockets
A Unix domain socket aka UDS or IPC socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes executing on the same host operating system. It is also referred to by its address family AF_UN ...
in the case of
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
and
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems.
* A high-level layer built upon it, that handles the information that client and compositor need to exchange to implement the basic features of a window system. This layer is implemented as "an asynchronous object-oriented protocol".
While the low-level layer was written manually in C, the high-level layer is automatically generated from a description of the elements of the protocol stored in
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
format. Every time the protocol description of this XML file changes, the C source code that implements such protocol can be regenerated to include the new changes, allowing a very flexible, extensible and error-proof protocol.
The reference implementation of Wayland protocol is split in two
libraries
A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
: a library to be used by Wayland clients called libwayland-client and a library to be used by Wayland compositors called libwayland-server.
Protocol overview
The Wayland protocol is described as an "asynchronous
object-oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of p ...
protocol". ''Object-oriented'' means that the services offered by the compositor are presented as a series of ''objects'' living on the same compositor. Each object implements an ''interface'' which has a name, a number of methods (called ''requests'') as well as several associated ''events''. Every request and event has zero or more arguments, each one with a name and a data type. The protocol is ''asynchronous'' in the sense that requests do not have to wait for synchronized replies or ACKs, avoiding
round-trip delay time
In telecommunications, round-trip delay (RTD) or round-trip time (RTT) is the amount of time it takes for a signal to be sent ''plus'' the amount of time it takes for acknowledgement of that signal having been received. This time delay includes pr ...
and achieving improved performance.
The Wayland clients can make a request (a method invocation) on some object if the object's interface supports that request. The client must also supply the required data for the arguments of such request. This is the way the clients request services from the compositor. The compositor in turn sends information back to the client by causing the object to emit events (probably with arguments too). These events can be emitted by the compositor as a response to a certain request, or asynchronously, subject to the occurrence of internal events (such as one from an input device) or state changes. The error conditions are also signaled as events by the compositor.
For a client to be able to make a request to an object, it first needs to tell the server the ID number it will use to identify that object. There are two types of objects in the compositor: global objects and non-global objects. Global objects are advertised by the compositor to the clients when they are created (and also when they are destroyed), while non-global objects are usually created by other objects that already exist as part of their functionality.
The interfaces and their requests and events are the core elements that define the Wayland protocol. Each version of the protocol includes a set of interfaces, along with their requests and events, which are expected to be in any Wayland compositor. Optionally, a Wayland compositor may define and implement its own interfaces that support new requests and events, thereby extending functionality beyond the core protocol. To facilitate changes to the protocol, each interface contains a "version number" attribute in addition to its name; this attribute allows for distinguishing variants of the same interface. Each Wayland compositor exposes not only what interfaces are available, but also the supported versions of those interfaces.
Wayland core interfaces
The interfaces of the current version of Wayland protocol are defined in the file of the Wayland source code. This is an
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
file that lists the existing interfaces in the current version, along with their requests, events and other attributes. This set of interfaces is the minimum required to be implemented by any Wayland compositor.
Some of the most basic interfaces of the Wayland protocol are:
* ''wl_display'' the core global object, a special object to encapsulate the Wayland protocol itself
* ''wl_registry'' the global registry object, in which the compositor registers all the global objects that it wants to be available to all clients
* ''wl_compositor'' an object that represents the compositor, and is in charge of combining the different surfaces into one output
* ''wl_surface'' an object representing a rectangular area on the screen, defined by a location, size and pixel content
* ''wl_buffer'' an object that, when attached to a ''wl_surface'' object, provides its displayable content
* ''wl_output'' an object representing the displayable area of a screen
* ''wl_pointer'', ''wl_keyboard'', ''wl_touch'' objects representing different input devices like
pointers
Pointer may refer to:
Places
* Pointer, Kentucky
* Pointers, New Jersey
* Pointers Airport, Wasco County, Oregon, United States
* The Pointers, a pair of rocks off Antarctica
People with the name
* Pointer (surname), a surname (including a lis ...
or keyboards
* ''wl_seat'' an object representing a seat (a set of input/output devices) in
multiseat configuration
A multiseat, multi-station or multiterminal system is a single computer which supports multiple independent local users at the same time.
A "seat" consists of all hardware devices assigned to a specific workplace at which one user sits at and i ...
s
A typical Wayland client session starts by opening a connection to the compositor using the ''wl_display'' object. This is a special local object that represents the connection and does not live within the server. By using its interface the client can request the ''wl_registry'' global object from the compositor, where all the global object names live, and bind those that the client is interested in. Usually the client binds at least a ''wl_compositor'' object from where it will request one or more ''wl_surface'' objects to show the application output on the display.
Wayland extension interfaces
A Wayland compositor can define and export its own additional interfaces. This feature is used to extend the protocol beyond the basic functionality provided by the core interfaces, and has become the standard way to implement Wayland protocol extensions. Certain compositors can choose to add custom interfaces to provide specialized or unique features. The Wayland reference compositor, Weston, used them to implement new experimental interfaces as a testbed for new concepts and ideas, some of which later became part of the core protocol (such as ''wl_subsurface'' interface added in Wayland 1.4).
Extension protocols to the core protocol
XDG-Shell protocol
XDG-Shell protocol (see
freedesktop.org
freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Hav ...
for XDG) is an extended way to manage surfaces under Wayland compositors (not only Weston). The traditional way to manipulate (maximize, minimize, fullscreen, etc.) surfaces is to use the wl_shell_*() functions, which are part of the core Wayland protocol and live in . An implementation of the xdg-shell protocol, on the contrary, is supposed to be provided by the Wayland compositor. So you will find the header in the Weston source tree. Each Wayland compositor is supposed to provide its own implementation.
, XDG-Shell protocol was not versioned and still prone to changes.
xdg_shell is a protocol aimed to substitute wl_shell in the long term, but will not be part of the Wayland core protocol. It starts as a non-stable API, aimed to be used as a development place at first, and once features are defined as required by several desktop shells, it can be finally made stable. It provides mainly two new interfaces: xdg_surface and xdg_popup. The xdg_surface interface implements a desktop-style window that can be moved, resized, maximized, etc.; it provides a request for creating child/parent relationship. The xdg_popup interface implements a desktop-style popup/menu; an xdg_popup is always transient for another surface, and also has implicit grab.
IVI-Shell protocol
IVI-Shell is an extension to the Wayland core protocol, targeting
in-vehicle infotainment
In-car entertainment (ICE), or in-vehicle infotainment (IVI), is a collection of hardware and software in automobiles that provides audio or video entertainment. In car entertainment originated with car audio systems that consisted of radios and c ...
(IVI) devices.
Rendering model
The Wayland protocol does not include a rendering API. Instead, Wayland follows a ''direct rendering'' model, in which the client must render the window contents to a buffer shareable with the compositor. For that purpose, the client can choose to do all the rendering by itself, use a rendering library like
Cairo
Cairo ( ; ar, القاهرة, al-Qāhirah, ) is the Capital city, capital of Egypt and its largest city, home to 10 million people. It is also part of the List of urban agglomerations in Africa, largest urban agglomeration in Africa, List of ...
or OpenGL, or rely on the rendering engine of high-level widget libraries with Wayland support, such as Qt or
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
. The client can also optionally use other specialized libraries to perform specific tasks, such as Freetype for
font rendering
Font rasterization is the process of converting text from a vector description (as found in scalable fonts such as TrueType fonts) to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and ...
.
The resulting buffer with the rendered window contents are stored in a ''wl_buffer'' object. The internal type of this object is implementation dependent. The only requirement is that the content data must be shareable between the client and the compositor. If the client uses a software (CPU) renderer and the result is stored in the system memory, then client and compositor can use
shared memory
In computer science, shared memory is memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies. Shared memory is an efficient means of passing data between progr ...
to implement the buffer communication without extra copies. The Wayland protocol already natively provides this kind of shared memory buffer through the ''wl_shm'' and ''wl_shm_pool'' interfaces. The drawback of this method is that the compositor may need to do additional work (usually to copy the shared data to the GPU) to display it, which leads to slower graphics performance.
The most typical case is for the client to render directly into a
video memory
Dynamic random-access memory (dynamic RAM or DRAM) is a type of random-access semiconductor memory that stores each bit of data in a memory cell, usually consisting of a tiny capacitor and a transistor, both typically based on metal-oxid ...
buffer using a hardware (GPU) accelerated API such as OpenGL,
OpenGL ES
OpenGL for Embedded Systems (OpenGL ES or GLES) is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accele ...
or
Vulkan
Vulkan is a low- overhead, cross-platform API, open standard for 3D graphics and computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulkan is intended to offer higher perfor ...
. Client and compositor can share this GPU-space buffer using a special handler to reference it. This method allows the compositor to avoid the extra data copy through itself of the main memory buffer client-to-compositor-to-GPU method, resulting in faster graphics performance, and is therefore the preferred one. The compositor can further optimize the composition of the final scene to be shown on the display by using the same hardware acceleration API as an API client.
When rendering is completed in a shared buffer, the Wayland client should instruct the compositor to present the rendered contents of the buffer on the display. For this purpose, the client binds the buffer object that stores the rendered contents to the surface object, and sends a "commit" request to the surface, transferring the effective control of the buffer to the compositor. Then the client waits for the compositor to release the buffer (signaled by an event) if it wants to reuse the buffer to render another frame, or it can use another buffer to render the new frame, and, when the rendering is finished, bind this new buffer to the surface and commit its contents. The procedure used for rendering, including the number of buffers involved and their management, is entirely under the client control.
Comparison with other window systems
Differences between Wayland and X
There are several differences between Wayland and X with regard to performance, code maintainability, and security:
; Architecture : The composition manager is a separate, additional feature in X, while Wayland merges display server and compositor as a single function. Also, it incorporates some of the tasks of the
window manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunctio ...
, which in X is a separate client-side process.
; Compositing : Compositing is optional in X, but mandatory in Wayland. Compositing in X is "active"; that is, the compositor must fetch all pixel data, which introduces latency. In Wayland, compositing is "passive", which means the compositor receives pixel data directly from clients.
; Rendering : The X server itself is able to perform rendering, although it can also be instructed to display a rendered window sent by a client. In contrast, Wayland does not expose any API for rendering, but delegates to clients such tasks (including the rendering of fonts, widgets, etc.). Window decorations can be rendered on the client side (e.g., by a graphics toolkit) or on the server side (by the compositor).
; Security : Wayland isolates the input and output of every window, achieving confidentiality, integrity and availability for both. The original X design lacked these important security features, although some extensions have been developed trying to mitigate it. Also, with the vast majority of the code running in the client, less code needs to run with ''root'' privileges, improving security, although multiple popular Linux distributions now allow X to be run without root privileges.
; Inter-process communication : The X server provides a basic communication method between X clients, later extended by
ICCCM
In computing, the Inter-Client Communication Conventions Manual (ICCCM or I39L short for "I", 39 letters and "L")X sessions, selections and drag-and-drop, and other features. The Wayland core protocol does not support communication between Wayland clients at all as the corresponding functionality (if needed) is regarded by the Wayland community as something which should be implemented by the
desktop environments
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphica ...
(like KDE or GNOME), or by a third party (for example, by using native IPC of the underlying operating system).
; Networking : The X Window System is an
architecture
Architecture is the art and technique of designing and building, as distinguished from the skills associated with construction. It is both the process and the product of sketching, conceiving, planning, designing, and constructing building ...
that was designed at its core to run over a network. Wayland does not offer network transparency by itself; however, a compositor can implement any remote desktop protocol to achieve remote display. In addition, there is research into Wayland image streaming and compression that would provide remote frame buffer access similar to that of VNC.
Compatibility with X
XWayland
X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
is an X Server running as a Wayland client, and thus is capable of displaying native X11 client applications in a Wayland compositor environment. This is similar to the way XQuartz runs X applications in
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
’s native windowing system. The goal of XWayland is to facilitate the transition from X Window System to Wayland environments, providing a way to run unported applications in the meantime. XWayland was mainlined into
X.Org Server
X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
3 can switch their graphical back-end at run time, allowing users to choose at
load time
In computer systems a loader is the part of an operating system that is responsible for loading programs and libraries. It is one of the essential stages in the process of starting a program, as it places programs into memory and prepares them ...
whether they want to run the application over X or over Wayland. Qt 5 provides the command-line option to that effect, whereas GTK 3 lets users select the desired
GDK
GDK (GIMP Drawing Kit) is a Library (computing), library that acts as a Wrapper pattern, wrapper around the low-level functions provided by the underlying windowing and graphics systems. GDK lies between the display server and the GTK library, ...
Display server
In computing, a windowing system (or window system) is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP (windows, icons, menus, pointer) paradigm for ...
s that implement the Wayland display server protocol are also called ''Wayland compositors'' because they additionally perform the task of a compositing window manager.
*
Weston
Weston may refer to:
Places Australia
* Weston, Australian Capital Territory, a suburb of Canberra
* Weston, New South Wales
* Weston Creek, a residential district of Canberra
* Weston Park, Canberra, a park
Canada
* Weston, Nova Scotia
* ...
the
reference implementation
In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation o ...
of a Wayland compositor; Weston implements client side decorations
* Enlightenment claimed full Wayland support since version 0.20 but work is currently underway to land a complete Wayland compositor
*
KWin
KWin is a window manager for the X Window System and a Wayland compositor. It is released as a part of KDE Plasma 5, for which it is the default window manager. KWin can also be used on its own or with other desktop environments.
KWin can be c ...
has nearly complete Wayland support as of 2021
* Mutter maintains a separate branch for the integration of Wayland for GNOME 3.9 (in September 2013)
* Clayland – a simple example Wayland compositor using Clutter
* Sway – a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. Sway uses wlroots – a modular Wayland implementation that functions as a base for several compositors.
Weston
Weston is the reference implementation of a Wayland compositor also developed by the Wayland project. It is written in C and published under the
MIT License
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
. Weston has official support for only the
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
operating system due to Weston's dependence on certain features of the Linux kernel, such as
kernel mode-setting
Mode setting is a software operation that activates a display mode (screen resolution, color depth, and refresh rate) for a computer's display controller by using VESA BIOS Extensions or UEFI Graphics extensions (on more modern computers).
The d ...
,
Graphics Execution Manager
The Direct Rendering Manager (DRM) is a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU and perform operations ...
(GEM), and
udev
udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices ...
, which have not been implemented in other Unix-like operating systems. When running on Linux, handling of the input hardware relies on
evdev
evdev (short for 'event device') is a generic input event interface in the Linux kernel and FreeBSD. It generalizes raw input events from device drivers and makes them available through character devices in the /dev/input/ directory.
The us ...
, while the handling of buffers relies on Generic Buffer Management (GBM). However, in 2013 a prototype port of Weston to FreeBSD was announced.
Weston supports
High-bandwidth Digital Content Protection
High-bandwidth Digital Content Protection (HDCP) is a form of digital copy protection developed by Intel Corporation to prevent copying of digital audio and video content as it travels across connections. Types of connections include DisplayPort ...
(HDCP).
Weston relies on GEM to share application buffers between the compositor and applications. It contains a plug-in system of "shells" for common desktop features like docks and panels. Clients are responsible for the drawing of their window borders and their decorations. For rendering, Weston can use
OpenGL ES
OpenGL for Embedded Systems (OpenGL ES or GLES) is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accele ...
or the pixman library to do
software rendering
Software rendering is the process of generating an image from a model by means of computer software. In the context of computer graphics rendering, software rendering refers to a rendering process that is not dependent upon graphics hardware AS ...
. The full OpenGL implementation is not used, because on most current systems, installing the full OpenGL libraries would also install
GLX
GLX (initialism for "OpenGL Extension to the X Window System") is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishing ...
and other
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
support libraries as dependencies.
A remote access interface for Weston was proposed in October 2013 by a
RealVNC
RealVNC is a company that provides remote access software. The software consists of a server (VNC Server) and client (VNC Viewer) application for the Virtual Network Computing (VNC) protocol to control another computer's screen remotely.
Histor ...
employee.
Maynard
''Maynard'' is a
graphical shell
In computing, a shell is a computer program that exposes an operating system's services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending ...
and has been written as a plug-in for Weston, just as the
GNOME Shell
GNOME Shell is the graphical shell of the GNOME desktop environment starting with version 3, which was released on April 6, 2011. It provides basic functions like launching applications, switching between windows and is also a widget engine. ...
Raspberry Pi Foundation
The Raspberry Pi Foundation is a British charity and company founded in 2009 to promote the study of basic computer science in schools, and is responsible for developing the Raspberry Pi single-board computers.
Foundation
The Raspberry Pi Foun ...
in collaboration with
Collabora
Collabora is a global private company headquartered in Cambridge, United Kingdom, with offices in Cambridge and Montreal. It provides open-source consultancy, training and products to companies.
Collabora's initial focus was instant messagin ...
released Maynard and work on improving performance and memory consumption.
libinput
The Weston code for handling input devices (keyboards, pointers, touch screens, etc.) was split into its own separate library, called ''libinput'', for which support was first merged in Weston 1.5.
Libinput handles input devices for multiple Wayland compositors and also provides a generic
X.Org Server
X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
input driver. It aims to provide one implementation for multiple Wayland compositors with a common way to handle input events while minimizing the amount of custom input code compositors need to include. libinput provides device detection (via
udev
udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices ...
), device handling, input device event processing and abstraction.
Version 1.0 of libinput followed version 0.21, and included support for tablets, button sets and touchpad gestures. This version will maintain stable API/ABI.
As GNOME/GTK and
KDE Frameworks 5
KDE Frameworks is a collection of libraries and software frameworks readily available to any Qt-based software stacks or applications on multiple operating systems. Featuring frequently needed functionality solutions like hardware integration, fi ...
have mainlined the required changes, Fedora 22 will replace X.Org's evdev and Synaptics drivers with libinput.
With version 1.16, the
X.Org Server
X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
obtained support for the libinput library in form of a wrapper called .
Wayland Security Module
Wayland Security Module is a proposition that resembles the Linux Security Module interface found in the Linux kernel.
Some applications (especially the ones related to accessibility) require privileged capabilities that should work across different Wayland compositors. Currently, applications under Wayland are generally unable to perform any sensitive tasks such as taking screenshots or injecting input events. Wayland developers are actively looking for feasible ways to handle privileged clients securely and then designing privileged interfaces for them.
Wayland Security Module is a way to delegate security decisions within the compositor to a centralized security decision engine.
Adoption
The Wayland protocol is designed to be simple so that additional protocols and interfaces need to be defined and implemented to achieve a holistic windowing system. these additional interfaces were being worked on. So, while the toolkits already fully support Wayland, the developers of the
graphical shell
In computing, a shell is a computer program that exposes an operating system's services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending ...
s are cooperating with the Wayland developers creating the necessary additional interfaces.
Desktop Linux distributions
most Linux distributions support Wayland out of the box. Some notable examples are:
* Fedora starting with version 25 (released 22 November 2016) uses Wayland for the default GNOME 3.22 desktop session, with X.Org as a fallback if the graphics driver cannot support Wayland. Fedora uses Wayland as the default for KDE desktop session starting with version 34 (released 27 April 2021)
*
Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All ...
shipped with Wayland by default in Ubuntu 17.10 (Artful Aardvark). However, Ubuntu 18.04 LTS reverted to X.Org by default due to several issues. Since Ubuntu 21.04, Wayland is the default again.
*
Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is a commercial open-source Linux distribution developed by Red Hat for the commercial market. Red Hat Enterprise Linux is released in server versions for x86-64, Power ISA, ARM64, and IBM Z and a desktop ...
ships Wayland as the default session in version 8, released 7 May 2019.
* Debian ships Wayland as the default session for GNOME since version 10, released 6 July 2019.
*
Slackware Linux
Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System, Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distributions ...
included Wayland on 20 February 2020 for the development version, -current, which became version 15.0.
*
Manjaro
Manjaro ( ) is a Free and open-source software, free and open-source Linux distribution based on the Arch Linux operating system that has a focus on user-friendliness and accessibility. It uses a rolling release update model and Pacman package ...
ships Wayland as default in the Gnome edition of Manjaro 20.2 (Nibia) (released 22 November 2020).
Notable early adopter:
* RebeccaBlackOS is a
live USB
A live USB is a portable USB-attached external data storage device containing a full operating system that can be booted from. The term is reminiscent of USB flash drives but may encompass an external hard disk drive or solid-state drive, th ...
Debian-based Linux distribution that allows a convenient way to try out a real Wayland desktop without having to make any modifications to the main operating system of the computer. It has been used since as early as 2012 to showcase Wayland.
Toolkit support
Toolkits supporting Wayland include the following:
*
Clutter
Clutter and its derivations may refer to any of the following:
Excessive physical disorder
* Clutter, a confusing, or disorderly, state or collection, and possible symptom of compulsive hoarding
* Clutter (marketing), numerous advertisements, a ...
has complete Wayland support.
* EFL has complete Wayland support, except for selection.
*
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
3.20 has complete Wayland support.
* Qt 5 has complete Wayland support, and can be used to write both Wayland compositors and Wayland clients.
* SDL support for Wayland debuted with the 2.0.2 release and was enabled by default since version 2.0.4.
*
GLFW
GLFW (Graphics Library Framework) is a lightweight utility library for use with OpenGL. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mouse input.
Softwar ...
3.2 has Wayland support.
*
FreeGLUT
FreeGLUT is an open-source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard ...
has initial Wayland support.
Desktop environments
Desktop environments in process of being ported from X to Wayland include GNOME,
KDE Plasma 5
KDE Plasma 5 is the fifth and current generation of the graphical workspaces environment created by KDE primarily for Linux systems. KDE Plasma 5 is the successor of KDE Plasma 4 and was first released on 15 July 2014.
It includes a new default ...
and Enlightenment.
In November 2015, Enlightenment e20 was announced with full Wayland support. GNOME 3.20 was the first version to have a full Wayland session. GNOME 3.22 included much improved Wayland support across GTK, Mutter, and GNOME Shell. GNOME 3.24 shipped support for the proprietary NVidia drivers under Wayland.
Wayland support for KDE Plasma was delayed until the release of Plasma 5, though previously
KWin
KWin is a window manager for the X Window System and a Wayland compositor. It is released as a part of KDE Plasma 5, for which it is the default window manager. KWin can also be used on its own or with other desktop environments.
KWin can be c ...
4.11 got an experimental Wayland support. The version 5.4 of Plasma was the first with a Wayland session. During 2020 Klipper was ported to Wayland and the next 5.20 release in October 2020 has the goal to improve screen casting and recording.
Other software
Other software supporting Wayland includes the following:
*
Intelligent Input Bus
The Intelligent Input Bus (IBus, pronounced as I-Bus) is an input method (IM) framework for multilingual input in Unix-like operating-systems. The name "Bus" comes from its bus-like architecture.
Goals
The main goals of the IBus project include ...
is working on Wayland support, it could be ready for Fedora 22.
*
RealVNC
RealVNC is a company that provides remote access software. The software consists of a server (VNC Server) and client (VNC Viewer) application for the Virtual Network Computing (VNC) protocol to control another computer's screen remotely.
Histor ...
published a Wayland developer preview in July 2014.
*
Maliit
Maliit is an input method framework for computers with particular focus on implementing virtual keyboards. Designed mostly for touchscreen devices, Maliit allows the inputting of text without the presence of a physical keyboard. More advanced feat ...
is an
input method
An input method (or input method editor, commonly abbreviated IME) is an operating system component or program that enables users to generate characters not natively available on their input devices by using sequences of characters (or mouse o ...
framework that runs under Wayland.
* kmscon supports Wayland with wlterm.
*
Mesa
A mesa is an isolated, flat-topped elevation, ridge or hill, which is bounded from all sides by steep escarpments and stands distinctly above a surrounding plain. Mesas characteristically consist of flat-lying soft sedimentary rocks capped by a ...
has Wayland support integrated.
* Eclipse was made to run on Wayland during a GSoC-Project in 2014.
* The Vulkan WSI (Window System Interface) is a set of API calls that serve a similar purpose as EGL does for OpenGL ES or GLX for OpenGL. Vulkan WSI includes support for Wayland from day one: VK_USE_PLATFORM_WAYLAND_KHR. Vulkan clients can run on unmodified Wayland servers, including Weston, GENIVI LayerManager, Mutter / GNOME Shell, Enlightenment, and more. The WSI allows applications to discover the different GPUs on the system, and display the results of GPU rendering to a window system.
*
SPURV
SPURV, or Self-Propelled Underwater Research Vehicle, was an Autonomous Underwater Vehicle built in 1957 at the University of Washington's Applied Physics Laboratory. The research and development of this vehicle was funded by the United States O ...
, a compatibility layer for Android applications to run on Linux distributions using Wayland
Mobile and embedded hardware
Mobile and embedded hardware supporting Wayland includes the following:
*
postmarketOS
postmarketOS (abbreviated as pmOS) is an operating system primarily for smartphones, based on the Alpine Linux distribution.
postmarketOS was launched on 26 May 2017 with the source code available on GitHub before migrating to GitLab in 2018. I ...
in-vehicle infotainment
In-car entertainment (ICE), or in-vehicle infotainment (IVI), is a collection of hardware and software in automobiles that provides audio or video entertainment. In car entertainment originated with car audio systems that consisted of radios and c ...
(IVI) supports Wayland.
*
Raspberry Pi
Raspberry Pi () is a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom. The Raspberry Pi project originally leaned towards the promotion of teaching basic ...
: The
Raspberry Pi Foundation
The Raspberry Pi Foundation is a British charity and company founded in 2009 to promote the study of basic computer science in schools, and is responsible for developing the Raspberry Pi single-board computers.
Foundation
The Raspberry Pi Foun ...
in collaboration with
Collabora
Collabora is a global private company headquartered in Cambridge, United Kingdom, with offices in Cambridge and Montreal. It provides open-source consultancy, training and products to companies.
Collabora's initial focus was instant messagin ...
released Maynard and work on improving performance and memory consumption.
*
Jolla
Jolla Oy (sometimes referred to as Jolla Ltd.) is a Finnish technology company; vendor and developer of Sailfish OS. Headquartered in Tampere, Finland, Jolla has its own research and development offices in Helsinki, Tampere and Cyberport, Hong ...
: Smartphones from Jolla use Wayland. It is also used as standard when Linux
Sailfish OS
Sailfish OS is a Linux-based operating system based on free software, and open source projects such as Mer as well as including a closed source UI. The project is being developed by the Finnish company Jolla.
The OS first shipped with the ...
is used with hardware from other vendors or when it is installed into Android devices by users.
* Tizen: Tizen up to 2.x supports Wayland in
in-vehicle infotainment
In-car entertainment (ICE), or in-vehicle infotainment (IVI), is a collection of hardware and software in automobiles that provides audio or video entertainment. In car entertainment originated with car audio systems that consisted of radios and c ...
(IVI) setups and from 3.0 onward defaults to Wayland.
History
Kristian Høgsberg, a
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
developer
Developer may refer to:
Computers
* Software developer, a person or organization who develop programs/applications
* Video game developer, a person or business involved in video game development, the process of designing and creating games
* Web d ...
who previously worked on AIGLX and DRI2, started Wayland as a spare-time project in 2008 while working for Red Hat. His stated goal was a system in which "every frame is perfect, by which I mean that applications will be able to control the rendering enough that we'll never see tearing, lag, redrawing or flicker." Høgsberg was driving through the town of
Wayland, Massachusetts
Wayland is a town in Middlesex County, Massachusetts, United States. The town was founded in 1638, and incorporated in 1780 and was originally part of neighboring Sudbury (incorporated 1639). As of the 2020 United States Census, the population was ...
when the underlying concepts "crystallized", hence the name.
In October 2010, Wayland became a
freedesktop.org
freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Hav ...
project. As part of the migration the prior
Google Group
Google Groups is a service from Google that provides discussion groups for people sharing common interests. The Groups service also provides a gateway to Usenet newsgroups via a shared user interface.
Google Groups became operational in February ...
was replaced by the ''wayland-devel'' mailing list as the project's central point of discussion and development.
The Wayland client and server libraries were initially released under the
MIT License
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
, while the reference compositor Weston and some example clients used the
GNU General Public License version 2
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the Four Freedoms (Free software), four freedoms to run, study, share, and modify the software. The license was th ...
. Later all the GPL code was relicensed under the MIT license "to make it easier to move code between the reference implementation and the actual libraries". In 2015 it was discovered that the license text used by Wayland was a slightly different and older version of the MIT license, and the license text was updated to the current version used by the X.Org project (known as MIT Expat License).
Wayland works with all Mesa-compatible drivers with DRI2 support as well as Android drivers via the Hybris project.
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...