How To Enable Hardware Accelerated Video Decode In Chromium Based Browsers On GNU/Linux
2 min readDec 14, 2021
Check if Hardware Acceleration enabled or not_
Open browser and go tochrome://gpu
and look for βVideo Decode: Hardware Acceleratedβ (in green color). If you see anything other than that then you donβt have hardware acceleration enabled.
Enable following Chromium flags_
- Override software rendering list
On address bar pastechrome://flags/#ignore-gpu-blocklist
then hit enter. Now set Override software rendering list to enabled. - GPU rasterization
Again on address bar pastechrome://flags/#enable-gpu-rasterization
then hit enter. Set GPU rasterization to enabled.
Move and Edit .desktop file_
- Go to
/usr/share/applications
look for nameOfTheBrowser.desktop file and copy it to~/.local/share/applications
.
_Example
- For Chrome the name of .desktop file would be google-chrome.desktop.
- For Brave the name of .desktop file would be brave-browser.desktop. - Now open copied .desktop file in a text editor (like Gedit or Kate).
- Then look for the line that has
Exec=
. - Put
--use-gl=desktop --enable-features=VaapiVideoDecoder
afterExec=
on every line that hasExec=
.
_Example
-Exec=/usr/bin/google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder %U
-Exec=/usr/bin/google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder --incoginto
-Exec=/usr/bin/google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder
- Save .desktop file and exit from the browser and relaunch it. Or restart your device.
- Go to
chrome://gpu
and now youβll see that βVideo Decode: Hardware Acceleratedβ (in green color).
Some Things to look out_
- To show hidden files press
ctrl+h
in file manager. /usr/share/applications
this path is in root and~/.local/share/applications
this one is in home.- Make sure that in
chrome://gpu
βVulkan: Disabledβ. Otherwise you may see white box instead of video. - To disable Vulkan go to
chrome://flags#enable-vulkan
and set Vulkan to disabled. - You can launch any chromium browser from terminal with above flags.
_Example
- For Chromegoogle-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder
- For Bravebrave-browser --use-gl=desktop --enable-features=VaapiVideoDecoder
- If you think Iβve missed anything or made mistake then comment and Iβll add or correct that.
- Iβm not responsible for anything, even not for your divorce. So, follow this at your own risk. :)
If you liked my work, you can buy me a coffee here.