Looking to switch from Wayland to Xorg on Ubuntu 22.04? I’ve got you covered.
If you’re encountering issues with Wayland or you just prefer the traditional X11 protocol, switching between them is straightforward. In this step-by-step guide, I’ll walk you through the simple process of making the switch.
Let’s dive in.
What You’ll Need
Before we start the tutorial, ensure you have the following prerequisites:
- Ubuntu 22.04 installed and operational on your system (see guide)
- Basic knowledge of the command line interface and Linux commands (see guide)
- Root access or sudo privileges (see guide)
- A text editor installed on your system
With these essentials in place, let’s dive into the first method.
How to Use X Instead of Wayland on Ubuntu 22.04: 2 Methods
Step 1: Check the Current Display Server
It’s important to identify which display server your system is currently using before making any changes. This knowledge makes it easier to switch to the other one.
Method 1: Using the Terminal
- Open the terminal either from the application grid or quickly by pressing Ctrl+Alt+T.
- In the terminal, run this command:
This command will display your current display server. If the output is wayland, then Wayland is the active display server.
Method 2: Using the Settings Menu
For those who prefer the graphical user interface (GUI) to check the display server, here’s how you can do it:
- Click on the Show Applications button, located in the left sidebar of your screen.
- In the search bar, type ‘Settings’ and click on the Settings icon when it appears.
- Navigate to the About section within the Settings menu.
- Look for Windowing System from the options. In my example, it indicates Wayland.
Now that you know which windowing system you’re using, let’s learn how to change it from Wayland to X11.
Step 2: Switch to X From Wayland
Method 1: Switch to Xorg by Disabling Wayland
This method involves disabling Wayland in a configuration file to use Xorg instead.
- Open your terminal.
- Edit the /etc/gdm3/custom.conf file using a text editor. For example, to open it with Nano, use:
sudo nano /etc/gdm3/custom.conf
- In the opened file, find WaylandEnable=true and change it to WaylandEnable=false. If you find #WaylandEnable=false, simply remove the # to uncomment it.
- Save the file with Ctrl+O, then exit with Ctrl+X.
- Reboot your system using:
sudo shutdown -r now
- Verify the current display server with:
The output should now show x11.
Method 2: Switch to Xorg via the Login Screen
This method doesn’t involve the terminal. However, you’ll need to reboot or at least log out from the current session to follow it.
- Click the menu in the top-right corner of your screen.
- Go to the Power Off / Log Out option.
- Click on Log Out.
- You should see a new window appear notifying you that you’ll be logged out in 60 seconds. If you don’t want to wait, press the Log Out button to immediately log out of the session.
- This should bring you to the login page. First, click on your profile name.
- Notice a cog icon appearing on the bottom-right corner of the screen. Click on that icon.
- From the drop-up menu, select Ubuntu on Xorg.
- Log back in by entering your password.
- To verify the switch, check the current display server by accessing the Windowing System in the About section of your settings.
The windowing system is ‘X11’ which means my switching was successful.
Related: How to Edit Config Files on Ubuntu
How to Switch Back to Wayland from X
Reverting to Wayland from X in Ubuntu 22.04 is a straightforward process. Simply follow these steps at the login screen:
- Access the menu in the top-right corner of your screen.
- Select Power Off / Log Out and then Log Out.
- At the login screen, click on your profile name.
- Click the cog icon located in the bottom-right corner.
- Select Ubuntu from the options to revert back to Wayland, as it is the default display server.
- To confirm the change, check the ‘Windowing System’ in the ‘About’ section of your settings, or run the following command in the terminal:
And that’s how you can switch between Xorg and Wayland in Ubuntu 22.04.
Which One Should You Choose: Wayland or Xorg?
When deciding between Wayland and Xorg for your Linux system, it’s helpful to weigh their respective advantages and disadvantages. Wayland is the newer, more modern option, while Xorg has been the standard for many years.
Below is a table that outlines the key pros and cons of each, providing a clear comparison to guide your choice:
|✅ Modern with direct app-compositor communication.
✅ Simpler codebase.
✅ Enhanced security for GUI applications.
|✅ Wide compatibility with various software.
✅ Large user base due to longer history.
|❌ Less compatible with some software, particularly games and graphics-heavy applications.
❌ More prone to bugs due to its newness.
|❌ More complex codebase.
❌ Lacks GUI-level isolation, leading to security concerns.
|Ideal for users prioritizing modern features and security.
|Best suited for users requiring stable compatibility and a vast user base.
This comparison should help you determine which display server aligns best with your specific requirements and preferences.
Well done. You should now be able to use the X display server instead of Wayland on Ubuntu and even come back to Wayland if you feel like it. I’ve also done a quick comparison to show you which one is better for you. That should help you pick one of the two more easily.
If this guide helped you, please share it.