Firefox 80 and my confusion over its hardware accelerated video on Linux

August 28, 2020

The news of the time interval is that Firefox 80 is out and in theory it can support hardware video acceleration on X11, not just Wayland (source, also). The master Mozilla tracking bug for hardware accelerated video on X11 is bug #1619523, with all sorts of information. So I downloaded the official release (one of my Firefox setups uses the official builds these days for reasons beyond the scope of this entry) and tried to get it to do accelerated video playback. The short version is that I think I've failed, but I'm not sure why.

Even in Firefox 80, getting VA-API accelerated video playback requires a whole series of magic incantations in about:config preferences and perhaps environment variables when you start Firefox (this may change in the next release). Assuming that all of those are set right, Firefox can apparently still decide that it doesn't like your Linux video driver (or its version), your specific hardware, or perhaps either or both of the resolution of the source video and the resolution of your display. Some or many of these can be forced with Firefox settings, but at the same time the bug reports I've read say that sometimes Firefox ignores hardware acceleration because it's slower for the specific circumstances, or because it has known bugs. If Firefox is making a sensible decision for my specific hardware, that's one thing and I want it to do what will work best. But if I've missed a setting or if Firefox is just being twitchy about something, I also want to override it. In general I know my hardware is capable of hardware accelerated playback of videos at far lower CPU usage than Firefox manages (on the same videos).

Unfortunately, Firefox won't tell me what it's doing or why, at least not in a way that I can understand. I've peered into the depths of about:support, which tells me some of the 'what' but not the 'why', and I've tried some of the things from bug #1619523 without success. If Firefox is or isn't going to do hardware accelerated video playback, I wish it would tell me both what it was doing and why. Otherwise I'm probably going to go on being confused and annoyed with it.

(I care about hardware acceleration not just because of CPU load but because my perception is that hardware acceleration is necessary to play back a full sized video smoothly without dropping frames every so often. This may be wrong on modern hardware, even on my 4k display.)

Comments on this page:

By chipb at 2020-08-28 10:54:01:

How fun. It looks like it was actually broken for 80, with a patch that was too much churn for a not-officially-supported feature that may be picked up by distros anyway.

I guess it should be working in Mozilla beta/nightlies though?

By chipb at 2020-08-28 11:00:51:

For a codepath that isn’t even enabled by default, I’ve got to say I’m underwhelmed:

Yes it's a bit raw for now, hopefully it will improve with time. Remember this is a first release, they want to kick the tires and fix inevitable bugs before announcing it. Props to Martin Stransky from RedHat who implemented this for both Wayland and Xorg during the last few months.

In the meantime, to save you rummaging around bugzilla, just follow , it's the most constantly {up-to-date, concise, reliable} source you'll find. You don't have to be using Arch, the information contained in this section applies to any Linux/Firefox distro.

Also, note Firefox isn't the only browser to make this not easy. See for similarly non-obvious instructions.

By usr1106 at 2020-08-28 21:40:42:

According to VA-API is broken in FF 80. There is a fix, but not included in 80 if I got it right.

Written on 28 August 2020.
« Even on SSDs, ongoing activity can slow down ZFS scrubs drastically
My divergence from 'proper' Vim by not using and exploring features »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Aug 28 01:17:01 2020
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.