Chromium to Allow VA-API Hardware Decoding in Linux Wayland

Last updated: January 8, 2024 — Leave a comment

For Chromium user, the popular web browser is finally to allow VA-API hardware decoding for video playback in Linux Wayland.

Chromium so far does NOT officially support VA-API Video Acceleration API on Linux. However, there are experimental flags to enable this feature, which might work on certain configurations, but without guarantees (See the official Docs).

This experimental feature however does not work in Linux with Wayland session. Meaning the most recent Ubuntu, Fedora, & other Linux with GNOME Desktop.

Just few days ago on Saturday, Chromium source merged the request to “allowing VA-API on Linux Ozone/Wayland“, submitted by JianHui J Dai.

VaapiWrapper has been updated to remove the usage of libva-x11 and the legacy VaapiVideoDecodeAccelerator, in favor of libva-drm only. This means now Linux Ozone/Wayland can share the same code path as Linux Ozone/X11. See CL:4938496.

This CL removes the remaining libva-x11 codes from Ozone and VaapiWrapper, and allows VA-API by default on Linux Ozone/Wayland.


So this experimental feature will also work for Linux on Wayland. NOTE: it’s NOT released yet, but expected in next Chromium 121 or even later releases.

Once the feature is officially release, then, user can try to launch the browser with following flags, if the package in your system was built with va-api support:

  • --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=x11 for Xorg.
  • --enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=wayland for Wayland.

Try Chromium Snap package with VA-API Hardware Acceleration

Ubuntu has been working on VA-API support for its Chromium snap package for a few years. It works for me on Intel i5-10400 with built-in UHD 630, but not for many other machines as reported.

1. To try it out, press Ctrl+Alt+T on keyboard to open terminal. Then, run command to install it:

sudo snap install --beta chromium

If you already installed Chromium as Snap, use the command below instead to switch to Beta channel:

sudo snap refresh --beta chromium

2. Once installed, launch the browser either from start menu (or app grid), or by running snap run chromium command from terminal.

Then, start playing a video to verify. For YouTube video, you have to install a browser extension to block VP8/VP9 codecs.

And, for Intel GPU, run the command below to install the tool:

sudo apt install intel-gpu-tools

Then, run sudo intel_gpu_top to check video engine while playback.

3. (Optional) If the Snap package does not work for you, either switch back to stable version by running command:

sudo snap refresh --stable chromium

Or remove the package by:

sudo snap remove chromium

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*