Chromium Snap Package to Finally Get back VAAPI Hardware Decoding

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