User Tools

Site Tools


doc:appunti:hardware:raspberry_x_wayland

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:hardware:raspberry_x_wayland [2025/04/07 10:36] niccolodoc:appunti:hardware:raspberry_x_wayland [2025/04/07 12:01] (current) niccolo
Line 2: Line 2:
  
 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. 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.
 +
 +The default is **Wayland** + **Labwc** for all the Raspberry Pi models, including the Pi 2.
  
 Start the **raspi-config** and navigate the **Advanced Options** => **Wayland** to make your choice. Start the **raspi-config** and navigate the **Advanced Options** => **Wayland** 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 and Labwc respectively:+If you are using the default **LightDM** desktop manager, the settings are saved into **/etc/lightdm/lightdm.conf**. Here are the entries for Wayland WayfireLabwc and X11 respectively: 
 + 
 +=== Wayland Wayfire ===
  
 <file> <file>
Line 15: Line 19:
 fallback-greeter=pi-greeter fallback-greeter=pi-greeter
 </file> </file>
 +
 +=== Wayland Labwc ===
  
 <file> <file>
Line 24: Line 30:
 #fallback-greeter= #fallback-greeter=
 </file> </file>
 +
 +=== X11 ===
 +
 +<file>
 +greeter-session=pi-greeter
 +user-session=LXDE-pi-x
 +autologin-session=LXDE-pi-x
 +#fallback-test=
 +#fallback-session=
 +#fallback-greeter=
 +</file>
 +
  
 ===== How to tell if X11 or Wayland is running ===== ===== How to tell if X11 or Wayland is running =====
Line 30: Line 48:
  
 <code> <code>
-echo $XDG_SESSION_TYPE +set | grep XDG_SESSION 
-x11+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
 </code> </code>
  
-A more comprensive insight for a Wayland session:+the output for a Wayland Labwc session:
  
 <code> <code>
Line 44: Line 66:
 XDG_SESSION_TYPE=wayland XDG_SESSION_TYPE=wayland
 </code> </code>
 +
 +You can also check the running processes:
 +
 +<code>
 +ps uax | grep labwc
 +pi   786  3.3  7.6 287268 72252 ?   Ss   11:00   0:11 /usr/bin/labwc -m
 +</code>
 +
 +===== Wayland Wayfire not starting on the Raspberry Pi 2 =====
 +
 +On the Raspberry Pi 2 the Wayland Wayfire does not start. 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!
 +
 +As per **Raspbian GNU/Linux 12 (bookworm)**, [[https://www.howtogeek.com/raspberry-pi-os-wayland-rollout/|Raspberry Pi OS Switches to Wayland on All Pi Models]], and [[https://hackaday.com/2024/10/28/raspberry-pi-oss-wayland-transition-completed-with-switch-to-labwc/|Raspberry Pi OS’s Wayland Transition Completed With Switch To Labwc]].
 +
 +Wayfire is more resource-intensive than Labwc, so its use is discouraged and it will no start on the **Raspberry Pi 2**. Infact the **/usr/bin/xfallback.sh** script will return zero if run on the Pi 2.
 +
  
 ===== Starting the Wayland backend manually ===== ===== Starting the Wayland backend manually =====
  
-First of all you have to stop the running graphical environment:+First of all you have to stop the running graphical environment. Stopping the LigthDM desktop manager will close the graphical screen on **VT#7**:
  
 <code> <code>
-systemctl stop lightdm.service+sudo systemctl stop lightdm.service
 </code> </code>
  
-Then you can use use the +Then, as the unprivileged user, you can run the commad 
 + 
 +<code> 
 +wayfire-pi 
 +</code> 
 + 
 +or 
 + 
 +<code> 
 +labwc-pi 
 +</code> 
 + 
 +This can be useful to capture **stdout** and **stderr** messages from the window manager. 
doc/appunti/hardware/raspberry_x_wayland.1744014985.txt.gz · Last modified: 2025/04/07 10:36 by niccolo