What's the deal with X11 and Wayland? - TUXEDO Computers

  ATTENTION: To use our store you have to activate JavaScript and deactivate script blockers!  
Thank you for your understanding!

What's the deal with X11 and Wayland?

In recent years, the term Wayland has appeared frequently in reports about Linux. We explain what this is all about.

What is what?

X Window System or X11

To explain the facts in an understandable way, we must first discuss the X Window System also known as X11. This is a protocol implemented via the display server software X.Org. Without the X Window System, which was released in 1984 to ensure that images are drawn on the screens of unixoid operating systems, we would be limited to the terminal.Wayland

Since the code of X11 has long been a barely maintainable patchwork, a new project was started in 2008 to replace X11 one day: the Display Server Protocol Wayland. It is supposed to bring more security by abandoning the client-server model and executing far less code as root, and also make image glitches like tearing, image flickering and artefacts a thing of the past.

Implementation

While the development of the Wayland protocol is complete, the implementation in the desktop environments under Linux is in different stages. The integration is most advanced with GNOME, followed by KDE Plasma. Xfce and LXQt are just taking their first steps in this direction. Already since 2015, the rather unknown window manager Enlightenment supports the Wayland protocol. However, there is no rush because X11 will still be with us for a while, even if it will increasingly fade into the background. In the transition phase, in which not all applications support Wayland yet, XWayland serves as a compatibility layer.

Differences between X11 and Wayland

Under X11, the desktop environment’s window manager is responsible for placing windows and drawing window decorations such as title bars and frames. Under Wayland, the functions of the display server and the window manager are combined in the respective Wayland Compositor. The safety-critical communication between the two is void thus. As before, each client can draw its own window decorations or have them drawn by the compositor.

Wayland does not implement all functions of the X server for security reasons. For example, Wayland does not support the network transparency familiar from X11, which enables functions such as screen recording and screencasting. Functions like that must be implemented in Wayland by protocol extensions, which drags out the implementation of the protocol in time. Currently, Wayland is already so well integrated in both GNOME and KDE Plasma that most users can use it in daily use. However, this is only true as long as no dedicated graphics cards from Nvidia are involved.

Wayland on distributions supported by TUXEDO

With Ubuntu 17.10 “Artful Aardvark” and the simultaneous return of Unity to GNOME, Wayland was also used as standard. However, the intermezzo only lasted for a short time because with Ubuntu 18.04 LTS “Bionic Beaver” a conventional X server was reinstated. With Ubuntu 21.04 “Hirsute Hippo” a second attempt was made, which also lasted for the versions 22.04 and 22.10. Ubuntu 22.04 and 22.10 thus start into a Wayland-managed session as standard, unless a graphics card from Nvidia is installed.

The conventional X server is still used in TUXEDO OS. The reason for this is also to be found in the hybrid graphics often found in TUXEDO notebooks, consisting of the iGPU within the CPU and an additional dGPU from Nvidia. The plasma desktop can currently still lead to problems like a black screen here under Wayland. Therefore, the package plasma-workspace-wayland must first be post-installed with TUXEDO OS for Wayland.

sudo apt update && sudo apt install plasma-workspace-wayland

Switch between X11 and Wayland?

First, you should check whether you are currently using X11 or Wayland. The command echo $XDG_SESSION_TYPE prints the used session type as response.

With login manager (SDDM, GDM)

If you specified during the installation of your operating system that you want to log in via the login manager, you can change the session type there. For TUXEDO OS or Kubuntu SDDM is used, for Ubuntu it is GDM. You can see the respective selection fields in the following screenshots for TUXEDO OS and Ubuntu.

Without login manager

If, on the other hand, you decided during installation that you want to log in without logging in, you do not have this option. With TUXEDO OS or Kubuntu, you change the session type in the system settings under Startup and Shutdown. There you first click on Behavior at the bottom and then edit the top line according to your wishes and confirm this at the bottom with Apply.

Ubuntu does not have a graphical setting for this purpose. Here you edit a configuration file for this purpose. Use the following command to open the file in question.

sudo nano /etc/gdm3/custom.conf

Quite at the head of the file is the line #WaylandEnable=false. First, remove the comment character # to arm the line. If you want to start an X11 session in the future, save the file with Ctrl+O and Ctrl+X and either log out and log in again or restart the computer. If you later prefer a Wayland session again, change false to true.