Technology / DevOps

Wayland vs. Xorg: Will Wayland Replace Xorg?

Wayland vs. Xorg: Will Wayland Replace Xorg?
Follow us
Published on August 7, 2023

Wayland vs. Xorg? Which is better? It depends on who you ask. 

Every application, tool, or window you see on your desktop or laptop monitor comes from display server technology. Since 1987, the standard has been X server, with the most current version being X11. Xorg (also sometimes known as X.org) is the most popular open-source implementation of an X server on Linux.

But Wayland is giving Xorg some competition. Wayland was developed to create a more streamlined approach that utilizes modern processes. Development on Wayland began in 2013, and the first alpha release was in January 2021. Since 2013, the debate around Wayland vs. Xorg has swirled. 

After nearly a decade of development and launch, has the time come for Wayland to replace Xorg? Let's explore, as the answer to Wayland vs. Xorg might not be as simple as “Yes” or “No.”

What is Wayland?

Wayland is the result of the Wayland Project, a direct effort to replace X11 to manage a graphical system and how the user interacts with it. Where Xorg is a server listening for commands, Wayland is a protocol designed for implementation within an environment. It can't be downloaded or installed, nor is it an application.

Wayland removes the need for the X server by enabling the compositor and application to talk directly to each other. A compositor is a window manager that provides an off-screen buffer for each window. The window buffers into an image, or other graphical effects such as animation, and writes it to the display memory. This process cuts out the X server entirely to remove steps in the graphics rendering process. The clients render locally and communicate directly with the compositor.

Why Use Wayland?

The primary benefit of using Wayland is client-side rendering. This approach is more modern and cleaner than Xorg. Wayland removes the middleman client/server method, which allows an application to communicate directly with the compositor. Or another way to think about Wayland is that it is the client and server combined into one.

The methodology behind this approach is that the application knows what it wants to render. Client-side rendering reduces the steps usually associated with the traditional client/server process. Applications draw the window they will run in and then send their display information to Wayland. With Wayland, the compositor is the display server. 

Wayland offers a simplified codebase, which has the added benefit of reducing the bloat incurred by years of developers to make Xorg work as technology changes. A shift to client-side rendering increases load times and, in most cases, offers a more straightforward implementation.

What is Xorg?

Xorg is an open-source application that interacts with client applications through the X11 protocol used with the X Window System, or simply X. The X system, which debuted in 1984, was designed to render graphics over a network. X quickly became the default windowing system for UNIX-type operating systems (OS), including Linux.

Xorg works on the client/server model, the standard method, for many years. The benefit of the client/server model is that it allows clients to run either locally or remotely on a different machine. The Xorg server acts like any other server. It waits and listens for client applications to connect and send events.

When a client connects and sends inputs like mouse movements or keystrokes, Xorg draws on the window display. The Xorg server relays the information back and forth between the application and the compositor. Because of the client/server model, applications need to communicate with Xorg before the compositor can create the window for the application. This workflow is a tried-and-true method but can be slow, especially by today’s standards. During remote connections, latency issues can be noticeable to the end user.

Why Use Xorg?

There are a few reasons that Xorg remains the default with Linux. Xorg is familiar, as it has been used for over 30 years. This longevity comes with baggage, as the coding and additions make X bloated. However, compared to Wayland, Xorg is better designed to add new capabilities or functionality.

Video games and graphically intense applications designed for X11 tend to run better on Xorg. Beyond those two examples, many native applications still in use were written for Xorg. Even for newer systems, X and Xorg are still the default windowing application, although many do come with Wayland installed.

Is Wayland Better Than Xorg?

Wayland and Xorg often run into direct comparisons to one another as they handle an operating system’s graphic stack. However, what gets displayed in the window is where the comparison should end. Wayland's design is a direct replacement for Xorg, not a competitor.

Despite the integration and longevity of Xorg, several issues persist with its continued use. When boiled down to its core, Xorg is the middleman that creates extra steps between the applications, the compositor, and the hardware. Wayland streamlines this process by eliminating the X server step.

 From a security standpoint, Wayland shows marked improvement of GUI-level isolation. By its design, Xorg does not allow this functionality. Xorg assumes all programs are not nefarious. While running multiple GUI applications, Xorg does not isolate them from each other. The command input has the potential to log the keystrokes, for example, of processes for many applications.

Wayland vs. Xorg: Performance

This client-side rendering, at the end of the day, will have the greatest influence regarding performance for Wayland vs. Xorg. Wayland streamlines the graphical rendering workflow and lets applications determine what to render.  Until recently, with the announcement of NVIDIA’s graphical support for Wayland, many would argue Xorg tends to handle games more effectively. However, now that NVIDIA supports Wayland, the result is a similar performance output.

Better performance, a simplified workflow, and client-side rendering work in Wayland's favor. 

Whereas, unfortunately, age, a bloated codebase, and an older workflow work against Xorg remaining the standard. 

