Raspberry Pi updated its operating system. The biggest and probably least noticeable change is the transition from the X Window system to labwc, a compositor based on a set of libraries which provide the same functionalities as Wayland. However, that’s not the only change.
Linux desktops, like their Unix predecessors, have for many years used the X Window system. This is the underlying technology which displays the desktop, handles windows, moves the mouse, and many other things users don’t really think about because it usually just works. X is used since the early 1980s. But after 40 years, cracks are beginning to show in the design of X.
As a result, many Linux distributions are moving to a new windowing technology called Wayland. Wayland has many advantages over X, particularly performance. Under X, two separate applications help draw a window:
Wayland combines these two functions into a single application called the compositor. Applications running on a Wayland system only need to talk to one thing, instead of two, to display a window. This is a more efficient way to draw application windows.
Wayland also provides a security advantage. Under X, all applications communicated back and forth with the display server; consequently, any application could observe any other application. Wayland isolates applications at the compositor level, so applications cannot observe each other.
Over the last few years, Raspberry Pi has taken cautious steps towards Wayland. When they released Bullseye back in 2021, they switched to a new X window manager, mutter, which could also be used as a Wayland compositor. They included the option to switch it to Wayland mode to see how it worked.
With the release of Bookworm in 2023, Raspberry Pi replaced mutter with a new dedicated Wayland compositor called wayfire and made Wayland the default mode of operation for Raspberry Pi 4 and 5, while continuing to run X on lower-powered models. Although they spent a lot of time optimising wayfire for Raspberry Pi hardware, it still didn’t run well enough on older Pis, so they couldn’t switch to it everywhere. They realized that wayfire would become less compatible with their hardware. So they started looking for alternatives.
Raspberry Pi found a compositor called labwc and discovered that they could use it in Raspberry Pi OS after a few hours of work. labwc turned out to be a much better fit for the Raspberry Pi graphics hardware than wayfire. labwc is built on top of a system called wlroots, a set of libraries which provide the basic functionality of a Wayland system. wlroots has been developed closely alongside the Wayland protocol.
For most of this year, Raspberry Pi has been working on porting labwc to the Raspberry Pi Desktop. This has very much been a collaborative process with the developers of both labwc and wlroots. After much optimisation for the hardware, Raspberry Pi has reached the point where labwc desktops run just as fast as X on older Raspberry Pi models. Now Raspberry Pi Desktop runs Wayland by default across all models.
When users update an existing installation of Bookworm, they will see a prompt asking to switch to labwc the next time they reboot.
Existing Pi 4 or 5 Bookworm installations running wayfire shouldn’t change in any noticeable way, besides the loss of a couple of animations which are not yet implemented in labwc. Because wayfire will no longer be supported with updates on Raspberry Pi OS, it’s best to adopt labwc as soon as possible.
Older Pis that currently use X should also switch to labwc. To ensure backwards compatibility with older applications, labwc includes a library called Xwayland, which provides a virtual X implementation running on top of Wayland. labwc provides this virtual implementation automatically for any application that isn’t compatible with Wayland. With Xwayland, users can continue to use older applications that they rely on while benefiting from the latest security and performance updates.
As with any software update, Raspberry Pi cannot possibly test all possible configurations and applications. If users switch to labwc and experience an issue, they can always switch back to X. To do this, open a terminal window and type:
sudo raspi-config |
---|
This launches the command-line Raspberry Pi Configuration application. Use the arrow keys to select »6 Advanced Options« and hit enter to open the menu. Select »A6 Wayland« and choose »W1 X11 Openbox window manager with X11 backend«. Hit escape to exit the application; when you restart your device, your desktop should restart with X.
While labwc is the biggest change to the OS in this release, it’s not the only one. Raspberry Pi has also improved support for using the Desktop with a touch screen. Specifically, Raspberry Pi Desktop now automatically shows and hides the virtual keyboard and supports right-click and double-click equivalents for touch displays.
This change comes as a result of integrating the Squeekboard virtual keyboard. When the system detects a touch display, the virtual keyboard automatically displays at the bottom of the screen whenever it is possible to enter text. The keyboard also automatically hides when no text entry is possible. This auto show and hide should work with most applications, but it isn’t supported by everything. For applications which do not support it, users can instead use the keyboard icon at the right end of the taskbar to manually toggle the keyboard on and off.
If users don’t want to use the virtual keyboard with a touch screen or want to use it without a touch screen and click on it with the mouse, they can turn it on or off in the Display tab of Raspberry Pi Configuration. The new virtual keyboard only works with labwc; it’s not compatible with wayfire or X.
In addition to the virtual keyboard, Raspberry Pi added long press detection on touch screens to generate the equivalent of a right-click with a mouse. Users can use this to launch context-sensitive menus anywhere in the taskbar and the file manager. Raspberry Pi also added double-tap detection on touch screens to generate a double-click. While this previously worked on X, it didn’t work in wayfire. Double-tap to double-click is now supported in labwc.
Raspberry Pi Connect – a remote access software that allows users to control their Raspberry Pi from any computer anywhere in the world – got a lot of positive feedback. That’s why this release integrates Connect into the Desktop. By default, users will now see the Connect icon in the taskbar at all times. Previously, this indicated that Connect was running. Now, the icon indicates that Connect is installed and ready to use but is not necessarily running. Hovering the mouse over the icon brings up a tooltip displaying the current status.
Users can now enable or disable Connect directly from the menu which pops up when the icon is clicked. Previously, this was an option in Raspberry Pi Configuration, but that option has been removed. Now, all the options to control Connect live in the icon menu. If users don’t plan to use Connect, they can uninstall it from Recommended Software or they can remove the icon from the taskbar by right-clicking the taskbar and choosing »Add / Remove Plugins«.
This release includes some other small changes worth mentioning:
The new release is now available in apt, Raspberry Pi Imager, or as a download from the software page on raspberrypi.com.