Note: This doesn’t work on Wayland. You can use VA-API on XWayland, using the --use-gl=egl command line flag (untested).
1. Enable the following web browser flags:
Warning: Disabling the rendering blacklist may cause unstable behavior, including crashes of the host. See the bug reports in chrome://gpu for details.
Additionally the flag --disable-gpu-driver-bug-workarounds may need to be passed to prevent GPU workaround from being used. Flags in chrome://gpu should state “Hardware accelerated” when configured and available.
For Google Chrome:
Create ~/.config/chrome-flags.conf and populate it with the following:
For Brave and possibly others:
Since other browsers are not configured to use a user config file like Chrome, you’ll need to enable the flags in chrome://flags:
To make this change permanent, copy the browser .desktop file from /usr/share/applications/ to ~/.local/share/applications/
(if this folder doesn’t exist, create it). By copying the file here, we’re making sure it won’t be overwritten by an update.
Then, open the .desktop file (e.g. brave-browser.desktop, etc.) from this ~/.local/share/applications/ location,with a text editor.
In this file, search for the lines starting with Exec=, and change the executable to include the flags above.
E.g. for Vivaldi: Exec=/usr/bin/brave --enable-flag %U
2. Install the VA-API driver to be able to decode media:
So simple and effective. Thanks!
Just a thing… Testing this I’ve noticed that YouTube is slowly moving to AV1 instead of VP8/9 video format and forcing us to use it by default. For most of us this is a problem, because AV1 is still being decoded by software on pre-2020 hardware. You can test it with this video and check if chrome://media-internals shows Dav1dVideoDecoder for kVideoDecoderName. If it is your case, you can install NotYetAV1 extension to avoid this issue, since the flag #enable-av1-decoder has been removed from Chrome.
Once done, you can restart your browser, watch the same video and check chrome://media-internals again. MojoVideoDecoder should be working and also "codec":"vp9" or "codec":"vp8" will be shown as kVideoTracks info.
As the extension developer says, this is just for YouTube and a few more sites (?). If anyone could provide a workaround for getting AV1 widely-disabled, it will be welcomed .
PS: It also allows video resolutions lower than 720p to be played with VP8/9 codec, so being hardware decoded as well.
Could be hardware related? For me, VP9 is being decoded by MojoVideoDecoder. I’ve also tried enhanced-h264ify, but blocking VP8 and VP9 makes me have no 4K resolution option on some videos.
Someone has already created chromium bugreport:
id=1201686 (can’t post the link, unfortunately)
Developers moved the bugreport to won’t fix. So seems like this is it.
How can I downgrade to 89 if I don’t have it in local cache and sudo DOWNGRADE_FROM_ALA=1 downgrade google-chrome returns Unable to downgrade google-chrome ?
vainfo and vdpauinfo both working, was working before update with brave 90
Cant get to work with --enable-features=VaapiVideoDecoder or --enable-accelerated-video-decode. It’s been broken on every chromium 91 based browser I’ve touched on linux, and they all seem to be missing the flags that were previously there for it from browser://flags.
This seems to be something broken or removed upstream
@Yochanan, so post chrome 88 i had my vid acceleration working with --enable-features=VaapiVideoDecoder switch and everything was working fine. However inbetween chrome 90-92, video acceleration has cease to function again.
after advise from a forum user to uninstall and reinstall with fresh config to fix the issue, i found vid. accel. works only the first time you invoke chrome after clearing the config. every subsequent invocation results in vid. accel. being disabled. then after comparing GPU settings in chrome:///gpu page, i found that ozone platform is loaded only successive chrome invokes. disabling ozone (via flag), gets video acceleration back.
ozone could be disabled by CLI switch --disable-features=UseOzonePlatform or flag #use-ozone-platform.
i’m on X11 with intel i915/965 driver with VAAPI enabled. and still cant makeout whether ozone is meant to help X11 or xwayland users. with G deciding that ozone to be enabled by default, there can be a performance penalty if it is disabled. however it seems it is the only way to get hw v. acceleration back.
For those trying to use Electron apps such as Discord, Signal or TutaNota on Wayland but get blank window contents, the Chromium launch option --use-gl=desktop fixes that for me! Make sure to also set up the proper Wayland config as described on the ArchWiki too. (You can indeed put --use-gl=desktop in that file if you want to apply it universally.)
Kind soul by the name of JonnyBoss taught me that over on the GamingOnLinux forum. Was gonna make a thread about it, but this one seems similar enough to only warrant this reply.
@Yochanan looks like chrome 95 is the final nail in the coffin for video acceleration on X11/VAAPI users. ozone-platform cannot be disabled anymore, and and video acceleration with it .