You might have heard about Wayland, a new(ish) protocol that aims to replace the Xorg display server in the distant future. If you’re thinking this won’t affect you, think again — Fedora 25 and above uses it by default.
Clearly, it’s something that’s here to stay and will grow. The fact you can use it now is proof of that. But if you want to test out the future, you’ll need to keep some things in mind.
What Is Wayland?
Put shortly, it’s a protocol which tells your programs how they should appear to you, depending on your actions. For example, moving a window around, or clicking a button. Technically, it’s not a replacement for the Xorg server by itself — Wayland only defines the way in which such a display server should talk to those applications.
Instead, it relies on a third party to provide this display server, called a Wayland compositor. This is what takes the role of the Xorg server. An example of this is KWin, of the KDE Plasma Desktop. What Wayland does is attempt to simplify display server communications, making future development easier and faster.
But like many future technologies, it has some teething to work through. The Xorg server has been around for a long time, and itself has been steadily built on. That also means that Wayland has some catching up to do (along with the display servers which implement it). But for now, there are many things you can do to make testing it out much smoother.
Avoid GTK+ 2 or Qt 4 Applications
Linux is quite unique in that it has no real de facto GUI toolkit (compared to Windows or macOS for example). These toolkits are pieces of software (frameworks) which make it easier to create GUIs (graphical user interfaces) for programs. Major ones on Linux include GTK+ and Qt.
Basically, the programs you interact with day to day are written in these frameworks. They act as clients to your display server, asking for things to be drawn onto your screen. However, these requests need to be understood first, and that’s up to the toolkit to do.
As such, only some types of programs can actually run in Wayland — those which know how to speak it. For example, those written in Qt 5 (the toolkit the Plasma desktop is based off), will be able to run properly. GTK+ 3 programs also can run natively.
That being said, if you do try to open, say, a Qt 4 application, you’ll have a fair chance of it running. Wayland does this by running the Xorg server behind the scenes, to listen to the apps which it can’t understand. However, this can lead to higher memory usage, and slightly lower speeds. Plus, there are some things that it just can’t do at the moment.
Some Apps May Not Work
The Xorg server, having years of work built onto it, is full featured. It was designed to be very extendable, allowing it to grow over the years. As such, there are some things which Wayland can’t do for programs yet (and so are reliant on Xorg).
For example, a common issue being cited about Wayland is that Redshift doesn’t work on it. Redshift is a program designed to filter blue light from your monitor, in the same vein as F.lux or Night Shift. The main reason it doesn’t work is because it relies on one of Xorg’s extensions: RandR. It provides programs with an easy way of asking Xorg to change your screen’s display.
While Wayland provides the means to recreate this ability somewhat, it’s reliant on each Wayland compositor to actually implement it. This means that while one desktop environment might support something like Redshift, there’s no guarantee it will work elsewhere.
In the future, Wayland will likely be properly supported. The GNOME desktop for example has now implemented the ability to change your screen temperature. But there’s still a way to go.
Compositing is a Must
Compositing is a technique which helps to prevent screen tearing and artifacts. This is done by keeping copies of your display in memory, usually with the help of your graphics card. This way, even if applications stop responding, your display server will still have something to work with. Along with this, it also lets you have things like window animations and shadows.
Wayland is designed to make this process much more efficient than Xorg by making it compulsory. Xorg has compositing as an optional feature, through an extension called Xcomposite. But because of how it’s implemented, it takes a little more time compared to Wayland.
That being said, this can lead to some problems. Compositing results in slightly lower performance of programs such as games. So back in Xorg, most desktops turn this off when an app goes full-screen, solving that problem. But many Wayland compositors still need to implement this. If you’re interested in using graphics intensive programs under it, this is quite important to keep in mind.
Nvidia Graphics May Not Work
More specifically, if you’re using Nvidia’s proprietary graphics driver, Wayland probably won’t work for you. This is related to the compositing problem above. To make the process work, your graphics driver must talk to Wayland compositors in a certain way.
Intel and AMD graphics cards don’t have this problem, since they use the expected standard, called GBM (Generic Buffer Management). Nvidia believes that their way of speaking to Wayland, called EGLStreams, is better, and as such sticks to that instead.
This problem can be solved in two ways: Nvidia drivers implement GBM, or Wayland compositors implement EGLStreams. Currently, Nvidia seems uninterested in pursuing the former solution, so it’s up to desktop environments to solve the problem. GNOME for example works fine. However, many other desktops remain unusable.
You Should Probably Use Fedora
All this being said, if you want a good experience on Wayland, Fedora is your best choice. Despite being usable, display servers using it are still rather cutting edge, so any support is good to have. Fedora is known for using the latest technologies the Linux desktop has to offer, while also being quite usable. It makes it a perfect fit for Wayland, which still has some issues to work through.
Since it runs the latest GNOME desktop by default, you won’t have to worry about things like your Nvidia graphics card not working. Plus, all applications for it are written in GTK+ 3, which work perfectly with Wayland. And because Fedora is constantly updated, you’ll get improvements to your Wayland experience as soon as possible.
All that being said, you might want to stick with Xorg for a little while yet. For the most part, Wayland is designed to make development easier — benefits for end users come afterwards, when that development pays off. And at this point in time, there’s a way to go before that.
Have you tried Wayland? Can you see how it will prove to be an improvement? Tell us what you think about this important development in the Linux world.
Image Credits: TravelMediaProductions/Shutterstock