Switch Between Wayland and Xorg on Raspberry Pi OS

The default Wayland server causing trouble? You can switch back to the good old Xorg. Here's how.
Warp Terminal

On the latest Raspberry Pi OS which is based on Debian Bookworm, Wayland is the default display server.

This causes a problem if you want to use a screen recorder like SimpleScreenRecorder.

One workaround is to switch from Wayland to Xorg. That's what I did when I had to screen-record. And then later, I switched back to Wayland from Xorg.

Let me show you how to do it on Raspberry Pi OS.

πŸ“‹
This should be applicable to other operating systems as well with the help of the raspi-config tool.

Switch between Wayland and Xorg on Raspberry Pi OS

Open a terminal and run the following command:

sudo raspi-config

This will open a terminal user interface (TUI) with several options to configure your Raspberry Pi.

Use the arrow keys to move down to the Advance Options. When the line is highlighted, press Enter.

Advanced options in raspi-config

This will present you with different advanced options. Look for 6th line A6 which should display the currently used display server and give you the option to change.

When this line is highlighted, press enter key.

Switch between Wayland and Xorg on Raspberry Pi

On the next screen, you'll see the option to choose among X11, Wayland and Labwc. Choose the one desired here. And then press Tab to go to OK. I think Enter key also works.

Switch between Wayland and Xorg on Raspberry Pi

When you have made your choice, the next screen reflects that. However, it is not really active yet.

Switch between Wayland and Xorg on Raspberry Pi

You'll be back to the initial screen of Advanced options. Here, press tab key to go to Finish and the press Enter.

Finish switching between Wayland and Xorg on Raspberry Pi

Now, you'll be asked to reboot if you want the changes to take place. The system is still using the previous display server. It will use the newly selected one after the reboot.

System needs to be rebooted after switching the display servers

Check if you are using Wayland or Xorg with the following command:

echo $XDG_SESSION_TYPE

I hope you find this quick little Raspberry Pi tip useful. Stay subscribed for more.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries πŸ•΅οΈβ€β™‚οΈ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.