The new display servers
Freedom!
Wayland does not prescribe a rendering mechanism. EGL and OpenGL are optional, although the official documentation mentions them [6]. You can replace the EGL implementation at any time independently of Wayland. (The clients and the compositor must agree on an implementation.) The system can even connect more graphics stacks if the compositor offers the appropriate buffer. For instance, you could have a special buffer for stereo images, which are sent to VR glasses. If the compositor has the necessary support, the hardware can even directly adopt and display the buffer contents. (This feature is especially useful for games and videos in full-screen mode.)
The Wayland compositor does not need to run as a stand-alone display server but can itself be a Wayland or X11 client. In these cases, the Wayland compositor usually opens a window, in which the output from the Wayland clients appears.
A client could be a normal application, an X server, or another Wayland compositor. X-Wayland is an X server that runs as a client in Wayland. Thanks to X-Wayland, you can continue to use legacy X11 applications under Wayland. After launching, they connect to X-Wayland, which relies on Wayland to output the window content to the screen.
On to Weston
Weston is a reference implementation of the Wayland compositor by the Wayland developers. Like the client libraries, Weston is released under the MIT license. Weston also serves as a model for developers of desktop environments: To make desktop environments run under Wayland, the developers need to rework their window managers to complete Wayland compositors. (See the "Compositor Help" box.) These efforts are currently in progress at the KDE and Gnome projects. Gnome users can test the results obtained so far with the latest Fedora (Figure 4).
Compositor Help
The compositor has to monitor and manage the input devices. To make the work easier for compositor manufacturers, the Weston developers have outsourced the code to a separate library. Libinput detects newly connected input devices, receives events sent by them, and passes the information on the compositor following preparation. Libinput communicates with udev and the evdev interface in the kernel (Figure 3). In addition to mice and keyboards, Libinput also supports touch devices.
KDE users can test the state of development using the KDE Neon live system [7]. The following command
sudo apt-get install plasma-workspace-wayland
first retrofits Wayland. In the login screen, the user then goes to
<C>Desktop session:</C> Plasma (Wayland)<C>
in the bottom left corner. Another option is RebeccaBlackOS, a live system that relies entirely on Wayland and Weston and comes with several compositor models you can try out (Figure 5, [8]).
On the Network?
In the X Window System, clients can communicate with the X server via a network if necessary. You can thus launch programs on a remote computer, and the windows will display on a local system. This process is transparent for the user and even works across different systems. This network transparency is missing in Wayland. Although there have been repeated attempts to extend Wayland, they have not made it into the official specification thus far. One of failed projects is Remote Wayland, which was launched in the scope of the Google Summer of Code 2011 [13]. The Gnome project has also conducted [14] its own experiments; remote control software such as VNC offers an alternative.
Pekka Paalanen explains why the introduction of network transparency is so complicated: "The Wayland protocol was written with shared memory in mind. The costs for the data transmission are effectively zero, thanks to shared main memory. Because of this optimization, the points where network transmissions can tap in are missing. You would need to evaluate many Wayland messages before you knew when and which parts of a buffer you need to transfer; therefore, simply forwarding individual messages does not work. When you start to build the necessary machinery that knows what and when to send, you soon realize that you've written a quarter of a compositor. [...] Also, you would need to evaluate quite a large number of Wayland messages to send content over a network.
Instead of artificially establishing network transparency and creating unnecessary overhead and complications that a local environment does not need, Wayland has limited its field of activity to local communication and is optimized for local activity. If you separate the network support and local communication, the translation layers between the two can be as complicated, smart, and pre-emptive as they want to be.
Last but not least, you can support an existing remote protocol, such as RDP, and thus avoid inventing a (bad?) new one. This design decision also completely evades the question as to whether you want to transmit a single window or the entire desktop. It allows for interesting applications, such as displaying the same window locally and on remote screens, and possibly even allowing people from different countries to use it at the same time."
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.