Wayland (display server protocol)
|Original author(s)||Kristian Høgsberg|
|Initial release||0.85 / 9 February 2012|
|Stable release||1.4.0 / 24 January 2014|
Wayland is a protocol that specifies the communication between the display server (called Wayland compositor) and its clients. It was initially designed by Kristian Høgsberg, who already led the development of AIGLX, as a replacement for the X Window System. In stark contrast to the latter, Wayland clients will render without detour directly into their own buffer located in the graphics memory, through the use of EGL with some additional Wayland-specific extensions to EGL. The display manager is to do the compositing, hence it will incorporate a big chunk of the functionality of current-day compositing window managers. It will composite those buffers to form the on-screen display of application windows. The Wayland protocol is essentially only about input handling and buffer management. The handling of the input hardware relies on evdev in Linux, and similar components in other operating systems.
The initial implementation, chiefly
libwayland-EGL and the reference implementation Weston are written in C and published under the MIT License. Weston is written for the Linux kernel. An initial port to FreeBSD is in progress.
In recent years, Linux desktop graphics has 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. DRI, 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 "[push] X out of the hotpath between clients and the hardware" for reasons explained in the project's FAQ:
|“||What’s different now is that a lot of infrastructure has moved from the X server into the kernel (memory management, command scheduling, mode setting) or libraries (cairo, pixman, freetype, fontconfig, pango, etc.), and there is very little left that has to happen in a central server process. ... [An X server has] a tremendous amount of functionality that you must support to claim to speak the X protocol, yet nobody will ever use this. ... This includes code tables, glyph rasterization and caching, XLFDs (seriously, XLFDs!), and the entire core rendering API that lets you draw stippled lines, polygons, wide arcs and many more state-of-the-1980s style graphics primitives. For many things we've been able to keep the X.org server modern by adding extension such as XRandR, XRender and COMPOSITE ... With Wayland we can move the X server and all its legacy technology to an optional code path. Getting to a point where the X server is a compatibility option instead of the core rendering system will take a while, but we'll never get there if [we] don’t plan for it.||”|
Wayland consists of a protocol and a reference implementation named Weston. The project is also developing versions of GTK+ 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.
Wayland does not currently provide network transparency, but it may in the future. It was attempted as a Google Summer of Code 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 or X11). As of early 2013, Høgsberg is experimenting with network transparency using a proxy Wayland server which sends compressed images to the real compositor.
Differences between Wayland and X
There are several differences between Wayland and X in regards to performance, code maintainability and security:
- Architecture: the composition manager is a separate, additional feature in X, while Wayland merges display manager and compositor as a unique responsibility. Also it takes some of the tasks of the window manager, which in X is a separate client-side process.
- Rendering: the X server is able to render itself, although it can be instructed to display the rendered windows sent by clients. Wayland does not expose any API to render and delegates all the rendering responsibilities (including font rendering, widgets rendering, etc.) to the clients. Even the window decoration should be rendered in client side (by the graphic toolkits), although some compositors can offer server-side decorations.
- Security: Wayland isolates the input and output of every window, achieving confidentiality, integrity and availability in both cases; X lacks these important security features. Also, with the vast majority of the code running in the client, less code needs to run with root privileges, improving security.
- Inter-process communication: the X server provides a basic communication method between X clients, later extended by ICCCM conventions. This X client-to-client communication is used by window managers and also to implement X sessions, selections and drag-and-drop, and other features. Wayland core protocol does not support communication between wayland clients at all, and the corresponding functionality (if needed) should be implemented by the desktop environments (like KDE or GNOME), or by a third party (for example, by using native IPC of the underlying operating system).
- Networking: X Window System is an architecture built to run over a network, although some Wayland (and X) developers claim that, despite to common belief, X.Org Server has not been "network transparent" for a very long time now". Wayland does not offer network transparency by itself; however, a compositor can implement any remote desktop protocol to archieve remote displaying.
Some of the differences can also be easily understood by comparing the architecture diagrams of both protocols.
Compatibility with X
xwayland was written to enable running X11 applications through an X server, optionally rootless, running as a Wayland client. This is similar to the way X applications run in OS X’s native graphics environment.
Qt applications can switch between graphical backends like X and Wayland at load time with the
-platform command-line option. In January 2011, Wayland support was moved into the Lighthouse branch of the upstream Qt repository. Qt Lighthouse is shipped in the Qt 4.8 release.
In December 2010, GTK+ added preliminary support for switching back-ends at run time, saying "interesting combinations are X11+Wayland or Quartz+X11". In January 2011, the GTK+ Wayland backend was updated to support the multiple-backends feature and moved to the gdk-wayland-backend branch of the upstream GTK+ Git repository. In April 2011, the gdk-wayland-backend branch was merged in the GTK+ master branch.
At the beginning of 2014 libinput was created, which is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction to minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.
- GENIVI Alliance: The GENIVI automotive industry consortium for in-vehicle infotainment (IVI) supports Wayland.
- Maliit: Maliit, an input method framework, runs under Wayland.
- Mesa: Mesa, to which AMD and Intel directly contribute to support their graphics processors, has Wayland support integrated. Within the Mesa projects drivers for Qualcomm Snapdragon (freedreno) and Nvidia GPUs (nouveau) are being developed by Red Hat and community contributors.
- Sailfish OS: Jolla's first smartphone uses Wayland.
- Tizen: Tizen up to 2.x supports Wayland in IVI setups and from 3.0 onward defaults to Wayland.
- The Hawaii (desktop environment) exclusively supports Wayland.
- Enlightenment: The Enlightenment project declared full support for Wayland with their Enlightenment Foundation Libraries and window manager.
- Fedora: Fedora ships Wayland since release 17. Fedora developer Matthias Clasen released a tentative roadmap in March 2013, targeting to use Wayland as default by Fedora 21. Fedora 20 ships with a technology preview of a Wayland-enabled Gnome 3.10 session.
- GNOME: In March 2013 GNOME developers announced plans for a complete Wayland port within a year. GNOME 3.10 includes initial support that “will enable the project to fully adopt the next generation display and input technology in the future”.
- KDE: KWin, the KDE window manager, added support for OpenGL ES output in version 4.7. In January 2013 KWin’s main developer Martin Grässlin started working for Blue Systems with one of the goals being a complete Wayland port. Experimental Wayland support is now working in current KWin 4.11.
- Mate desktop: Wayland support is on Mate’s roadmap. The targeted Mate version is 1.10.
- Raspberry Pi: The Raspberry Pi Foundation are working in collaboration with Collabora to improve performance and memory consumption, but do not expect to be able to replace X11 as the default display server until later in the year.
As of October 2013[update]:
- Clutter has complete Wayland support.
- EFL has complete Wayland support, except for selection.
- GTK+ 3.10 (released 23 September 2013) has complete Wayland 1.2 support, including the client-side decorations, which is required by Weston.
- Qt 5 has complete Wayland support, including the client-side decorations, which is required by Weston but not KWin.
- SDL support for Wayland is under development.
- Weston – the reference implementation of a Wayland compositor; Weston implements client-side decoration
- Enlightenment 0.19 (E19) is expected to have full Wayland support.
- KWin had incomplete Wayland support in April 2013.
- Mutter has incomplete Wayland support.
- Clayland is a simple example Wayland compositor using Clutter.
Weston is the reference implementation of a Wayland compositor. It is written in C and was initially published under GPLv2, but is currently published under the MIT license. Weston is written for the Linux kernel API, i.e. it is only officially supported to work with the Linux kernel due to dependence on certain features, such as KMS, Graphics Execution Manager (GEM), and udev, which are either Linux-specific or uncommon in other Unix-like operating systems.
Weston relies on GEM to share application buffers between the compositor and applications. It contains a plugin system, external "shells" for WM/dock/etc, and Weston supports X clients. Clients are responsible for the drawing of their window borders and their decorations. For rendering, Weston can use OpenGL ES or software (the pixman library). The full OpenGL implementation is not used, because on most current systems, installing the full OpenGL libraries would also install GLX and other X Window support libraries as dependencies.
|Version||Date||Wayland main features||Weston main features|
|Old version, no longer supported: 0.85||9 Feb 2012||First release|
|Old version, no longer supported: 0.95||24 Jul 2012||Began API stabilization|
|Old version, no longer supported: 1.0||22 Oct 2012||Stable wayland-client API|
|Old version, no longer supported: 1.1||15 Apr 2013||Software rendering. FBDEV, RDP backends|
|Older version, yet still supported: 1.2||12 Jul 2013||Stable wayland-server API||Color management. Subsurfaces. Raspberry Pi backed|
|Older version, yet still supported: 1.3||11 Oct 2013||More pixel formats. Support for language bindings||Android driver support via libhybris|
|Current stable version: 1.4||23 Jan 2014||New wl_subcompositor and wl_subsurface interfaces||xdg_shell protocol. logind support for rootless Weston|
|Future release: 1.5||May 2014||Move xdg_shell into Wayland itself|
Kristian Høgsberg (krh), a software engineer who works on the Linux graphics stack, started Wayland as a spare-time project in 2008, while working for Red Hat; he is now at Intel. His earlier work on X included AIGLX, which enabled hardware acceleration of compositing window managers, and DRI2.
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."
Wayland is free software, and the libraries (libwayland-server and libwayland-client) were released under the MIT License, with the demo compositor and clients originally under the GPLv2 license. Moving the whole project to LGPLv2 was planned but did not occur and the project is now switching fully to the MIT License. Wayland works with all Mesa-compatible drivers with DRI2 support as well as Android drivers via the Hybris project. As of November 2010[update], Nvidia has no plans to support it in their proprietary drivers.[needs update] On 4 October 2013 Nvidia released a beta version of their 331.13 driver which supports the EGL API. Although limited to X11, IT publications such as Phoronix and Golem.de noted that EGL support in the Nvidia driver could pave the way for future Wayland support.
- Høgsberg, Kristian (9 February 2012). "[ANNOUNCE] Wayland and Weston 0.85.0 released". Wayland mailing list. Retrieved 8 June 2013.
- "Wayland and Weston 1.4 releases are out". Retrieved 2014-01-24.
- "Wayland". "Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol."
- Larabel, Michael (16 February 2013). "Wayland Begins Porting Process To FreeBSD". Phoronix. Retrieved 14 July 2013.
- Jonathan Corbet (5 November 2010). "Linux Plumbers Conference: Life after X (reporting a talk by Keith Packard)". LWN.net.
- "Wayland FAQ". Retrieved 17 February 2011.
- Kristian Høgsberg (9 November 2010). "Network transparency argument".
"Wayland isn't a remote rendering API like X, but that doesn't exclude network transparency. Clients render into a shared buffer and then have to tell the compositor (...) what they changed. The compositor can then send the new pixels in that region out over the network. The Wayland protocol is already violently asynchronous, so it should be able to handle a bit of network lag gracefully. Remote fullscreen video viewing or gaming isn't going to work well, [but] I don't know any other display system that handles that well and transparently."
- Michael Larabel (18 August 2011). "Remote Wayland Server Project: Does It Work Yet?".
- Adam Jackson (ajax) (9 November 2010). "[Re:] Ubuntu moving towards Wayland".
- Stone, Daniel (1 February 2013). The real story behind Wayland and X. 42:00 minutes in. Presentation at linux.conf.au 2013.
"[W]e think it's going to better at remoting than X."
- "The Wayland Situation: Facts About X vs. Wayland". Phoronix.com. 7 June 2013. p. 2. Retrieved 2013-07-18.
- Gräßlin, Martin (7 February 2013). "Client Side Window Decorations and Wayland". Retrieved 26 February 2014.
- Peres, Martin. "Wayland Compositors - Why and How to Handle Privileged Clients!". Retrieved 26 February 2014.
- "XDC2012: Graphics stack security". LWN.net. Retrieved 2013-07-18.
- Stone, Daniel (28 January 2013). "The real story behind Wayland and X linux.conf.au".
- "Wayland architecture". freedesktop.org. Retrieved 2013-07-18.
- Corentin Chary (21 June 2011). "Introducing xwayland and xf86-video-wlshm". "This driver really make things easy to test, since you don't need any specific hardware...."
- Darxus (27 November 2010). ""hosted" patch for nouveau – X under Wayland". "It's possible to run X.org as a client of Wayland, rootless or not, if you have an Intel video card"
- "Getting started with Lighthouse". Retrieved 17 December 2010.
- Kristian Høgsberg (25 January 2011). "Add wayland lighthouse plugin".
- Nokia (15 December 2011). "Qt Lighthouse git-repository".
- Michael Larabel (22 December 2010). "GTK+3 Now Uses X Input 2 By Default, New Back-End Caps".
- Matthias Clasen (21 December 2010). "GTK+ 2.91.7 released".
- Kristian Høgsberg (3 January 2011). "Multiple backends for GTK+".
- "Introduce Weston RandR protocol". 26 February 2014. Retrieved 2014-02-27./013480.html
- "Wayland Backend DRM | IVI Layer Management". GENIVI Alliance. Retrieved 2013-07-15.
- "Maliit Status Update". Posterous. 2 April 2013. Archived from the original on 2013-05-17. Retrieved 2013-10-14.
- "More Maliit Keyboard Improvements: QtQuick2". Murray's Blog. 2 April 2013. Retrieved 2013-10-14.
- "Maliit under Wayland". Retrieved 2013-09-14.
- Richard Hillesley (13 February 2012). "Wayland – Beyond X". The H Open. Heise Media UK. p. 3.
- "Mesa/Gallium3D Gets Its First ARM SoC GPU Driver". Phoronix. 12 March 2013. Retrieved 30 July 2013.
- Rob Clark (30 July 2013). "freedreno update: drm/kms and ifc6410". Blogspot. Retrieved 30 July 2013.
- "Nouveau Merged". Phoronix. 20 December 2006. Retrieved 2013-07-30.
- Michael Larabel (8 November 2010). "NVIDIA Says It Has No Plans To Support Wayland". Phoronix.
- "Red Hat Picks Up Another Graphics Driver Developer". Phoronix. 15 February 2013. Retrieved 2013-07-30.
- "Red Hat Talks About Nouveau, Open-Source Drivers". Phoronix. 11 May 2010. Retrieved 2013-07-30.
- "The First Jolla Smartphone Runs With Wayland". LinuxG.net. 14 July 2013. Retrieved 2013-10-08.
- "sailfishos main components diagram".
- "our first Jolla will ship with wayland, yes".
- "IVI/IVI Setup". Tizen Wiki. Retrieved 2013-04-08.
- "[IVI] Tizen IVI 3.0-M1 released". Tizen.org. Retrieved 2013-07-15.
- "Enlightenment and EFL backing Wayland". Enlightenment.org. 14 March 2013. Retrieved 2013-07-15.
- "Enlightenment as Standalone Wayland Compositor". 1 February 2014. Retrieved 2014-02-16.
- "Package wayland". Fedora Project. Retrieved 2013-07-15.
- "Wayland and Fedora". Lists.fedoraproject.org. Retrieved 2013-07-15.
- "You Can Now Run GNOME Shell Wayland On Fedora 20". Phoronix. 3 October 2013. Retrieved 2013-10-08.
- "GNOME / Wayland in Fedora". 3 October 2013. Retrieved 2013-10-08.
- Larabel, Michael (13 March 2013). "GNOME Will Move Full-Speed With Wayland Support". Phoronix. Retrieved 8 Apr 2013.
- "GNOME 3.10 Has Been Officially Released". Phoronix. 25 September 2013. Retrieved 2013-10-08.
- "3.10 Released!". GNOME. 25 September 2013. Retrieved 2013-10-08.
- Grässlin, Martin (28 November 2010). "KWin runs on OpenGL ES". "It does not only help, it is a must have to start working for Wayland. So to say it’s the first part of the KWin port to Wayland"
- Grässlin, Martin (19 January 2011). "On the Road to Modern OpenGL (ES)". Retrieved 2013-07-31.
- Grässlin, Martin. "KWin Hacking++". Retrieved 2013-04-08.
- Larabel, Michael (14 June 2013). "KDE 4.11 Beta Released, Works On Wayland". Phoronix. Retrieved 16 June 2013.
- "Raspberry Pi Case Study". Collabora. Retrieved 2013-08-09.
- "Wayland preview". Raspberry Pi. Retrieved 2013-08-09.
- "Clutter on Wayland". Retrieved 28 March 2012.
- "Wayland – Enlightenment". Retrieved 6 March 2013.
- "GTK+ 3.10 release mail". 23 September 2013. Retrieved 2013-09-24.
- "Documentation of the Wayland support in GTK+". 3 September 2013.
- "Toolkits on Wayland". Retrieved 28 March 2012.
- e-releasemanager (18 August 2013). "A Double Dose Of The W |". E19releasemanager.wordpress.com. Retrieved 2013-08-23.
- Grässlin, Martin. "The History on Wayland Support inside KWin". Martin’s Blog. Retrieved 2013-07-15.
- "Clayland". GitHub. Retrieved 2013-08-11.
- README file from the Wayland source code repository
- Stone, Daniel (1 February 2013). The real story behind Wayland and X. 38:46 minutes in. Presentation at linux.conf.au 2013.
"It doesn't require GL. Nothing in Wayland requires GL."
- Kristian Høgsberg (9 December 2010). "Blender3D & cursor clamping.".
- "Wayland". Wayland.freedesktop.org. Retrieved 2013-07-15.
- Høgsberg, Kristian (24 July 2012). "Wayland and Weston 0.95.0 released". Wayland mailing list. Retrieved 14 July 2013.
- Høgsberg, Kristian (22 October 2012). "Wayland and Weston 1.0". Wayland mailing list. Retrieved 14 July 2013.
- Scherschel, Fabian (23 October 2012). "Wayland's 1.0 milestone fixes graphics protocol". The H - Open. Heinz Heise. Retrieved 14 July 2013.
- Larabel, Michael (16 April 2013). "Wayland 1.1 Officially Released With Weston 1.1". Phoronix. Retrieved 14 July 2013.
- Høgsberg, Kristian (15 April 2013). "1.1 Released". Wayland mailing list. Retrieved 18 July 2013.
- Larabel, Michael (6 January 2013). "A Software-Based Pixman Renderer For Wayland's Weston". Phoronix. Retrieved 14 July 2013.
- Larabel, Michael (13 July 2013). "Wayland 1.2.0 Released, Joined By Weston Compositor". Phoronix. Retrieved 14 July 2013.
- Høgsberg, Kristian (12 July 2013). "Wayland and Weston 1.2.0 released". Wayland mailing list. Retrieved 18 July 2013.
- Høgsberg, Kristian (11 October 2013). "Wayland and Weston 1.3 release notes". Wayland mailing list.
- Høgsberg, Kristian (24 January 2014). "Wayland and Weston 1.4 is out". Wayland mailing list.
- Høgsberg, Kristian. "Wayland – A New Display Server for Linux". Linux Plumbers Conference, 2009. (Video available here )
- Høgsberg, Kristian. "EGL and GLES1/2 on Linux". Linux Plumbers Conference, 2010.
- "Interview: Kristian Høgsberg". FOSDEM 2007. 6 February 2007.
- Høgsberg, Kristian (8 September 2008). "DRI2 Protocol Spec Draft".
- Høgsberg, Kristian (31 March 2008). "DRI2 Direct Rendering".
- "An Experimental GNOME Shell Running On Wayland". Retrieved 6 Apr 2012. "Founder Kristian Høgsberg responsible for key X improvement of the past few years: DRI2...."
- "Wayland Becomes A FreeDesktop.org Project". Phoronix. 29 October 2010. Retrieved 2013-07-31.
- Kristian Høgsberg (29 October 2010). "Moving to freedesktop.org". Retrieved 2013-07-31.
- Larabel, Michael (22 November 2010). "Wayland License Changing To LGPLv2". Phoronix. Retrieved 21 September 2011.
- Larabel, Michael (20 September 2011). "Wayland Reference Code Being Re-Licensed". Phoronix. Retrieved 21 September 2011.
- Carsten Munk (11 April 2013). "Wayland utilizing Android GPU drivers on glibc based systems, Part 1". Mer Project. Retrieved 2013-07-03.
- Munk, Carsten (8 June 2013). "Wayland utilizing Android GPU drivers on glibc based systems, Part 2". Mer Project. Retrieved 2013-07-03.
- "Jolla Brings Wayland Atop Android GPU Drivers". Phoronix. 11 April 2013. Retrieved 2013-07-03.
- Aaron Plattner, nvidia's primary Linux developer (7 November 2010). "nvidia and the wayland display server". "We have no plans to support Wayland."
- "Nvidia drivers 331.13 beta". 4 October 2013. Retrieved 2013-10-05. "Added support for the EGL API on 32-bit platforms. Currently, the supported client APIs are OpenGL ES 1.1, 2.0 and 3.0, and the only supported window system backend is X11."
- "NVIDIA Releases Major Linux Driver With New Features, EGL". Phoronix. Retrieved 5 October 2013.
- "Unterstützt Nvidia Wayland und Mir?". Golem.de (in German) (Klass & Ihlenfeld Verlag GmbH). Retrieved 5 October 2013.
- Daniel Stone (March 2013). "The real story behind Wayland and X linux.conf.au". Ars Technica.
- Evan Jenkins (March 2011). "The Linux graphics stack from X to Wayland". Ars Technica.
- Official website
- Wayland at FOSDEM 2012 by Kristian Høgsberg
- The way to Wayland: Preparing for life After X by Joe 'Zonker' Brockmeier, LWN, 17 November 2010
- Wayland – Beyond X by Richard Hillesley, The H, 13 February 2012
- The Wayland Situation: Facts About X vs. Wayland by Eric Griffith, Phoronix, 7 June 2013