How to Stop Ubuntu from Automatically Using Wayland

The Compatibility Compromise

Starting with Ubuntu 21.04, the default display server changed from Xorg (X11) to Wayland. When you log in at the GDM login screen, Ubuntu automatically selects the Wayland session unless it detects an incompatible GPU driver (such as proprietary NVIDIA). While Wayland offers improved security and smoother performance on compatible hardware, it introduces significant compatibility issues for many workflows. Screen-sharing in some video conferencing tools breaks, remote desktop applications like VNC or RDP may not function correctly, certain Electron-based apps have rendering glitches, and tools that rely on X11’s ability to capture or inject input events (like some accessibility tools or automation scripts) simply do not work.

Forcing Ubuntu to Use Xorg Instead of Wayland

To stop Ubuntu from automatically defaulting to the Wayland display server and force it to use the more compatible Xorg session, you must modify the GDM configuration.

Open a terminal (Ctrl + Alt + T). Edit the GDM custom configuration file: sudo nano /etc/gdm3/custom.conf. Find the line that reads #WaylandEnable=true (it may be commented out). Change it to WaylandEnable=false, ensuring the leading # is removed. Press Ctrl + O to save the file, then Ctrl + X to exit. Restart the display manager for the change to take effect: sudo systemctl restart gdm3 (note: this will log you out). When the login screen reappears, Ubuntu will automatically use the Xorg session. You can verify this after logging in by opening a terminal and running echo $XDG_SESSION_TYPE — it should output x11. If you ever want to switch back to Wayland, simply change the value back to WaylandEnable=true and restart GDM.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.