Wayland (display server protocol)
Wayland demonstration | |
Original author(s) | Kristian Høgsberg |
---|---|
Initial release | 0.85 / 9 February 2012[1] |
Stable release | 1.4.0 / 24 January 2014[2] |
Development status | Active |
Written in | C |
Operating system | Linux |
Type |
|
License | MIT |
Website | wayland.freedesktop.org |
Wayland is a protocol that specifies the communication between the display server (called Wayland compositor) and its clients.[3] 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-server
, libwayland-client
, 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.[4]
Software architecture
Wayland: between libwayland and the wayland compositor
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".[5]
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:[6]
“ | 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.[7] It was attempted as a Google Summer of Code project in 2011, but was not successful.[8] 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).[9] As of early 2013, Høgsberg is experimenting with network transparency using a proxy Wayland server which sends compressed images to the real compositor.[10]
Differences between Wayland and X
There are several differences between Wayland and X in regards to performance, code maintainability and security. Wayland delegates many tasks to the client such as drawing, font rendering, and multiple monitor support.[11] With the client handling the tasks, less code needs to run with root privileges, improving security.[12] Another added security feature compared to X is that the screensaver/locker is always a part of the compositor.[11]
The major differences between the operating modes of a Wayland compositor and the X.Org Server were explained at linux.conf.au 2013 by Daniel Stone.[13] He also points out that the X.Org Server has not been "network transparent" for a very long time now, very much in contrast to common beliefs.
Some of the differences can also be easily understood by comparing the architecture diagrams of both protocols.[14]
Compatibility with X
xwayland[15] was written to enable running X11 applications through an X server, optionally rootless, running as a Wayland client.[16] 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.[17] In January 2011, Wayland support was moved into the Lighthouse branch of the upstream Qt repository.[18] Qt Lighthouse is shipped in the Qt 4.8 release.[19]
In December 2010, GTK+ added preliminary support for switching back-ends at run time, saying "interesting combinations are X11+Wayland or Quartz+X11".[20][21] 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.[22] In April 2011, the gdk-wayland-backend branch was merged in the GTK+ master branch.
Adoption
- GENIVI Alliance
- The GENIVI automotive industry consortium for in-vehicle infotainment (IVI) supports Wayland.[23]
- Maliit
- Maliit, an input method framework, runs under Wayland.[24][25][26]
- Mesa
- Mesa, to which AMD and Intel directly contribute to support their graphics processors, has Wayland support integrated.[27] Within the Mesa projects drivers for Qualcomm Snapdragon (freedreno)[28][29] and Nvidia GPUs (nouveau)[30][31] are being developed by Red Hat and community contributors.[32][33]
- Sailfish OS
- Jolla's first smartphone uses Wayland.[34][35][36]
- Tizen
- Tizen up to 2.x supports Wayland in IVI setups[37] and from 3.0 onward defaults to Wayland.[38]
Planned adoption
- Enlightenment
- The Enlightenment project declared full support for Wayland with their Enlightenment Foundation Libraries and window manager.[39]
- Fedora
- Fedora ships Wayland since release 17.[40] Fedora developer Matthias Clasen released a tentative roadmap in March 2013, targeting to use Wayland as default by Fedora 21.[41] Fedora 20 ships with a technology preview of a Wayland-enabled Gnome 3.10 session.[42][43]
- GNOME
- In March 2013 GNOME developers announced plans for a complete Wayland port within a year.[44] GNOME 3.10 includes initial support that “will enable the project to fully adopt the next generation display and input technology in the future”.[45][46]
- KDE
- KWin, the KDE window manager, added support for OpenGL ES output[47] in version 4.7.[48] 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.[49] Experimental Wayland support is now working in current KWin 4.11.[50]
- Raspberry Pi
- The Raspberry Pi Foundation are working in collaboration with Collabora[51] 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.[52]
Toolkits
As of October 2013:
- Clutter has complete Wayland support.[53]
- EFL has complete Wayland support, except for selection.[54]
- GTK+ 3.10 (released 23 September 2013) has complete Wayland 1.2 support, including the client-side decorations, which is required by Weston.[55][56]
- 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.[57]
Compositors
Display managers that implement the Wayland display server protocol are also called Wayland compositors because they additionally perform the task of a compositing window manager.
- Weston – the reference implementation of a Wayland compositor; Weston implements client-side decoration
- Enlightenment 0.19 (E19) is expected to have full Wayland support.[58]
- KWin had incomplete Wayland support in April 2013.[59]
- Mutter has incomplete Wayland support.
- Clayland is a simple example Wayland compositor using Clutter.[60]
Weston
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.[61]
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).[62] The full OpenGL implementation is not used, because on most current systems, installing the full OpenGL libraries would also install GLX and other X-Windows support libraries as dependencies.[63]
Releases
Version | Date | Wayland main features | Weston main features |
---|---|---|---|
0.85 | 9 Feb 2012[1] | First release | |
0.95 | 24 Jul 2012[65] | Began API stabilization | |
1.0 | 22 Oct 2012[66][67] | Stable wayland-client API | |
1.1 | 15 Apr 2013[68][69] | Software rendering[70] | |
1.2 | 12 Jul 2013[71][72] | Stable wayland-server API. Multi seat support | Color management |
1.3 | 11 Oct 2013[73] | Support for language bindings | Android driver support via libhybris |
1.4 | 23 Jan 2014[74] | New wl_subcompositor and wl_subsurface interfaces | xdg_shell API |
1.5 | May 2014[75] | Move xdg_shell into Wayland itself | |
Old version Older version, still supported Latest version Future release |
History
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;[76] he is now at Intel.[77] His earlier work on X included AIGLX,[78] which enabled hardware acceleration of compositing window managers, and DRI2.[79][80][81]
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."
In October 2010 Wayland became a freedesktop.org project.[82][83]
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[84] but did not occur and the project is now switching fully to the MIT License.[85] Wayland works with all Mesa-compatible drivers with DRI2 support[27] as well as Android drivers via the Hybris project.[86][87][88] As of November 2010, Nvidia has no plans to support it in their proprietary drivers.[31][89] On 4 October 2013 Nvidia released a beta version of their 331.13 driver which supports the EGL API.[90] 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.[91][92]
The developers of Wayland are largely present X.Org Server developers.[93]
The name "Wayland" comes from the town of Wayland, Massachusetts. Høgsberg was driving through that town when the concepts behind Wayland "crystallized".[94]
See also
References
- ↑ 1.0 1.1 Høgsberg, Kristian (9 February 2011). "[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." - ↑ 11.0 11.1 "The Wayland Situation: Facts About X vs. Wayland". Phoronix.com. 2013-06-07. p. 2. Retrieved 2013-07-18.
- ↑ "XDC2012: Graphics stack security". LWN.net. Retrieved 2013-07-18.
- ↑ Stone, Daniel (2013-01-28). "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+".
- ↑ "Wayland Backend DRM | IVI Layer Management". GENIVI Alliance. Retrieved 2013-07-15.
- ↑ "Maliit Status Update". Posterous. April 2, 2013. Archived from the original on 2013-05-17. Retrieved 2013-10-14.
- ↑ "More Maliit Keyboard Improvements: QtQuick2". Murray's Blog. 2013-04-02. Retrieved 2013-10-14.
- ↑ "Maliit under Wayland". Retrieved 2013-09-14.
- ↑ 27.0 27.1 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. 2013-03-12. Retrieved 30 July 2013.
- ↑ Rob Clark (30 July 2013). "freedreno update: drm/kms and ifc6410". Blogspot. Retrieved 30 July 2013.
- ↑ "Nouveau Merged". Phoronix. 2006-12-20. Retrieved 2013-07-30.
- ↑ 31.0 31.1 Michael Larabel (8 November 2010). "NVIDIA Says It Has No Plans To Support Wayland". Phoronix.
- ↑ "Red Hat Picks Up Another Graphics Driver Developer". Phoronix. 2013-02-15. Retrieved 2013-07-30.
- ↑ "Red Hat Talks About Nouveau, Open-Source Drivers". Phoronix. 2010-05-11. Retrieved 2013-07-30.
- ↑ "The First Jolla Smartphone Runs With Wayland". LinuxG.net. 2013-07-14. 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. 2013-03-14. Retrieved 2013-07-15.
- ↑ "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. 2013-10-03. Retrieved 2013-10-08.
- ↑ "GNOME / Wayland in Fedora". 2013-10-03. 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. 2013-09-25. Retrieved 2013-10-08.
- ↑ "3.10 Released!". GNOME. 2013-09-25. 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 (2011-01-19). "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". 2013-09-23. Retrieved 2013-09-24.
- ↑ "Documentation of the Wayland support in GTK+". 2013-09-03.
- ↑ "Toolkits on Wayland". Retrieved 28 March 2012.
- ↑ e-releasemanager (2013-08-18). "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 2013). "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.
- ↑ "1.1 Released". freedesktop.org. Retrieved 2013-07-18.
- ↑ 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.
- ↑ "Wayland and Weston 1.2.0 released". Lists.freedesktop.org. 2013-06-28. Retrieved 2013-07-18.
- ↑ "Wayland and Weston 1.3 release notes". 2013-10-11.
- ↑ "Wayland and Weston 1.4 is out". 2014-01-24.
- ↑ http://worldofgnome.org/gnome-3-12-release-might-slightly-rescheduled-and-wayland/
- ↑ 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. 2010-10-29. Retrieved 2013-07-31.
- ↑ Kristian Høgsberg (2010-10-29). "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 (2013-04-11). "Wayland utilizing Android GPU drivers on glibc based systems, Part 1". Mer Project. Retrieved 2013-07-03.
- ↑ Munk, Carsten (2013-05-08). "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. 2013-04-11. 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". 2013-10-04. 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.
External links
- 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
|
|