How to Switch Between Wayland and Xorg in Ubuntu

Trouble with a screen recorder on Ubuntu? It might relate to your display server. Learn how to switch (Wayland/Xorg).

By Surajit Saha 9 Min Read
Switch Between Wayland and Xorg in Ubuntu

If you’re experiencing a dark preview or encountering non-functional features while recording the screen in Ubuntu, it is likely because you’re using the Wayland display server. To resolve this issue, you need to switch the display server to Xorg. Wayland and Xorg are the two components in Linux systems that serve as display servers, enabling the use of graphical user interfaces in Linux distributions.

Xorg is the legacy display server in Linux, while Wayland is a relatively newer one developed for Linux. As a result, certain applications may not support Wayland. In this article, we’ll guide you through the process of switching between the Wayland display server and Xorg (x11) in Ubuntu.

What is a Display Server in Linux?

In Linux, a Display Server is a windowing system that manages graphical displays and renders user interfaces. The Display Server is responsible for all on-screen visuals and user input via the mouse and keyboard. The known display servers in Linux are Wayland and Xorg (X11). Xorg is a display driver that has been in use for a significant period. At the same time, Wayland is a comparatively recent addition to the Linux operating system.

A Display Server is a software component that centrally manages display hardware, processes input events (which include mouse clicks and keyboard input), and coordinates the rendering of graphical elements on the screen.

The framework facilitates the communication between applications and the graphics hardware, allowing for the presentation of graphical user interfaces (GUI) to the user.

Types of Display Servers in Linux

There are two most-known and stable display servers in the Linux system which are Xorg (X11) and Wayland.

1. Xorg (X11)

The Xorg Server, which is also called X11 or the X Window System. It is a display server that has been widely used in Linux for a long time. The architecture is meant to be network-transparent, which means that apps can run on one machine while their output is shown on another.

The X11 system can work with different kinds of window managers and desktop applications. It also has a large number of applications and tools that have been made to work with it.

2. Wayland

Wayland is a display server that was made to work around the problems with X11. It is an invention that aims at improving both security and performance. The architecture is made to be simpler and more efficient, with a focus on lowering latency and improving performance. Wayland has better support for blending and hardware acceleration, which makes graphics use less power and run more smoothly.

Wayland is becoming more and more popular among Linux systems, which are using it as their main display server or as a replacement for X11. However, some applications currently don’t support the newer Wayland display server.

Why are we still using Xorg?

Well, the reason is that Wayland, despite being relatively new, is not yet as stable as Xorg. Programs that act as clients to communicate with a display server need to be specifically designed to work with Wayland. As a result, many programs may not run properly when using Wayland.

How to Know If You’re Using Wayland or Xorg

Before moving into the main subject of this article we must check which display server is currently in use in our Ubuntu system. There are two methods to check it – using the GUI and the Terminal. You can follow any of the methods outlined below to find out.

1. Using the GUI

You can use the graphical user interface (GUI) to check your current display server. Here are the steps you can follow:

1. Open the Settings on your Ubuntu system.

2. The settings will appear. Here, click on the About option and Check the Windowing System for the display server.

Windowing System in Ubuntu

Note

If you cannot determine whether you’re using Wayland or Xorg (X11) through the GUI, you can use the terminal.

2. Using the Terminal

If you’re familiar with the Linux Terminal, you can use it to determine whether you’re using the Wayland or Xorg display server. To do so, follow the steps outlined below:

1. Open the Terminal from the applications menu or use the shortcut key CTRL + ALT + T to open it.

2. Now, type the below-mentioned command in the terminal:

echo $XDG_SESSION_TYPE
Current Dsiplay Server Wayland

This command will show the current display server of the Ubuntu system on screen. Now, we’ll move on to the main part of the guide and learn the process of switching from Wayland to the Xorg (x11) display server.

How to Switch Between Wayland and Xorg in Ubuntu

The latest version of the Ubuntu operating system, by default, opens with the Wayland display driver. However, you can always switch to Xorg (x11) if needed. There are two different methods to switch between Wayland and Xorg, and we have explained both methods in step-by-step instructions for easy understanding.

1. Switching Display Server from Login Screen

The easiest way to switch the display server from the login screen. Here are the steps you can follow:

1. Firstly Log out from the system. To do that press ALT + CTRL + DEL and click on the Log Out button.

Log Out Option

2. Now, on the log screen, look at the bottom-right corner of the screen and click on the gear icon.

3. Once you click on the gear icon, a menu will open up with two options, Ubuntu and Ubuntu on the Xorg option. Click on the Ubuntu on Xorg option.

Switch Between Wayland to Xorg in Ubuntu

This will switch the display server of your Ubuntu system to the Xorg display server. You can use the same methods to switch to Wayland.

2. Switching Display Server using Terminal

Also, you can use the Linux Terminal to switch between Wayland and Xorg in Ubuntu. Here are the steps, you can follow:

1. On your Ubuntu system, open a Terminal window.

2. Then execute the below-mentioned command and enter your admin password.

sudo nano /etc/gdm3/custom.conf
Display Server Configuration File

3. The above command will open a configuration file containing the configuration of the display servers. Find out the line having WaylanEnable=false and then uncomment the line mentioned by removing the hash (#) at the beginning of the line.

Switching to Xorg X11 Uncommenting the Line

4. Now, save the file by pressing Ctrl + X on the keyboard and then press y and hit enter to save the file.

5. Then we just need to restart the gdm3 service to confirm the changes that we made. For that, just type the below-mentioned command in the terminal, enter the admin password and press Enter.

sudo systemctl restart gdm3

This above command will restart your system. That’s it! Once the system restarts, you’ll have Xorg as your display server. You can run the command now that we have discussed in the first point of this article to verify and check the current display server of your Ubuntu system.

Conclusion

That’s it! This is how you can switch between Wayland and Xorg in Ubuntu. It has been noticed and a lot of Ubuntu users have also raised this point that a lot of applications developed for Ubuntu do not work on the Wayland display server. Hence this switch is quite useful for Ubuntu users.

Hope this guide helps you to learn the switching process of the display server. If you have any questions regarding the display server, you can let us know your feedback in the comment section below. And share this guide with your friends.

TAGGED:
Share This Article
Follow:
He is a technical nerd by trade, having started out with computer software and hardware and then moving on to networking and telecommunications. He also enjoys smart devices and smartphones, and shares a tremendous love for cricket and music.
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *