Generated by GPT-5-mini| Wayland compositor | |
|---|---|
| Name | Wayland compositor |
| Developer | Kenton VardaDaniel Stone[Red Hat]Intel Corporation |
| Released | 2012 |
| Programming language | C (programming language) |
| Operating system | Linux |
| Platform | x86-64, ARM |
| Genre | Display server protocol |
| License | MIT License |
Wayland compositor A Wayland compositor is a display server component that acts as both a display server and a compositor for graphical output on Linux, coordinating clients, rendering, and input. It replaces legacy systems such as X.Org by implementing the Wayland protocol and integrating with graphics stacks like Mesa and libdrm. Major contributors include engineers from Red Hat, Intel Corporation, Collabora, and individual contributors such as Kenton Varda and Daniel Stone.
A compositor mediates between graphical clients and hardware, managing surfaces, buffers, and input from devices such as keyboards and mice via Linux kernel subsystems like evdev and ioctl. It typically interacts with graphics drivers developed by vendors like NVIDIA, AMD, and Intel Corporation using APIs including Direct Rendering Manager and Kernel Mode Setting. Compositors serve desktop environments such as GNOME, KDE Plasma, Sway, and integrate with toolkits like GTK and Qt.
A Wayland compositor's architecture centers on a protocol implementation, a renderer, and input handling. The renderer leverages libraries such as Mesa, OpenGL, Vulkan, and acceleration via DRI and EGL. Compositors use windowing toolkits like GTK, Qt, and Clutter for client-side surfaces and rely on protocols for shell integration, often exposing extensions implemented by projects like weston or wlroots. Components include session management interfacing with systemd, power control via UPower, and multimedia coordination with PulseAudio or PipeWire.
Communication is governed by the Wayland protocol and extended by protocols such as xdg-shell, zwp_linux_dmabuf_v1, wl_compositor, and wp_viewporter. Many compositors implement extra protocols standardized by groups like freedesktop.org or developed in projects including Weston and wlroots. Clients and compositors often negotiate buffer formats using EGL, GBM, and DMA-BUF to enable zero-copy transfer between X.Org clients via XWayland and native Wayland clients.
Notable implementations include reference compositors and production-ready servers: Weston as a reference, Mutter powering GNOME Shell, KWin powering KDE Plasma, and wlroots-based compositors like Sway and river. Other projects include Smithay, way-cooler, Wayfire, and vendor-specific efforts from NVIDIA and Intel Corporation. Distribution maintainers at Debian, Ubuntu, Fedora, and Arch Linux package these compositors for end users.
Compositors provide features such as hardware-accelerated composition, per-surface transformations, and multi-monitor support compliant with standards like EDID and DRM Atomic. They support graphical effects using OpenGL, Vulkan, and shader languages, integrate input methods like IBus and Fcitx, and manage clipboard and drag-and-drop via Wayland protocols. Desktop shells implement session features, workspaces, and window management policies used by projects such as GNOME Shell, KDE Plasma, and Sway.
Wayland compositors improve security by design compared to X.Org through client isolation and minimized global state, reducing attack surface exploited by threats such as keyloggers or input injection techniques. Compositors handle privileged operations via kernel APIs like udev and seccomp sandboxing, and leverage TLS or D-Bus for authenticated inter-process communication where applicable. Performance is optimized by avoiding copying with DMA-BUF, using GPU schedulers from Linux kernel subsystems, and integrating with Mesa drivers to reduce latency for interactive tasks and multimedia playback.
Development of the Wayland protocol began in the late 2000s by developers including Kenton Varda and Daniel Stone, and adoption accelerated in the 2010s with contributions from Red Hat, Intel Corporation, and community projects like Collabora. Major desktop environments migrated to Wayland: GNOME adopted Wayland sessions in GNOME 3.10 era, KDE Plasma added support through KWin, and tiling compositors such as Sway implemented Wayland-compatible workflows. Hardware vendor support expanded as Mesa drivers matured and companies like NVIDIA introduced proprietary and later protocol-supporting drivers. The ecosystem continues evolving with input from standards bodies like freedesktop.org and implementations such as Weston and wlroots.
Category:Display server protocols