Using chromium web browser in Ubuntu? The snap package in system repository is finally getting back hardware accelerated video decoding and encoding support!
Since Ubuntu 20.04, the Chromium browser in system repository has switched to Snap package that runs in sandbox. Snap is easy to maintain and updates automatically. However, it has regressions, such as lacking hardware acceleration support.
The Ubuntu team has been working on fix the issue a few years ago since 2019. Now, Canonical (the company behind Ubuntu) and Intel have partnered to build the Chromium browser (Snap) with GPU hardware acceleration support for Intel-based platforms. Which, should improve performance and extend battery life.
At the moment, it features:
- Needs Intel Kaby Lake (7th Gen) and newer platforms
- VP8, VP9, and H.264 codecs
- In Beta channel for testing purpose.
How to Install the Hardware Accelerated Chromium in Ubuntu
For all current Ubuntu releases and their official flavors, first press Ctrl+Alt+T on keyboard to open terminal.
When terminal opens, run command to install Chromium snap package from beta channel:
snap install chromium --channel=latest/candidate/hwacc
If you already have Chromium snap package installed, use this command to switch to beta channel:
snap refresh chromium --channel=latest/candidate/hwacc
Once installed, launch Chromium. Drag a video file into browser, or visit a video website (e.g., YouTube) and play it.
Then, open terminal and run command to install the
sudo apt install intel-gpu-tools
During the video playback, run the command below to verify if GPU Hardware Acceleration is working:
You should see the “Video” and “VideoEnhance” engines are working if everything works OK!
Uninstall or Switch Back Chromium to Stable
To switch back your Chromium Snap package from latest Beta to Stable, just open terminal and run command:
snap refresh chromium --channel=latest/stable
Or, you may remove Chromium browser snap package by running command:
snap remove --purge chromium
via: Ubuntu Discourse