Wayland is a protocol for communication between graphical applications and a display compositor, together with libraries that implement that communication. It is used principally on Linux and other Unix-like systems. Its central design is that applications supply rendered image buffers, while a compositor controls their placement on displays and distributes input events. The name does not denote a single desktop environment, rendering engine, or display-server executable.
Developed as a replacement for much of the functionality traditionally provided by the X Window System, Wayland reorganizes the boundary between applications and the software controlling the desktop. It removes server-side drawing commands from the core display protocol and combines display-server and compositing responsibilities in one architectural role. This affects rendering efficiency, input isolation, window management, and compatibility with older applications.
Wayland consists of a relatively small core protocol and a broader ecosystem of extension protocols, compositors, graphics libraries, application toolkits, and compatibility components. Its practical behavior therefore depends both on the protocol and on the compositor implementing it: two Wayland desktops can share application compatibility while differing substantially in window-management policy, supported extensions, and administrative controls.
Origins and historical development
Wayland began in 2008 as a project initiated by Kristian Høgsberg. It emerged during a period when the Linux graphics stack was moving display-mode control and graphics-memory management into the kernel, while graphical applications increasingly rendered their own content through client-side libraries. These changes reduced the need for a display server that also exposed a large collection of drawing operations. The project was named after Wayland, Massachusetts.
The X Window System had been designed in the 1980s around network-transparent communication between applications and a display server. Its protocol included operations for drawing primitives, managing windows, and handling input. Over time, extensions added accelerated rendering, compositing, display configuration, and other capabilities. Modern desktops commonly used a window manager and a separate or integrated compositing manager, while applications increasingly generated their own pixels rather than relying on the original X drawing model. Wayland sought to make this newer arrangement the architectural starting point rather than an extension to an older one.
Several underlying developments made that approach practical. Linux kernel mode setting allowed display configuration to be managed through kernel interfaces. The Direct Rendering Infrastructure and related graphics interfaces allowed applications to render using graphics hardware without routing drawing commands through the display server. Client-side toolkits already handled fonts, widgets, and much of the visual appearance of applications. Wayland concentrated on the remaining exchange: sharing application buffers, coordinating their presentation, and delivering input.
Wayland 1.0 and the reference compositor Weston 1.0 were released in October 2012. This marked an important stabilization of the protocol and library interfaces, not the completion of every feature needed by desktop environments. Subsequent development relied heavily on additional protocols for desktop windows, input methods, screen capture, display scaling, and other functions. Core protocol stability and extension development consequently followed different schedules.
Desktop adoption proceeded incrementally. Fedora Workstation made a GNOME Wayland session its default in Fedora 25 in 2016. Ubuntu used Wayland by default in Ubuntu 17.10, returned to Xorg for Ubuntu 18.04 LTS, and adopted Wayland by default again for supported configurations in Ubuntu 21.04. KDE Plasma developed its Wayland session alongside its X11 session, with Plasma 6 selecting Wayland as the default session upstream. Distribution choices and hardware-specific exceptions meant that adoption was not a single coordinated transition.
The project is developed as open-source software within the freedesktop.org ecosystem. Its history is best understood as a migration of responsibilities across an entire graphics stack, rather than simply the replacement of one server executable with another. Graphics drivers, toolkits, compositors, applications, and desktop services have each required corresponding changes.
Architectural model and division of responsibilities
Wayland follows a client–server model, but the server is normally also the compositor: the component that combines application content into the images shown on physical or virtual displays. A graphical application is a client. It creates protocol objects representing surfaces and other resources, renders content into buffers, and asks the compositor to use those buffers as surface content. The compositor decides how that content participates in the visible scene.
The distinction between a surface and a window is fundamental. A core wl_surface is an object to which image content and related state can be attached. It does not, by itself, have the full semantics of a desktop window. A separate protocol assigns a role such as a top-level application window, popup, subsurface, or specialized desktop component. This separation allows the same core machinery to support conventional desktops, embedded interfaces, kiosks, and nested graphical environments without embedding one universal window-management model.
A compositor commonly maintains a scene containing surfaces, their relationships, clipping, opacity, and transformations. It may use the graphics processing unit to combine them into an output framebuffer, or it may use software rendering. Under suitable conditions it can place an application's buffer directly on a display plane, avoiding an intermediate composition pass. Wayland does not require every compositor to use a particular scene-graph implementation or graphics API.
On a typical Linux desktop, the compositor also communicates with input and display devices through lower layers of the operating system. It selects display modes, schedules presentation, tracks keyboard focus, and decides which client receives pointer or touch events. Window-management policy—such as tiling, stacking, focus rules, and workspace behavior—belongs to the compositor or its associated desktop components. The protocol does not prescribe a particular policy.
The architecture can also be nested. A Wayland compositor can run as a client of another Wayland compositor or of an X server, presenting an entire subordinate desktop inside a host window. Other backends can operate without a physical display, enabling testing, remote sessions, or image production. Consequently, direct access to graphics hardware is a common deployment arrangement, not a defining requirement of every Wayland server.
This consolidation changes fault and trust boundaries. The compositor is a privileged point of coordination for the graphical session, and its failure can disrupt applications connected to it. Conversely, ordinary applications need not receive broad visibility into one another's windows or input. Wayland specifies the communication boundary, while robustness, recovery behavior, and policy remain properties of particular implementations.
Protocol objects, messages, and interface evolution
Wayland communication is organized around typed objects rather than a stream of general drawing commands. A client sends requests on objects, and the server sends events. Each interface defines the available requests and events, their argument types, and their version history. Protocol descriptions are written in XML, from which tools generate bindings and supporting code, especially for the reference libraries written in the C programming language.
On Linux, clients normally connect through a Unix-domain socket. The connection carries binary messages and can transfer file descriptors using the operating system's ancillary-data mechanisms. Descriptor passing is important because large image buffers do not ordinarily travel as pixel arrays inside the protocol message stream. Instead, messages identify resources that both sides can access through shared memory or graphics-buffer mechanisms. The transport is therefore closely tied to local interprocess communication facilities.
A client initially interacts with the display object and obtains a registry of global interfaces advertised by the compositor. A global might provide surface creation, shared-memory buffers, an input seat, or a desktop-shell extension. The client binds to an advertised interface at an agreed version and obtains a corresponding protocol object. Different globals can have different version numbers; there is no single negotiated feature level that completely describes a Wayland session.
Message framing identifies the destination object, operation, and message length. Arguments can include integers, strings, arrays, object references, and file descriptors. Some values use a signed fixed-point representation with eight fractional bits. The library handles object bookkeeping and message marshalling, but application or toolkit code must still obey the protocol's state and lifetime rules. Invalid requests can constitute protocol errors that terminate the client's connection.
Wayland is asynchronous. A request being written to a socket does not mean that its visible effect has already occurred. Callbacks and events provide explicit coordination where needed. For example, a display synchronization request can establish that earlier requests have been processed; it does not establish that a particular frame has appeared on a monitor. Toolkits integrate these operations into an event loop, taking care to avoid blocking patterns and incorrect assumptions about event ordering.
Extensions are central to the protocol's evolution. The wayland-protocols project distributes specifications for functionality beyond the core, while desktop projects and other groups also develop additional interfaces. Stable interfaces preserve compatibility; experimental interfaces can undergo incompatible revision under distinct names or versions. An extension's existence does not imply support in every compositor. Clients must discover capabilities at runtime and either adapt, provide a fallback, or report that a required function is unavailable.
Rendering, buffers, and presentation timing
Wayland does not specify how an application draws its interface. A client may use software rendering, OpenGL, Vulkan, or a higher-level graphics library. What matters to the display protocol is the resulting buffer and the rules governing its use. This separation makes Wayland largely independent of the widgets, text-rendering systems, and graphics engines used within applications.
The simplest common buffer mechanism is wl_shm, which uses shared memory. The client creates a memory-backed pool and describes buffers within it by dimensions, stride, offset, and pixel format. This is useful for software rendering and remains important for basic interoperability. Hardware-accelerated clients commonly exchange buffers through Linux DMA-BUF, a mechanism for sharing memory objects across devices and processes. Associated protocols describe formats, modifiers, and device preferences so that the client can allocate buffers suitable for the compositor's graphics and display hardware.
Surface updates are transactional in an important but limited sense. Operations such as attaching a buffer and specifying damaged regions generally modify pending state. A wl_surface.commit makes that state available as a coherent update. The compositor can then incorporate it into a future presentation. This avoids exposing intermediate states merely because several related requests arrived separately. Subsurface synchronization can coordinate updates among related surfaces, although it does not create an unrestricted transaction system across every object in a session.
Buffer ownership and timing require careful coordination. After submitting a buffer, a client cannot assume that the compositor has finished reading it. A buffer-release notification indicates that the compositor no longer needs that buffer under the relevant protocol's rules. Applications often maintain multiple buffers so that they can render a new frame while an earlier one remains in use. Explicit synchronization extensions can communicate graphics synchronization points, addressing cases in which implicit driver synchronization is insufficient or unavailable.
Frame callbacks and presentation feedback serve different purposes. A frame callback tells a client when it is appropriate to prepare another update, helping avoid unnecessary rendering for hidden or throttled surfaces. Presentation feedback can report whether an update was presented and provide timing information associated with that presentation. Neither should be confused with a guarantee that a specific callback corresponds to a fixed refresh interval on all hardware.
Performance depends on the entire presentation path. Direct scanout can avoid compositing a full-screen application's pixels when format, geometry, stacking, and hardware constraints permit it. Hardware overlays may place some surfaces on separate display planes. Other cases require additional composition or copying, particularly across different graphics devices. Wayland can enable efficient paths, but the protocol alone does not guarantee zero-copy rendering, lower latency, or freedom from frame scheduling problems.
Desktop windows, outputs, and scaling
Conventional desktop windows are primarily described through the stable xdg-shell protocol. A client associates an xdg_surface with a core surface and then creates a role such as xdg_toplevel or xdg_popup. The top-level role supports ordinary application windows; the popup role describes transient surfaces such as menus, with positioning constrained by their relationship to a parent surface. These roles add desktop semantics without placing them in the core surface interface.
Window configuration is a negotiation rather than direct client control over global geometry. The compositor sends configure events describing proposed states and dimensions, and the client acknowledges the relevant serial before committing content in response. A top-level configure may indicate maximization, full-screen state, activation, or resizing. Clients can communicate minimum and maximum sizes and express preferences, but the compositor remains responsible for arranging the desktop. An ordinary top-level client is not given an unrestricted operation for placing itself at arbitrary global coordinates.
Interactive movement and resizing illustrate this division. An application can request a compositor-managed move or resize associated with an input event. The request includes information tying it to a seat and event serial, allowing the compositor to assess whether it follows a legitimate user interaction. The application need not track the pointer across the entire desktop while independently moving its window. Similarly, popups can use compositor-managed input grabs so that menus behave coherently when the pointer leaves their visible bounds.
Window decorations are not dictated by the core protocol. A client can draw its own title bar and borders, while a compositor can provide server-side decorations where the relevant negotiation protocol is supported. Desktop environments differ in their preferences and implementation choices. A missing or unsupported decoration negotiation mechanism can therefore affect appearance even when basic rendering and input work correctly.
Output handling separates physical display characteristics from the coordinate systems used for application content. The core output interface reports information such as modes, scale, and transforms, with supplementary protocols supplying logical-layout details. Integer scaling lets a client render more buffer pixels for each surface-coordinate unit. For example, a logical surface width of 800 units at scale 2 commonly requires a buffer width of 1,600 pixels, before accounting for transformations or viewport operations.
Mixed-density desktops require additional care. Fractional-scaling and viewport protocols allow finer-grained relationships between buffer resolution and displayed surface size. A compositor may request a preferred scale, while the client chooses an appropriately sized buffer and describes its mapping. Text sharpness, rounding, and movement between displays depend on toolkit support and compositor policy. Color management likewise requires explicit descriptions beyond a basic pixel format: accurate handling of differing color spaces and high-dynamic-range content cannot be inferred from buffer dimensions alone.
Input routing and security boundaries
Wayland groups related input capabilities through a seat, represented by wl_seat. A seat can expose pointer, keyboard, and touch interfaces, with capabilities changing as devices appear or disappear. In a common desktop arrangement, several physical devices contribute to one logical seat. More specialized systems can use multiple seats, allowing separate groups of devices and displays to support distinct users or work areas.
The compositor determines input focus and sends events to the appropriate client. Pointer events are generally expressed relative to the receiving surface rather than as a continuously available global desktop position. Keyboard events go to the surface with keyboard focus. On Linux, keyboard interpretation commonly uses an XKB keymap supplied through the keyboard protocol. Touch events identify contact points and track their lifetimes. Relative-pointer, pointer-constraint, tablet, and gesture protocols extend this model for applications such as games and drawing programs.
A major security difference from traditional X11 arrangements is the absence of a general core facility through which any connected client can observe every other client's input or read arbitrary window contents. Knowing that another application exists does not grant access to its buffers. This supports stronger application isolation, particularly when combined with an operating-system sandbox. However, Wayland is not itself a complete sandbox or authentication system: file access, process privileges, device access, and compositor extensions remain separate concerns.
Event serials help connect sensitive requests to compositor-observed interactions. A request to begin a drag, change a selection, or initiate an interactive window operation can refer to an earlier event. Such serials are not general-purpose cryptographic credentials, but they provide context that allows protocol implementations to reject requests inconsistent with the expected interaction. The details depend on the operation and protocol.
Clipboard and drag-and-drop transfer generally use data offers describing available MIME types. When a receiving client requests a format, data can be transferred through a file descriptor rather than stored as a universal blob in the core display server. Selection ownership and focus rules affect who receives offers. Clipboard managers, primary selection, and desktop-wide data-control services involve additional protocols and policy decisions; they cannot all be inferred from the basic clipboard interface.
Screen capture, remote control, and global shortcuts require deliberate mediation because they cross ordinary client boundaries. Linux desktops commonly use desktop portals for user-mediated access, with PipeWire carrying captured video streams. Compositor-specific or standardized extension mechanisms can also support privileged desktop components. These arrangements trade the unrestricted ambient access of older desktop models for explicit interfaces and authorization paths. Their effectiveness depends on implementation, configuration, and the trust assigned to session services, not merely on the use of Wayland.
Compositors, toolkits, and the software ecosystem
Weston is the reference compositor developed alongside Wayland. It provides an implementation useful for protocol development, testing, demonstrations, and embedded deployments. Its architecture supports different backends, including direct display operation, nested operation, and headless use. Weston is not intended to define the appearance or behavior of every Wayland desktop, and a feature's presence in Weston does not automatically establish its availability elsewhere.
The major desktop environments use their own compositors. GNOME uses Mutter, which combines compositing and window-management responsibilities and participates in implementing the GNOME desktop experience. KDE Plasma uses KWin, whose Wayland support is integrated with Plasma's desktop facilities. These projects share many protocols but make independent decisions about effects, window placement, display configuration, input settings, accessibility integration, and compatibility behavior.
The wlroots project provides reusable components for building compositors. It supports a family of independently developed environments, including Sway, a tiling compositor with a configuration model influenced by the i3 window manager. Shared libraries can reduce the work needed to handle input, outputs, buffers, and protocol interfaces, but they do not impose one complete desktop. Other compositor frameworks and specialized implementations target kiosks, automotive interfaces, games, or restricted-purpose devices.
Most applications do not implement the wire protocol directly. They use a toolkit such as GTK or Qt, which translates application-level window, input, clipboard, and rendering operations into Wayland requests. Toolkits must handle asynchronous configuration, scaling, popups, input methods, buffer allocation, and event dispatch. A well-supported toolkit backend can therefore bring many applications to Wayland without each application independently implementing these mechanisms.
Nevertheless, applications can depend on assumptions inherited from X11. Programs that inspect global window positions, capture arbitrary desktop regions, synthesize unrestricted input, or embed another application's native window may require redesign or additional interfaces. Games may need relative-pointer and pointer-constraint support. Input-method frameworks require coordination among clients, compositors, and text-input services. Accessibility also involves higher-level infrastructure: semantic information about controls and documents generally comes through accessibility APIs rather than from the display protocol alone.
Testing compatibility therefore requires more than checking whether a program opens a window. Relevant combinations include toolkit version, compositor, driver, graphics API, extension support, scaling configuration, and sandbox environment. Wayland's modularity permits a small embedded compositor and a full desktop compositor to implement different feature sets while remaining valid implementations. The resulting ecosystem gains flexibility, but application developers cannot assume that every optional desktop capability is universally available.
X11 compatibility, remote use, and interoperability
Xwayland provides the principal compatibility path for applications written for X11. It is an X server that runs as a Wayland client. An X application connects to Xwayland using the X protocol, while Xwayland presents its rendered surfaces to the Wayland compositor. This allows native Wayland and legacy X applications to coexist in the same desktop session without requiring every older program to be ported immediately.
In the common rootless arrangement, Xwayland windows appear alongside native application windows rather than inside one visible container representing an entire X desktop. The compositor integrates X window-management behavior through an X window-manager component, often called the XWM. This component coordinates X window properties, focus, placement, and related state with the compositor's Wayland-side view. Xwayland can also run in a rooted arrangement, where its desktop occupies a single host window.
Compatibility is substantial but not equivalent to reproducing every property of a traditional X session. Ordinary X applications usually retain their internal drawing and event models, but programs that manage the entire desktop or assume unrestricted access to all applications encounter boundaries. An X application cannot automatically inspect native Wayland windows merely because it can inspect other X clients. Screen capture, global keyboard monitoring, and desktop automation therefore behave differently across the compatibility boundary.
Security properties must also be described at the correct level. X clients connected to the same Xwayland server can retain forms of mutual access characteristic of X11. Running those applications under a Wayland compositor does not automatically isolate them from one another. Separating X applications into different Xwayland instances can change that boundary, but the behavior depends on the desktop or containment system. Native Wayland clients and Xwayland clients should not be treated as one uniform trust domain.
Remote display is another area where the architecture differs from X. Wayland's core protocol does not provide X-style network transparency, and its usual dependence on Unix sockets and shared-buffer file descriptors is not directly equivalent to sending all display traffic over a network connection. Remote graphical access is instead commonly implemented by capturing compositor output, encoding it as video or image updates, and returning authorized input. Compositors can provide remote-desktop backends or integrate with desktop services for this purpose.
Application remoting is also possible through specialized proxies that transport Wayland interactions and buffer contents across machines, while nested compositors can package a graphical session for remote delivery. These designs differ in bandwidth use, latency, graphics acceleration, and isolation. A system forwarding individual application surfaces solves a different problem from one streaming an entire desktop. Wayland leaves these choices outside its small core, so remote capability is a property of the surrounding implementation rather than an automatic consequence of protocol support.