Last May, Canonical announced that a hardware-accelerated version of the Chromium snap was available for testing on Intel (7th-gen and later) hardware.
And that news was very welcome: hardware acceleration + the modern web = better experience.
VP8, VP9, H.264, and AV11 codecs are widely used, and modern GPUs (both integrated and discrete) have dedicated decoders to deliver smooth video streaming (Netflix, YouTube, etc), video calls, and cloud gaming (Moonlight, Xbox Cloud Gaming, etc) without impacting performance.
With a beefy processor CPU decoding isn’t noticeable, but on lower-end devices it can be – the more a CPU is tasked with, the slower the experience, worse if thermal throttling kicks in, and battery life depletes as more power is needed to run the fans, and handle the load.
Hardware acceleration negates much of those drawbacks, which made Canonical’s efforts with a GPU-friendly Chromium snap welcome news.
However, a year on from the test build announcement and the hardware accelerated Chromium snap package is yet to hit the stable channel2.
Installing Chromium on Ubuntu (DEB or Snap) is Easy – Here’s How
What’s the hold up?
Canonical’s Nathan Teodosio has been working on this. He says the delay in this reaching stable status is multi-fold, and hindered by testing server access issues and his computer using an older Intel driver.
Plus, many of the automated tests that they set up need to be updated to account for upstream changes – those tests are importance since there are all manner of bug reports, performance quirks, and hardware coverage snafus on the Chromium tracker!
But if you fancy trying it out, you do not need to wait…
Want Hardware Acceleration in Chromium?
To stick with a stable release of the Chromium snap and benefit from hardware accelerated awesomeness run this command in a new Terminal window.
Also, the command may appear wrapped in the preview below (depending on what size the window reading this article in is) but it will copy and paste as a single line without issue: –
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, stream some video, see what works – and what doesn’t!
You need to run the command above every time you want to use Chromium with hardware acceleration enabled. Creating a custom application launcher is an easy way around that, should you fancy putting in the effort.
On the flip, having to run the command means you can choose when to enable this feature – and if turns out to have quirks on your setup, there are no lasting changes to ‘undo’ to revert back to how things are out of the box.
I recommend installing the CLI Intel GPU Top tool (part of the intel-gpu-tools
package; only works when run as sudo
) or a GUI app like Mission Center. This will let you check that your GPU is being used for video decoding.