Jump to content

Wayland (protocol)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Kizar (talk | contribs) at 01:25, 29 March 2013 (Design). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Wayland
Original author(s)Kristian Høgsberg
Initial release2008
Stable release
1.0.6 / 22 March 2013; 11 years ago (2013-03-22)
Repository
Written inC
Operating systemLinux
TypeDisplay server
LicenseMIT
Websitewayland.freedesktop.org

Wayland is a computer display server protocol and a library for Linux implementing that protocol.[1]

Wayland provides a method for compositing window managers to communicate directly with applications and video hardware and expects them to communicate with input hardware using other libraries. Applications render graphics to their own buffers, and the window manager becomes the display server, compositing those buffers to form the on-screen display of application windows. This is a simpler and more efficient approach than using a compositing window manager with the X Window System.[2]

Existing compositing window managers, such as KWin and Mutter are expected to implement Wayland support directly, to become Wayland compositors / display servers.

Background

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;[3] he is now at Intel.[4] His earlier work on X included AIGLX,[5] which enabled hardware acceleration of compositing window managers, and DRI2.[6][7][8]

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.[9][10] As of November 2010, Wayland only works with free and open source drivers for Intel, AMD (previously known as ATI) and Nvidia (nouveau driver) graphics cards.[11] As of November 2010, Nvidia has no plans to support it in their proprietary drivers.[12] [needs update]

The developers of Wayland are largely present X.Org Server developers.

The name "Wayland" comes from the town of Wayland, Massachusetts. Høgsberg was driving through that town when the concepts behind Wayland "crystallized".[13]

Planned adoption

Ubuntu
Mark Shuttleworth announced plans to eventually replace X with Wayland as the primary Ubuntu display server with their Unity desktop.[14] As of February 2013, Jono Bacon indicated that the plans to migrate Ubuntu to Wayland were under review, although no firm decision had been made.[15] In March 2013, Canonical formally cancelled plans to adopt Wayland, and announced plans to build their own display server, Mir.[16]
Fedora
Adam Jackson (ajax), who is also an X.Org developer, said that Fedora is likely to eventually use Wayland by default, "…because it's a serious win for a lot of things, and the downsides are pretty negligible despite the fear from the peanut gallery."[17]
KDE
KWin, the KDE window manager, added support for OpenGL ES output[18] in version 4.7.[19] So far KWin has received its initial port to Wayland.[20] In January 2013 KWin’s main developer Martin Gräßlin will start working for Blue Systems with one of the goals being a complete Wayland port.[21]

Toolkits

As of March 2013:

  • Clutter has complete Wayland support.[22]
  • EFL has complete Wayland support, except for selection.[23]
  • GTK+ support is complete, including client-side decorations and will be part of the 3.10 release in September 2013.[24] There are still some things that need improving though.[25][26]
  • Qt 5 has complete Wayland support, including the client-side decorations.
  • Wayland support for SDL is under development.[27]

Design

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 "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".[28]

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:[29]

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 (largely complete) and a reference implementation named Weston. For rendering, Weston can use OpenGL ES or software (the pixman library).[30] At present, clients are restricted to OpenGL ES instead of full OpenGL because "libGL pulls in GLX and all the X dependencies".[31] 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.[32] It was attempted as a Google Summer of Code project in 2011, but was not successful.[33] The todo list for Wayland 1.0 includes "maybe try to make remote wayland actually happen, to see if there is something in the protocol/architecture that makes it harder than it should be."[34] 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).[35] As of early 2013, Høgsberg is experimenting with network transparency using a proxy Wayland server which sends compressed images to the real compositor.[36]

Weston, the reference Wayland compositor, only works with the Linux kernel due to dependence on Linux-specific features such as udev.[37]

Compatibility with X

A screenshot showing xwayland

xwayland[38] was written to enable running X11 applications through an X server, optionally rootless, running as a Wayland client.[39] This is similar to the way X applications run in Mac 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.[40] In January 2011, Wayland support was moved into the Lighthouse branch of the upstream Qt repository.[41] Qt Lighthouse is shipped in the Qt 4.8 release.[42]

In December 2010, GTK+ added preliminary support for switching backends at run time, saying "interesting combinations are X11+Wayland or Quartz+X11".[43][44] 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.[45] In April 2011, the gdk-wayland-backend branch was merged in the GTK+ master branch.


