How to Enable Hardware Acceleration in Chromium Snap: A Step-by-Step Guide

Last May, Canonical announced that a hardware-accelerated version of the Chromium snap was available for testing on Intel (7th-gen and later) hardware.

Hardware acceleration on the modern web is a real boon.

VP8, VP9, H.264, and AV1 codecs are in wide use, and modern GPUs (integrated and discrete) have dedicated decoders on them in order to deliver smooth video streaming (Netflix, YouTube, etc), video calls, and cloud gaming (Moonlight, Xbox Cloud Gaming, etc).

Obviously, the less your CPU is tasked with, the better your system runs as the GPU stays cooler, you avoid thermal throttling, and battery life increases as more power isn’t needed. It’s win-win.

However, a year on from that test build announcement, a hardware accelerated Chromium snap package is yet to hit the stable channel (though beta and candidate channels on the snap store now have these enablements, if you’re happy to use those).

What’s the hold up?

Canonical’s Nathan Teodosio has been working on this, but says the delay in it arriving in stable channels is due to losing access to the testing server, his computer being older (i965 Intel driver), and a few things going stale requiring automated tests to be re-enabled to ensure everything is hunky-dory.

But you do not need to wait, my friend!

You can use a stable release of the Chromium snap and still benefit from hardware accelerated awesomeness — if you’re willing to manually enable them.

The quickest way to do this is to run this command (it may appear wrapped in the preview below but it will copy and paste as a single line):

chromium --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL,UseChromeOSDirectVideoDecoder --enable-native-gpu-memory-buffers --ozone-platform-hint=auto

That’s it.

Once enabled, have a play around, see what works, and perhaps install the Intel GPU Top CLI utility to verify GPU is being used for codec decoding (keep in mind Chromium uses the GPU for its UI tool, so you will see GPU usage when not streaming video, etc).

While that command is handy, you’ll need to run that command each time you want to use Chromium with hardware acceleration on Intel – but there is an easy way around that besides creating a custom application launcher.

Open chrome:flags in a new tab and go through and enable the following ones.

  1. You will need an 11th-gen or newer iGPU for AV1 accelerated decoding, the rest of those mentions are supported in 7th-gen and later. ↩︎

Posted

in

by

Tags: