Hardware acceleration has been an issue with Chrome and Chromium on Wayland for quite some time but I would like to add persistent flags to ensure that, when it does eventually work, the required flags (usually provided at runtime) are included when it is run.
In Arch, the flags could be kept in a separate file at ~/.config/chromium-config.conf or ~/.config/chrome-config.conf
In Fedora, that doesn’t seem to work and adding the flags to the shortcut only lasts until the next time Chrome or Chromium is updated (which happens frequently)
Is there a different location for these flags located elsewhere in Fedora?
I can’t seem to find anything in that directory that points to this unfortunately.
The main reason I use the flags is that Chrome on Linux (particularly Wayland) tends to have issues with GPU acceleration of video (e.g. Youtube) Currently all videos are CPU-rendered which brings down battery life if you’re on the road often.
GPU acceleration lets the browser tap into integrated or discrete graphics which tends to improve battery life (at least on my Thinkpad with Iris Xe graphics) but there remain some issues with the va-api/Mesa implementations for Chrome on Wayland in particular.
It’s an issue with every distro out there but it’s unlikely that hardware acceleration will just magically work in Chrome + Linux even if they update it with a fix. It will typically require some array of feature flags to enable it properly (such is the Linux desktop lifestyle for the time being it seems)
I’m using the following sed command to modify the desktop file after copying it to ~/.local/share/applications as @ankursinha suggested. This seems to be the easiest way to accomplish this for me since I’m only using a few flags.
sed -i '/^Exec/ s/$/ --use-gl=desktop --enable-features=VaapiVideoDecoder/' ~/.local/share/applications/google-chrome.desktop