Skip to content
Home » Chromium Merges Code for Native VA-API Acceleration with Wayland

Chromium Merges Code for Native VA-API Acceleration with Wayland

The latest Chromium browser code has integrated Video Acceleration API (VA-API) support for the Linux Ozone/Wayland platform.

A long-standing hurdle in Google Chrome/Chromium’s Wayland support has finally been cleared: native Video Acceleration API (VA-API) is now a reality. This means smoother playback, reduced decoding times, and potentially better battery life for video-hungry tasks on your favourite Linux desktop. VA-API is an open-source library and API specification, that provides access to graphics hardware acceleration capabilities for video and image processing. VA-API is used on ChromeOS on both Intel and AMD platforms.

VA-API in Chromium with Wayland

Previously, Chrome’s Wayland implementation relied on the libva-x11 library for VA-API, limiting its functionality. With code merged on Friday, libva-drm is now utilised, enabling seamless VA-API acceleration on both X11 and Wayland. This switch unifies the codebase for both platforms, streamlining development and ensuring consistent performance across environments.

Under the hood, VaapiWrapper, the internal component handling VA-API, has ditched libva-x11 and its legacy counterpart, paving the way for a libva-drm-only approach. This translates to a shared code path for Linux Ozone (Chrome’s internal platform abstraction layer) on both X11 and Wayland, simplifying maintenance and potentially boosting performance.

This change eliminates the remaining libva-x11 traces from Ozone and VaapiWrapper, making VA-API the default option for Linux Ozone/Wayland. In simpler terms, your Wayland-powered Chrome will automatically leverage hardware acceleration for video decoding, delivering a noticeably smoother experience.

VA-API acceleration in Wayland
VA-API acceleration in Wayland

The timing of this merge couldn’t be more interesting, coinciding with Red Hat’s gradual shift towards Wayland. The RHEL 9 (released in 2022) was supposed to drop X11. However, as per recent announcements and directions, the future releases potentially drop it altogether. Hence, Chrome’s native Wayland VA-API support comes as a timely boon for Linux users embracing the Wayland future.

As per the MR, here’s how to test VA-API acceleration on your Linux system:

On X11:

chromium-browser --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=x11

On Wayland:

chromium-browser --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=wayland

This exciting feature is expected to land in Chrome 122, slated for release in February 2024. Chrome 121 won’t have this since it has already passed feature freeze and beta releases.

Closing notes

While this is a significant step forward for Chrome’s Wayland support, it’s important to remember that VA-API acceleration on Wayland is still considered a “best-effort” solution. Some users might encounter compatibility issues depending on their hardware and software configurations. Nevertheless, this merge marks a major milestone in Chrome’s Wayland journey, paving the way for a more performant and future-proof browsing, gaming, and Linux desktop experience.

Via MR

Recent articles from DebugPoint.com

Loading...
Tags:
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments