In this article, we’ll guide you through the process of enabling Wayland on Ubuntu 21.04. Wayland is a protocol that specifies the communication between a display server and its clients. It’s an innovative approach to building a more efficient and adaptable display server for modern systems. However, enabling Wayland can sometimes be tricky, especially if you’re dealing with incompatible hardware or environments.
To enable Wayland on Ubuntu 21.04, you can force it to be used by uncommenting a line in the GDM configuration file. However, it’s important to ensure that your hardware is compatible with Wayland before enabling it. If you have an NVIDIA GPU, you may need to try alternative solutions such as activating the on-board Intel GPU or installing the open-source alternative driver called
Checking Hardware Compatibility
Before proceeding, it’s essential to verify if your hardware is compatible with Wayland. Wayland may not be available if your hardware or environment is known to be incompatible. You can refer to the known-to-be-incompatible-with-Wayland list to see if your hardware is included. If it is, you won’t be offered the choice to use Wayland.
Verifying Login Screen Options
When you reach the login screen, you should see the option to choose between different sessions. If you only see “Unity” or “Ubuntu” as the available choices, it could be because of an outdated installation that has been upgraded over time. In this case, Wayland may not be enabled by default.
Forcing Wayland Usage
If you want to force Ubuntu 21.04 to use Wayland, follow these steps:
- Open a terminal. You can do this by pressing
Ctrl + Alt + Ton your keyboard.
- Run the command
sudo nano /etc/gdm3/custom.conf. This command opens the GDM configuration file in the nano text editor with root permissions.
sudois a command that allows you to run programs with the security privileges of another user (by default, the superuser).
nanois a command-line text editor, and
/etc/gdm3/custom.confis the path to the GDM configuration file.
- Look for the line that starts with
#WaylandEnable=falseand remove the
#at the beginning to uncomment the line. In this context, the
#symbol is used to denote comments in the configuration file, and removing it activates the line.
- Save the file and exit the text editor. In nano, you can do this by pressing
Ctrl + X, then
Yto confirm that you want to save the changes, and finally
Enterto confirm the file name.
- Restart your system. After rebooting, you should see the option to choose the Wayland session at the login screen.
Alternative Solution for NVIDIA GPUs
If you have an NVIDIA GPU and the option to use Wayland is not available, it could be because NVIDIA GPUs using the proprietary driver require support for EGLStreams, which is not universally supported by all Wayland compositors. In this case, you can try the following workaround:
- Activate the on-board Intel GPU if available: You can use the
prime-selectcommand to switch to the Intel GPU. Open a terminal and run
sudo prime-select intel. Then, reboot your system and check if the Wayland option appears at the login screen.
- Install the open-source alternative driver: If you don’t have an on-board Intel GPU or the previous step didn’t work, you can try installing the open-source alternative driver called
nouveau. This driver may provide better Wayland support for NVIDIA GPUs. You can install it by running
sudo apt install xserver-xorg-video-nouveau. After installation, reboot your system and check if the Wayland option is available.
Note: It’s important to understand that forcing incompatible hardware or environments to use Wayland can lead to issues and instability. It’s recommended to only enable Wayland if your hardware is compatible and you are willing to help test and debug the Wayland environment.
In conclusion, enabling Wayland on Ubuntu 21.04 can be a straightforward process if your hardware is compatible. However, if you’re facing issues, the steps outlined in this article should help you troubleshoot and enable Wayland successfully.
To check hardware compatibility, you can refer to the known-to-be-incompatible-with-Wayland list. If your hardware is listed, Wayland may not be available for use on your system.
If you don’t see the Wayland option, it could be due to an outdated installation. In such cases, Wayland may not be enabled by default. You can force Ubuntu 21.04 to use Wayland by editing the GDM configuration file as mentioned in the article.
To edit the GDM configuration file, open a terminal using
Ctrl + Alt + T and run the command
sudo nano /etc/gdm3/custom.conf. Look for the line that starts with
#WaylandEnable=false and remove the
# symbol at the beginning to uncomment the line. Save the file and reboot your system.
NVIDIA GPUs using the proprietary driver may not have universal support for Wayland. In such cases, you can try activating the on-board Intel GPU (if available) using the
prime-select command, or install the open-source alternative driver called
nouveau to improve Wayland support for NVIDIA GPUs.
It is not recommended to force incompatible hardware or environments to use Wayland. Doing so can lead to issues and instability. It is advisable to only enable Wayland if your hardware is compatible and you are willing to help test and debug the Wayland environment.