How to make flag –enable-features=VaapiVideoEncoder persistent in google-chrome?

System info:
Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

Google-chrome installed from .deb
Version 121.0.6167.160 (Official Build) (64-bit)

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Canvas out-of-process rasterization: Enabled
  • Direct Rendering Display Compositor: Disabled
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Enabled
  • OpenGL: Enabled
  • Rasterization: Hardware accelerated
  • Raw Draw: Disabled
  • Skia Graphite: Disabled
  • Video Decode: Hardware accelerated
  • Video Encode: Software only. Hardware acceleration disabled
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGL2: Hardware accelerated
  • WebGPU: Disabled

The flag –enable-features=VaapiVideoEncoder works, makes my VideoEncode in chrome://gpu turn to Hardware accelarated when starting chrome from terminal with this flag. So i want to make it persist, my chrome is in favorite apps list in ubuntu. I have tried chrome-flags.config file but it doesn’t work.

Asked By: prouser


You can make it persistent by replacing the target of the desktop icon:

  1. cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications to copy the icon to a local folder to override it
  2. sed -i 's#Exec=/usr/bin/google-chrome-stable#Exec=/usr/bin/google-chrome-stable --enable-features=VaapiVideoEncoder#g' ~/.local/share/applications/google-chrome.desktop to prepend the new flag to the other arguments on the command line

Now every normal way of opening Chrome will use this new flag. Other apps, start menu, desktop icons, double-clicking .html, and autostart should all use it. Just don’t manually run google-chrome-stable in terminal (though xdg-open shouldn’t hurt) without having it open with the flag set from the normal methods.

Answered By: Daniel T
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.