Chromium Snap Package to Finally Get back VAAPI Hardware Decoding

Last updated: July 7, 2022 — 1 Comment

The Chromium browser package (Snap version) in Ubuntu Software is missing VAAPI hardware decoding support. Ubuntu developer team is finally working on get the feature back!

As you may know, Ubuntu now includes the chromium web browser in the system repository as Snap package that runs in sandbox. However, the package is missing the graphics hardware acceleration since version 72 which was released a few years ago in 2019.

Some third-party PPAs are being maintained with Chromium packages, either due to lack of hardware acceleration or just because they don’t like Snap.

For Chromium fans who are OK with the Snap package, you can now help testing the new hwacc build that uses the graphics card for video playback.

Install Chromium from test repository:

1.) Firstly, backup your bookmark, password etc if you’re running Chromium as Snap.

2.) Press Ctrl + Alt + T on keyboard to open terminal. When it opens, run command to remove chromium snap (if any) via command:

sudo snap remove chromium

3.) Next, install the testing build with hardware acceleration support by running command:

sudo snap install --channel candidate/hwacc chromium

Verify if hardware acceleration works:

The report page recommends to run the command below to launch chromium browser:

snap run chromium --disable-features=UseChromeOSDirectVideoDecoder --enable-features=VaapiVideoDecoder

Finally, start playing a video either by drag and dropping local file into browser window, or via video website.

And, go to about:media-internals in address bar. Click what it’s playing and find out the value of “kVideoDecoderName“.

It will be {Vaapi,VDA,Mojo}VideoDecoder if succeed, or {FFMpeg,Vpx}VideoDecoder when failed.

For Intel graphics, there’s also a command line tool to verify if GPU rendering is working.

  • First, run command to install the intel-gpu-tools package:
    sudo apt install intel-gpu-tools
  • The, use command to verify:
    sudo intel_gpu_top

In my case, the previous command did’t work in both i3-6006U and i5-10400 with integrated graphics card, but using the following command to launch Chromium works!

LIBVA_DRIVERS_PATH=/snap/chromium/current/usr/lib/x86_64-linux-gnu/dri/ chromium --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround

How to Restore:

To remove the Chromium package, open terminal and run command:

sudo snap remove --purge chromium

And, install back the package (if you want) from stable channel either from Ubuntu Software or by running the command below in terminal:

sudo snap install chromium

Report in launchpad

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 ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

One response to Chromium Snap Package to Finally Get back VAAPI Hardware Decoding

  1. Is it possible to use hardware decoding with Chrome-based web browser on Ubuntu?
    I followed your article, but It didn’t work.
    (In the case of mpv, It works fine”)

    I also tried Archlinux wiki and

    https://www.linuxuprising.com/2021/01/how-to-enable-hardware-accelerated.html

    But they didn’t work either.

    Could you please provide me with a solution?
    Thanks

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> 

*