How to Use X instead of Wayland on Ubuntu 22.04?

Ubuntu provides its users with two display servers: “Wayland”, the default display server and “Xorg” (also known as X11 or just “X”). Both display servers crucially stand at the connection point between your physical, computational resources and the graphical user interface (GUI) you interact with.


While Wayland is a modern, efficient display server architecture, it isn’t compatible with all applications. Some users may experience certain applications performing poorly, or not working at all, under Wayland. If you fall in this category, you would want to switch to the X11 display server instead.

In this tutorial you will learn:

  • How to switch from Wayland to X on Ubuntu 22.04
How to Use X instead of Wayland on Ubuntu 22.04?
How to Use X instead of Wayland on Ubuntu 22.04?
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Switching from Wayland to X on Ubuntu 22.04

With the advent of latest versions like Ubuntu 22.04, the option to choose the display server at the login screen is no longer present, thus some users may find difficulty in switching between Wayland and X. However, this change can still be made via Terminal interface.

Below is a step-by-step guide on how to switch from Wayland to X in Ubuntu 22.04:

  1. Open Terminal: Navigate to the application dashboard and search Terminal or use the universal shortcut CTRL+ALT+T to open the terminal window.
  2. Use Nano Text Editor to access GNOME Display Manager (GDM) Configurations: Type the command:
    sudo nano /etc/gdm3/custom.conf

    in the Terminal. The nano text editor will open with the custom.conf file.

  3. Disable Wayland Enable flag: Locate the line that reads WaylandEnable=true and change it to WaylandEnable=false.
  4. Save and Close the Configuration File: Press CTRL+O to save changes and CTRL+X to exit out of the nano text editor.
  5. Reboot the System: Finally, reboot the system to implement the changes. The command for rebooting system is:
    sudo reboot

After following these steps, your Ubuntu 22.04 system should log in using the X11 display server instead of Wayland.

Important Caution
In some rare instances, if your X server is broken or not configured correctly, following these steps can lead to your system not booting. If your system fails to boot, you will need to reverse the changes made to the custom.conf file. You can accomplish this by selecting the recovery boot option from the GRUB menu, logging in as root, and commenting out or deleting the WaylandEnable=false line from the custom.conf file.

Conclusion

While Wayland is the future of display servers on Linux, there are currently still some use cases where switching to X is necessary. The given step-by-step guide will help you switch from Wayland to X in Ubuntu 22.04. Remember to always carefully follow each step, and only make these changes if necessary and you understand the potential risks.