References

  1. ^ "Wayland". Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol.
  2. ^ "Wayland Architecture". Wayland project. 5 November 2010. Retrieved 10 August 2011.
  3. ^ Kristian Høgsberg. "Wayland - A New Display Server for Linux". Linux Plumbers Conference, 2009. (Video available here)
  4. ^ Kristian Høgsberg. "EGL and GLES1/2 on Linux". Linux Plumbers Conference, 2010.
  5. ^ "Interview: Kristian Høgsberg". FOSDEM 2007. 6 February 2007.
  6. ^ Kristian Høgsberg (8 September 2008). "DRI2 Protocol Spec Draft".
  7. ^ Kristian Høgsberg (31 March 2008). "DRI2 Direct Rendering".
  8. ^ "An Experimental GNOME Shell Running On Wayland". Retrieved 6 April 2012. Founder Kristian Høgsberg responsible for key X improvement of the past few years: DRI2....
  9. ^ Larabel, Michael (22 November 2010). "Wayland License Changing To LGPLv2". Phoronix. Retrieved 21 September 2011.
  10. ^ Larabel, Michael (20 September 2011). "Wayland Reference Code Being Re-Licensed". Phoronix. Retrieved 21 September 2011.
  11. ^ Michael Larabel (8 November 2010). "NVIDIA Says It Has No Plans To Support Wayland". Phoronix.
  12. ^ Aaron Plattner, nvidia's primary Linux developer (7 November 2010). "nvidia and the wayland display server". We have no plans to support Wayland.
  13. ^ Evan Jenkins (March 2011). "The Linux graphics stack from X to Wayland". Ars Technica.
  14. ^ Mark Shuttleworth (4 November 2010). "Unity on Wayland". The next major transition for Unity will be to deliver it on Wayland....
  15. ^ Jono Bacon via Joey-Elijah Sneddon (4 February 2013). "Is Canonical Working on New, Custom Display Server for Unity?". Adding that 'the simple reality is that X doesn't meet those needs, Wayland doesn't meet those needs.'
  16. ^ Oliver Ries (Mar 4 2013). "Taking Unity to the next level". After thorough research, looking at existing options and weighing in costs & benefits we have decided to roll our own Display Server, Mir {{cite web}}: Check date values in: |date= (help)
  17. ^ Adam Jackson (ajax) (9 November 2010). "[Re:] Ubuntu moving towards Wayland".
  18. ^ Martin Gräßlin (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
  19. ^ On the Road to Modern OpenGL (ES)
  20. ^ Martin Gräßlin (11 June 2011). "KWin goes Wayland". Initial Implementation of a Wayland Server in KWin
  21. ^ http://blog.martin-graesslin.com/blog/2012/10/kwin-hacking/
  22. ^ "Clutter on Wayland". Retrieved 28 March 2012.
  23. ^ "Wayland – Enlightenment". Retrieved 06 March 2013. {{cite web}}: Check date values in: |accessdate= (help)
  24. ^ "GTK+ Support Merged For Wayland CSD". Retrieved 17 March 2013.
  25. ^ Michael Larabel (March 26 2013). "GTK+ Is Becoming Very Usable With Wayland". {{cite web}}: Check date values in: |date= (help)
  26. ^ "Full Wayland support in GTK+". March 26 2013. {{cite web}}: Check date values in: |date= (help)
  27. ^ "Toolkits on Wayland". Retrieved 28 March 2012.
  28. ^ Jonathan Corbet (5 November 2010). "Linux Plumbers Conference: Life after X (reporting a talk by [[Keith Packard]])". LWN.net. {{cite web}}: URL–wikilink conflict (help)
  29. ^ "Wayland FAQ". Retrieved 17 February 2011.
  30. ^ 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."
  31. ^ Kristian Høgsberg (9 December 2010). "Blender3D & cursor clamping".
  32. ^ 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."
  33. ^ Michael Larabel (18 August 2011). "Remote Wayland Server Project: Does It Work Yet?".
  34. ^ Kristian Høgsberg (17 February 2012). "Towards 1.0".
  35. ^ Adam Jackson (ajax) (9 November 2010). "[Re:] Ubuntu moving towards Wayland".
  36. ^ 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."
  37. ^ README file from the Wayland source code repository
  38. ^ 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....
  39. ^ 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
  40. ^ "Getting started with Lighthouse". Retrieved 17 December 2010.
  41. ^ Kristian Høgsberg (25 January 2011). "Add wayland lighthouse plugin".
  42. ^ Nokia (15 December 2011). "Qt Lighthouse git-repository".
  43. ^ Michael Larabel (22 December 2010). "GTK+3 Now Uses X Input 2 By Default, New Back-End Caps".
  44. ^ Matthias Clasen (21 December 2010). "GTK+ 2.91.7 released".
  45. ^ Kristian Høgsberg (3 January 2011). "Multiple backends for GTK+".

Template:Window managers