This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Wayland

This page collects information about porting GNOME to work with Wayland instead of X.

What is Wayland ?

Wayland is a compositor protocol and library implementation of that protocol.

Under Wayland, the roles of the display manager and the compositor are merged. The compositor uses Linux APIs such as KMS and evdev directly, and EGL is used for rendering. The core Wayland protocol is fairly minimal, and a lot of functionality is offered via extensions that implement interfaces (similar to D-Bus interfaces).

See the Wayland website for more in-depth information.

Why switch to Wayland ?

X is showing its age - it has been kept alive for a very long time by means of adding more and more extensions to the core protocol. The Wayland protocol is a much leaner definition of a modern compositing-based display system. We don't need to carry around many obsolete parts of the X protocol (such as core fonts, the core rendering API, etc) any longer. Some problematic parts of the X protocol, such as grabs, are simply not present under Wayland, which avoids a whole class of problems.

Wayland enables features that are hard or impossible to support under X:

Many core X contributors are eager to see us move to the next generation display system - after all Wayland was born and raised in the X community, and has strong support there.

Drivers

The driver situation for Wayland is as follows:

X compatibility

X clients are still supported under Wayland via a 'rootless' X server that translates X windows into Wayland surfaces. xwayland is such an X server.

Cross-desktop compatibility

For X-based desktops, the ICCCM and EWMH specifications (together with a number of other X and freedesktop specifications) have provided a reasonable basis for interoperability of applications across different environments.

The Wayland reference compositor, weston, has served as a testbed to implement interfaces that replace some of these specifications. gnome-shell as a Wayland compositor will implement these interfaces, and the GTK+ Wayland backend will use them.

We will work with the Wayland community and with other desktops that are moving towards Wayland (such as KDE and Enlightenment) to expand these interfaces as needed and document them well enough to ensure interoperability.

What others are doing

KDE currently has no plans to stop X from fully working, and the idea is to support Wayland as an optional alternative. More information about the Wayland support in KDE can be found here: http://community.kde.org/KWin/Wayland and here: http://vizzzion.org/blog/2013/01/the-road-to-kde-frameworks-5-and-plasma-2/

The Enlightenment project is backing Wayland and is working towards making Enlightenment a Wayland compositor. The EFL toolkit is already ported to Wayland. Statement here: https://phab.enlightenment.org/phame/live/1/post/enlightenment_and_efl_backing_wayland/

Canonical has announced that they were abandoning their earlier plans to use Unity + Mir, and instead plan to leverage Gnome + Wayland by default as of Ubuntu 18.04 LTS.

What does this mean for distributions?

Whether GNOME uses X or Wayland underneath should not affect a full Linux distribution in a majorly disruptive way.

The Wayland libraries will become GNOME dependencies, and need to be available.

The display manager will need to know how to launch a Wayland-based session in addition to launching X-based sessions, and a few other plumbing components (such as logind or ConsoleKit) will have to learn about this new type of session. For gdm, this will be part of the GNOME porting effort.

3rd party applications will continue to work in GNOME, via xwayland.

GNOME applications will continue to work in X-based environments, via the GTK+ X backend.

Porting GNOME to Wayland

Making GNOME work on Wayland can happen in several independent steps:

Proposed roadmap

Trying it out

Initial instructions for building from source and running

References


2024-10-23 11:17