Wayland Advantages

Let’s take a moment to lay out the Wayland advantages over Xorg:

  • Client-side rendering: The primary benefit of using Wayland is client-side rendering. This approach is more modern and streamlined than Xorg. Wayland removes the middleman from the client/server method, which allows an application to communicate directly with the compositor. 

  • Simplified codebase: Wayland offers a simplified codebase, which has the added benefit of reducing the bloat incurred by years of developers’ efforts to make Xorg work as technology changes.

  • GUI-level isolation: Wayland is a marked improvement of GUI-level isolation over Xorg. By its design, Xorg does not allow this functionality. While running multiple GUI applications, Xorg does not isolate them from each other. Wayland does, which is a more secure approach.

Xorg Advantages 

Now, let’s dig into some of the specific benefits of Xorg over Wayland:

  • Established user base: Xorg is familiar as it has been used for over thirty years. Many extensions and additions to the code allow Xorg to remain a viable option. Compared to Wayland, Xorg is better designed to add new capabilities or functionality.

  • Heavy graphics support: Video games and graphically-intense applications tend to run better on Xorg. Until very recently, NVIDIA only offered support for Xorg. However, Wayland still lacks wide acceptance from users for graphically demanding applications and software.

  • Extension support: Many programmers and developers still write code for X. This decision helps keep Xorg relevant, despite the apparent benefits of Wayland. Perhaps software coding will put Wayland first, but for now, coding for X is still the preferred choice. Extensions, specifically, were a significant boost for X11.

Fedora Wayland vs. Xorg

Regarding Fedora, both Wayland and Xorg have their benefits. First, to note, Wayland has been the default graphical display configuration since Fedora 25. This is important as many periphery Fedora services will be supported by Wayland, however, there are still some that are not.

Unlike Wayland, when running Fedora, Xorg has been known to suffer from screen tearing. Here, programs with high-DPI and multi-monitor with mixed-DPI work better with Wayland over Xorg. Ultimately, it’s a mixed bag regarding Wayland vs. Xorg for Fedora. Xorg may be fractionally faster, but some of the legacy aspects and screen tearing make it a challenge.

Ubuntu Wayland vs. Xorg

Like Fedora, Wayland has been the default display server in Ubuntu since 2017 with version 17.10 up to today’s release of  21.04.  Users report the overall feel of Wayland on Ubuntu is better than the legacy display, Xorg. However, many applications that are supported by Xorg are not supported by Wayland on Ubuntu, a common thread in Wayland running on a multitude of Linux distros. 

Of course, if you want to run a specific application on your Ubuntu distro, reverting to the legacy Xorg may be the best option.

GNOME Xorg vs. Wayland

GNOME, being one of the most popular Linux distributions, is a common guinea pig to testbench how Wayland and Xong match up. Despite similar performance results, in many respects testing with Wayland on GNOME led to some programs demanding more RAM and power usage than Xorg. 

Furthermore, aside from increased RAM usage, Wayland on GNOME does typically deliver higher frames per second over GNOME running Xorg.

Although Wayland is the default on GNOME, for those who do want to run Xorg, it is an option that runs the GNOME shell.

Linux Xorg vs. Wayland

If you’re looking for comprehensive extensibility across Linux distributions, even though it’s the older incumbent, Xorg may be the best bet. Even as so many Linux distributions are coming prebuilt with Wayland, there are still challenges with certain application support. 

Xorg carries out commands from the client without question. Wayland attempts to correct this by improving performance through proper rendering actions. 

Final Analysis: Will Wayland Replace Xorg?

The answer to Wayland vs. Xorg and which is best isn't straightforward. Wayland, by all accounts, seems to accomplish what it set out to do, and that is to replace the X Windows Server and, by association, Xorg. Wayland may pick up a more extensive user base after over a decade of development and debuting in 2021. 

Better performance, a simplified workflow, and client-side rendering work are in Wayland's favor. Age, a bloated codebase, and an older workflow work against Xorg remaining the industry standard. Yet, despite these pros and cons, Wayland has not wholly replaced Xorg. Perhaps this outcome isn't too much of a surprise. Any expectation that Wayland could swoop in and upstage a product and process used for over 30 years seems optimistic.

However, the trends show that Wayland is not only growing in popularity but also industry-wide adoption. One of the most significant factors holding Wayland back was NVIDIA's preference for Xorg. NVIDIA recently released the 510 Linux driver that pairs with Wayland and a modern compositor, with encouraging results. Perhaps this is the final hurdle to widespread Wayland adoption, specifically for graphically intense applications and video gaming.

If you work on a newer computer or have a fresh OS install, now might be a good time to try Wayland. If you’re not quite ready to move from Xorg, plenty of community support and programs still use X. Currently, either option is viable, mainly depending on your graphical needs. To learn more about Linux, check out all our online Linux courses.

Not a CBT Nuggets subscriber? Start your 7-day free trial! 


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522