How To Enable Hardware Accelerated Video Decode In Chromium Based Browsers On GNU/Linux

Check if Hardware Acceleration enabled or not_

Open browser and go tochrome://gpuand 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-blocklistthen hit enter. Now set Override software rendering list to enabled.
  • GPU rasterization
    Again on address bar pastechrome://flags/#enable-gpu-rasterizationthen hit enter. Set GPU rasterization to enabled.

Move and Edit .desktop file_

  1. 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.
  2. Now open copied .desktop file in a text editor (like Gedit or Kate).
  3. Then look for the line that hasExec=.
  4. Put--use-gl=desktop --enable-features=VaapiVideoDecoderafterExec=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
  5. Save .desktop file and exit from the browser and relaunch it. Or restart your device.
  6. Go tochrome://gpuand now you’ll see that β€œVideo Decode: Hardware Accelerated” (in green color).

Some Things to look out_

  • To show hidden files pressctrl+hin 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 Chrome google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder
    - For Brave brave-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.

--

--

𝐅 𝐀 𝐇 𝐈 𝐌

πšƒπš›πš’πš’πš—πš 𝚝𝚘 πš πš›πš’πšπšŽ