How to switch from X11 to Wayland on live Ubuntu 24.04.1?

I was trying out Ubuntu Desktop live (not installed) and found it was using X11 by default. I wanted to test out Wayland in the live session and all the guides I read suggested I could log out and switch to Wayland by clicking the gear icon in the bottom right corner. I think I recall being able to do this in 22.04.x but it looks like the gear was removed in 24.04.x. Other guides I found require Ubuntu to be installed which is something I’m not able to do quite yet.

How else can I try out Wayland on live Ubuntu 24.04.1?

The gear only shows up if the username is selected

2 Likes

@ogra Logging out of a live session in Ubuntu 24.04.1 and clicking the live user name does not appear to display the gear icon with the choice of switching to Wayland.

What am I missing?

1 Like

Try this (although sometimes it’s a bit inconsistent)
Boot into a live session
Open terminal to check session type
echo "$XDG_SESSION_TYPE"
Log out
Click on Not Listed
User name box appears
Place cursor in user name box and hit enter (do not enter user name)
Gear wheel appears in bottom right
Select session
Type ubuntu in user name box and hit enter
Open terminal to check session type
echo "$XDG_SESSION_TYPE"

Found by trial and error with a success rate of 75%
i.e. the session type does not register successfully every time

I used Ubuntu (Gnome) 24.10

Edit: I tried 5 times with Ubuntu 24.04.1 live session, every one failed

Yes, that is the issue. I even tried adding a new user from within the live session and then selecting to Switch User. Also did not help, or I was doing it wrong.

1 Like

This should do it for a live session using Ubuntu 24.04.1

Boot into a live 24.04.1 session
Open a terminal
Check your session type with echo "$XDG_SESSION_TYPE"
Leave the terminal open and enter:-
sudo nano /etc/gdm3/custom.conf
Find this line WaylandEnable=false
Change false to true
Save file and exit
sudo systemctl restart gdm3
Live session will restart in a wayland session

I wish that I could claim original thought with this but, I have to admit that the internet provided the answer

https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-22-04-desktop

2 Likes

I’m not used to command-line interface text editors like nano so I think I used
sudo gnome-text-editor /etc/gdm3/custom.conf
without any issues. Thanks!

Confirming this method does indeed work.

However, logging out does not bring up the gear icon.

In other words, a user would need to follow these steps each and every time they want either X11 or Wayland.

Still…nice to know there is a simple workaround and thanks for sharing :slight_smile:

1 Like

The live session of Ubuntu 25.04 Plucky starts in Wayland.

I am following this discussion since I need X11 to automate UI sessions using UI emulator.
Questions about UI automation on KWin Wayland - Help - KDE Discuss
My question is how can this UI automation be achieved in Wayland when I decide to migrate from 22.04 to 24.04?