User Tools

Site Tools


doc:appunti:hardware:raspberry_x_wayland

This is an old revision of the document!


Raspberry Pi: X11 or Wayland

With the operating system Raspbian GNU/Linux 12 (bookworm) it is possibile to choose between the traditional X11 graphical backend and the new Wayland. With X11 you can use only the Openbox window manager, while in Wayland you can choose Wayfire or the Labwc window manager.

Start the raspi-config and navigate the Advanced OptionsWayland to make your choice.

If you are using the default LightDM desktop manager, the settings are saved into /etc/lightdm/lightdm.conf. Here are the entries for Wayland Wayfire, Labwc and X11 respectively:

Wayland Wayfire

greeter-session=pi-greeter-wayfire
user-session=LXDE-pi-wayfire
autologin-session=LXDE-pi-wayfire
fallback-test=/usr/bin/xfallback.sh
fallback-session=LXDE-pi-x
fallback-greeter=pi-greeter

Wayland Labwc

greeter-session=pi-greeter-labwc
user-session=LXDE-pi-labwc
autologin-session=LXDE-pi-labwc
#fallback-test=
#fallback-session=
#fallback-greeter=

X11

greeter-session=pi-greeter
user-session=LXDE-pi-x
autologin-session=LXDE-pi-x
#fallback-test=
#fallback-session=
#fallback-greeter=

How to tell if X11 or Wayland is running

From a terminal running in the graphical environment:

set | grep XDG_SESSION
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=LXDE-pi-x
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11

the output for a Wayland Labwc session:

set | grep XDG_SESSION
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=LXDE-pi-labwc
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=wayland

You can also check the running processes:

ps uax | grep labwc
pi   786  3.3  7.6 287268 72252 ?   Ss   11:00   0:11 /usr/bin/labwc -m

Wayland Wayfire not starting

On my Raspberry Pi there is a problem which prevents Wayland Wayfire from starting. Fortunately enough the raspi-config added into the /etc/lightdm/lightdm.conf configuration file the fallback-session option, which launches the legacy X11.

I discovered it because I installed the hide-cursor Wayfire plugin, but the plugin did not work. Actually the entire Wayfire was not running!

FIXME How to get the Wayfire running.

Starting the Wayland backend manually

First of all you have to stop the running graphical environment. Stopping the LigthDM desktop manager will close the graphical screen on VT#7:

sudo systemctl stop lightdm.service

Then, as the unprivileged user, you can run the commad

wayfire-pi

or

labwc-pi

This can be useful to capture stdout and stderr messages from the window manager.

doc/appunti/hardware/raspberry_x_wayland.1744017395.txt.gz · Last modified: 2025/04/07 11:16 by niccolo