We're hiring!
*

Weston 14.0: DRM-backend, color management, and output mirroring

Marius Vlad avatar

Marius Vlad
November 27, 2024

Share this post:

Reading time:

Recently, both Weston 14.0, and 14.0.1 (bug fix) were released. Here's at look at some of the highlights and changes for this latest release of Wayland's reference compositor.

Highlights

A noticeable update in this release is the ability of the DRM-backend to make use of hardware underlay planes. In libweston, the primary plane is the most bottom hardware plane, and it is also being also used as the renderer, when compositing all other surfaces/views. Any other hardware plane below this primary plane used to be discarded by libweston, and with this update we can make use of the hardware underlay planes by punching a hole in the primary plane to display the underlying surfaces/views.

In this new release we landed an implementation for the color-management protocol -- protocol which is still, at the time of writing, an ongoing work in progress. The implementation has been updated to xx_color_manager_v4 to include the latest changes in the protocol. We're currently working to support parametric image descriptions, and for the time being, only ICC (International Color Consortium) profile-based image descriptions should work.

Another useful change in this release is the ability to mirror out DRM (Direct Rendering Manager) native outputs to other remote outputs, like those created by the RDP (Remote Desktop Protocol), VNC (Virtual Network Connection), and PipeWire backends.

Previously, in Weston 13.0, we added support for loading multiple backends, but the front-end side lacked any configuration code to allow making use of that. With this release we've improved that by adding output mirroring capability, which can be used when multiple backends are loaded at the same time. Furthermore, the addition of dma-buf added in the PipeWire backend enables efficient zero-copy paths for display sharing.

To further differentiate between cloning and mirroring, we removed the 'same-as' keyword, which was previously used for cloning, and introduced 'clone-of' for the same functionality, whereas for mirroring we've introduced the 'mirror-of' keyword.

As an example, assuming you would like to make a VNC output a mirror of HDMI-A-2 output, the following ini configuration file can be used:

[output]
name=HDMI-A-2

[output]
name=vnc-0
mirror-of=HDMI-A-2

Similar to that of the autolaunch feature, with this new release Weston can start other programs in parallel to its own shell.

Ending Weston's command option with a '--', followed by the program/client itself, together with additional parameters that program would take, would make Weston execute that program as well. To better exemplify that, starting Weston like:

    weston -Swayland-0 --debug --logger-scopes=log -- /path/to/my/program --option1

would instruct Weston to also start /path/to/my/program program.

Another feature in this release is the fact that kiosk-shell is now capable of placing Xwayland windows on specific outputs. Whereas placing Wayland native clients were added at the same time as kiosk-shell was introduced, handling Xwayland required additional support which is now available for users to use.

Various changes and overall fixes

Many more smaller changes and overall fixes have made it in this release across the board, from shells to libweston itself.

Particularly, the GL-renderer saw performance improvements in its clipping polygon algorithm, desktop-shell/kiosk/fullscreen, and ivi-shell all have seen various bug fixes.

The DRM-backend has seen some fixes around its multi-GPU support, while outputs can now handle repaints independently from other outputs that have been created by different backends.

With this release we have brought back atomic asynchronous page flip, as kernel support is now available in the kernel mainline. Users can verify support for this by using the simple-egl client using the `-t` argument.

Some honorable mentions include users' ability to now configure the swap interval in simple-egl (eglSwapInterval, if the GL-driver supports that of course), and can make use of EGL_EXT_surface_compression or EGL_EXT_present_opaque extensions if these are found to be present.

The linux-dmabuf protocol was updated to version 5, and with that we bumped wayland-protocols requirement to 1.33. With this update, an invalid format protocol error would be emitted if the format modifier doesn't match on all the planes.

What we've removed, started deprecating, and plan on removing

With the introduction of multiple back-ends, and with it, the mirroring functionality, the remoting and PipeWire plugins are basically on their way out with a Gitlab issue already opened to deprecate these in Weston 15. The PipeWire back-end supersedes the PipeWire plugin, whereas the remoting plug-in has been superseded by any other remoting backends available: VNC, RDP, or the PipeWire back-end itself.

The mirroring functionality and the performance improvements in the backends aim to be a total and complete replacement for the plugins, so we encourage users to migrate their setups.

Furthermore, with Weston 14, the cms-static and the cms-colord plug-in have been removed entirely, as these plug-ins have been deprecated quite some time ago as their functionality was being rebuilt through our common color-management code.

Another module we will deprecate and start removing in the following release will be the screen-share module. It will be replaced by the recently introduced mirroring capability, a far better alternative that allows performance improvements that weren't possible with the screen-share module. With it, the fullscreen-shell is also being phased out in Weston 15, being solely used with the screen-share module.

For those interested, this is being tracked in this Gitlab merge request.

Finally, we are planning on Weston 14 to be the last version supporting xdg-shell-v6 with Weston 15 removing it entirely. The stable xdg-shell is in use by all other clients and as such we expect the removal to have virtually no impact whatsoever.

Breaking changes for users

With the introduction of the 'mirror-of' keyword, we also added the 'clone-of' keyword, which was previously named 'same-as'. This means users would need to rename 'same-as' to 'clone-of' with Weston 14.

With this release the VNC backend requires neatvnc having version 0.8.0.

API changes

We've added some helpers for weston_view and weston_surface management providing easy single-function helpers for common window-management operations.

Rather than setting the is_mapped field of a weston_view, or a weston_surface structure, followed by marking the geometry dirty, you can do that accordingly with weston_surface_map() for a weston_surface, or with weston_view_move_to_layer(). for a weston_view. Moreover, a common idiom for mapping an unmapped view/surface is to check first if the surface is already mapped, use the helper to mark it as such if not, followed by adding the view to a layer using weston_view_move_to_layer(), like so:

    if (!weston_surface_is_mapped(surface)) {
        weston_surface_map(surface);
        weston_view_move_to_layer(surface->view, &layer.view_list);
    }

Another change, but this time, internally, is that we've renamed compositor/ to frontend/ to better reflect the fact Weston is a front-end for the libweston library.

Users calling weston_fade_run function need to remove the 'k' parameter argument as that did not have any have usage whatsoever internally and that was removed in this release.

Weston 14.0.1

The bug fix release for Weston 14 contains mostly compiler (C++) fixes but also a crash fix for the headless back-end. As a result of this, we now have an open MR verifying that libweston is always safe to compile for C++ frontends. Users and distributions are encouraged to pick up the bug fix release to avoid carrying additional patches for these issues.

Credit where credit is due

Thanks to all the contributors who made this happen. As well as the contributions from various Collabora colleagues, we would like to extend our gratitude to the wider community, including the folks at Pengutronix, NXP, and Rockchip who have been contributing and improving Weston across the board.

 

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


 

Search the newsroom

Latest News & Events

Initial upstream support for the Rockchip RK3576

03/12/2024

Initial support for Rockchip's RK3576 has landed in Linux kernel 6.12, a new System-on-a-Chip (SoC) introduced earlier this year. With the…

NVK now supports Vulkan 1.4

02/12/2024

Today, Khronos announced the release of the Vulkan 1.4 specification, and NVK is one of the day-zero conformant Vulkan 1.4 implementations!…

Weston 14.0: DRM-backend, color management, and output mirroring

27/11/2024

Recently, both Weston 14.0, and 14.0.1 (bug fix) were released. Here's at look at some of the highlights and changes for this latest release…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.