Things to know when using Linux with Wayland

The aspects of the Linux desktop are always changing, but some components have existed for decades. Such as the X Window System (more commonly known as X). A faster and more secure alternative is being created. The alternative is Wayland.

The aspects of the Linux desktop are always changing, but some components have existed for decades. Such as the X Window system (more commonly known as X). A faster and more secure alternative is being created. The alternative is Wayland.

Wayland has been around for a long time and some Linux-based operating systems have accepted it as the default display server protocol. Here is the meaning of using Linux with Wayland.

What is wayland? What is the meaning of using Wayland with Linux?

  1. What is wayland?
  2. Avoid GTK + 2 or Qt 4 applications on Wayland
  3. Some applications are not compatible with Wayland
  4. Compositing is a must
  5. Nvidia graphics cards may not work with Wayland
  6. How to use Wayland

What is wayland?

Picture 1 of Things to know when using Linux with Wayland

Wayland is a protocol for programs that knows how they will appear on screen, based on actions (such as moving a window around or clicking a button). Technically, Wayland is not a replacement for X server. Wayland only determines the way in which the display server (the display server - the program whose main task is to coordinate the input and output of clients) to and from the rest of the operating system or hardware) will communicate with the application.

Wayland relies on a third party, called the Wayland compositor, to act as a display server. Some examples include Mutter and KWin (of the GNOME desktop and KDE Plasma respectively). Wayland strives to simplify the display server's communications, making future development easier and faster.

Like many future technologies, Wayland is still in its infancy. X has been around for a long time and is growing steadily. That means Wayland has a lot of work to do (along with the display servers). Now, there are a few things to know to make Wayland testing much smoother.

Avoid GTK + 2 or Qt 4 applications on Wayland

Most of the Linux applications you interact with are written daily in one of the two graphical toolsets: GTK + and Qt. These frameworks act as clients for the display server, requiring everything to be pulled up onto the screen. However, these requirements need to be explored first and that is what the toolkit does.

As a result, only certain types of programs can actually run on the Wayland desktop. For example, GTK + 3 programs or software written in Qt 5 (the set of tools on which the Plasma desktop is based) can run properly.

Suppose, if you try to open, a Qt 4 application, it will still run. Wayland does this by running server X, to listen to applications it cannot understand. However, this may result in slightly higher memory usage and a slightly lower speed. In addition, there are some things that this approach cannot do at the moment.

Some applications are not compatible with Wayland

Picture 2 of Things to know when using Linux with Wayland

Wayland and X are designed in different ways, so some applications that work with X cannot run on Wayland.

Consider screen color transfer apps like Redshift and f.lux. These apps filter blue light from the screen based on the time of day. They work by using X extensions, such as RandR, that give programs an easy way to ask X to change the display.

Although Wayland also provides the means to partially reproduce this ability, it depends on each Wayland compositor when doing that. This means that while the desktop environment might support something like Redshift (such as the GNOME Night Light feature above), that functionality won't necessarily be available elsewhere.

You may encounter similar problems with the screen recording software. As a security feature, Wayland's display server blocks screen recording applications. That means screen recording is basically impossible on Wayland. Developers are working to implement this feature in a different way.

Compositing is a must

Compositing is a technique that helps prevent image distortion and tearing. This is done by keeping the screen copy in memory, usually with the help of a graphics card. This way, even if the application stops responding, the display server will still have something to work with.

Wayland was designed to make this process much more efficient than X by making compositing a must. X considers compositing as an optional feature, through an extension called Xcomposite. But due to the way it is done, it takes a bit longer than Wayland.

But compositing can lead to a number of problems. Compositing leads to slightly lower performance for programs like games. In X, most desktops disable compositing when the application is in full screen mode. But many Wayland composers still need to do this. If you are interested in using graphics-intensive programs on the Wayland desktop, this is important and important to keep in mind.

Nvidia graphics cards may not work with Wayland

More specifically, if you use Nvidia's proprietary graphics driver, Wayland may not work. This is related to the compositing problem above. In order for this process to work, the graphics driver must communicate with the Wayland composers in a certain way.

Intel and AMD graphics cards have no problem, because they use a standard, called GBM (Generic Buffer Management). Nvidia believes its way of communicating with Wayland, called EGL, will be better and stick with it.

This problem can be solved in two ways: Nvidia drivers deploying GBM or Wayland composers deploying EGLStreams. For now, Nvidia doesn't seem interested in pursuing the old solution.

How to use Wayland

At this point, most Linux distributions give you the option to install Wayland, but most still run X by default. You can search Wayland in the distro's archive, log off the desktop and select Wayland when you log back in.

Fedora is one of the earliest releases to catch this trend and has been running Wayland by default for a few years now. Fedora is known for using the latest technologies that the Linux desktop provides, and is also quite useful. But Fedora is not alone.

Some distros provide Wayland by default

  1. Fedora
  2. Debian
  3. openSUSE Tumbleweed
  4. PureOS
  5. Red Hat Enterprise Linux
  6. SUSE Enterprise Linux

Why aren't so many distributions making the switch? Many are waiting for a few more issues to be clarified. A lot of people expect to use Nvidia's proprietary graphics driver, to get the best gaming experience. Some people want to record their screen to create podcasts or stream videos online.

Display servers are not something that most users pay attention to, so distros don't want to introduce such issues in return for benefits, when in reality, they still silently exist in the background. And if you try to fix everything with a remote desktop, this might not work in Wayland either.

Update 28 December 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile