How to enable/disable wayland on Ubuntu 22.04 Desktop

Wayland is a communication protocol that specifies the communication between a display server and its clients, and we can choose whether to enable/disable Wayland on Ubuntu. By default the Ubuntu 22.04 Jammy Jellyfish desktop already uses Wayland but it’s also possible to load to Xorg display server instead. In this tutorial, you will see how to disable and enable Wayland in Ubuntu 22.04 Jammy Jellyfish.

Reasons for using Xorg instead of Wayland are if you are encountering graphical errors or performance issues while using Wayland. Wayland does not always play nicely with every kind of software. Xorg is the safe fall back choice whenever you are having problems with Wayland. Since both are included on Ubuntu and installed by default, it is relatively easy to switch back and forth between them.

In this tutorial you will learn:

  • How to enable Wayland
  • How to disable Wayland
How to enable/disable wayland on Ubuntu 22.04 Desktop
How to enable/disable wayland on Ubuntu 22.04 Desktop
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software GNOME desktop environment, Wayland
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

How to enable/disable wayland on Ubuntu 22.04 step by step instructions

DID YOU KNOW?
Users may want to enable or disable Wayland due to application compatibility. Some applications still lack support for Wayland, so Ubuntu gives users the option to enable X display server to resolve these types of issues.


  1. The default display manager for the GNOME desktop environment is GDM3. Therefore, we will edit the /etc/gdm3/custom.conf file to either disable or enable Wayland. Open a command line terminal and use nano or your favorite text editor to open this file with root permissions.
    $ sudo nano /etc/gdm3/custom.conf
    
  2. Within this file, look for the line that says #WaylandEnable=false. You can uncomment this line and either set it to true or false, depending on whether you want Wayland enabled or not.Enable Wayland:
    WaylandEnable=true
    

    Or disable Wayland:

    WaylandEnable=false
    

    Editing the Wayland settings inside the GDM3 configuration file
    Editing the Wayland settings inside the GDM3 configuration file
  3. After you have made the desired changes, save this file and exit it. You will need to restart GDM3 or reboot your Ubuntu 22.04 desktop for the changes to take effect.
    $ sudo systemctl restart gdm3
    
  4. To login to Ubuntu 22.04 using the Wayland click on the gear button and select Ubuntu option before you login. If you have disabled the Wayland display server, you will only see the Xorg option appear, or the gear button doesn’t show up at all.

    Login to Ubuntu 22.04 using Wayland display server
    Login to Ubuntu 22.04 using Wayland display server


Closing Thoughts

In this tutorial, we saw how to enable or disable the Wayland communication protocol in Ubuntu 22.04 Jammy Jellyfish Linux. Having more than one option is a good thing for Linux users, as they all have their pros and cons and one may work better with a certain configuration than another.