Firefox 80 and my confusion over its hardware accelerated video on Linux
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
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
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.)
Potential problem points for Chrome (or any browser) to support Linux
Suppose, not entirely hypothetically, that you're worried about the possibility of browsers no longer supporting Linux (and Unix in general). Since Chrome and Firefox are already cross-platform, a sensible question is what might make supporting Linux (or Unix in general) difficult in a cross-platform browser, especially one that already supports Android. From my somewhat ignorant perspective, I see two general issues.
One big thing that a browser needs to do is interact with the platform's 'graphics' system for drawing, video, audio, input events, and other similar things (extending to eg clipboard support). Unix currently has two graphics systems (X11 and Wayland) that are used by no one else, and they're at least somewhat different from other platforms (especially X11, which is very old fashioned). If the X11 and Wayland APIs diverge too far away from what Android and Windows support (and possibly Mac OS), then continuing to support the lowest common denominator between all of these platforms might be considered too limiting (or too much work to basically emulate what other platforms can do).
(We've already seen some degree of this in video, where both Chrome and Firefox have been very slow to support hardware accelerated video playback on Unix systems.)
The other large area, especially for Chrome, is platform security features for process isolation and process security. To the best of my understanding, Chrome is much more secure on Windows than it is on Unix because Windows allows it to do much more to lock down various processes. Unix (Linux especially) is trying to move forward on this, but it's generally been happening slowly and it may not match the APIs that Chrome is organized around on Windows. On Android, Google has a lot of freedom to advance the platform security features in any way that they want, so they could move towards features and APIs that are more convenient for them (ie, probably more Windows like). This would leave Unix as the odd one out, requiring an increasing amount of code (and effort) just for it, for less security.
(Firefox is not as far along toward separated and securely confined processes, so I expect that this affects it less.)
PS: With all of that said, the Reddit comments for my entry worrying about Firefox's future on Linux raised a good point (here) for Chrome continuing to support Linux, which is that a lot of Google developers use Linux internally and they need a browser, and probably ideally a Chrome that at least renders the same as Chrome on Windows and Android.
Firefox and web browsers for Linux
The (web) news of the time interval is that Mozilla is laying off a significant number of people, including people working on Firefox's web developer tools and MDN. Naturally this has led to people worrying about the future of Firefox (well, more than usual, since it's had declining web browser share for some time). As a user of Firefox on Linux I have some extra worries, because Firefox is kind of special on Linux.
People on Windows, Mac OS, iOS, and Android can be confident that there will pretty much always be a competent browser on their platform. Each of these platforms is backed by a big company and having a competent browser is too important to their success for the company to neglect it. Linux (or Unix in general) is the odd platform out, since there's no large company behind it to fund browser development. Competent Unix web browsers are kind of a side effect of browser development for other platforms.
Out of the main browsers remaining, only Mozilla has felt genuinely committed to keeping their browser going on Unix. Apple and Microsoft are obviously indifferent, and Google's corporate goals for Chrome only require it to work on major platforms such as Windows and Android (Android is not Unix here, because Android doesn't use X11 or Wayland and has increasingly divergent APIs and capabilities). It's fairly easy to imagine a future where Firefox fading out leaves Unix people with essentially no modern browsers and a growing set of sites that we couldn't really use.
(I believe that the Chrome developers generally care about Chrome working on Unix, but they're at the mercy of what Google is willing to spend money on. If the spur of competition from Firefox goes away, Google might decide that Unix no longer qualifies. They might even decide that supporting Chromium on Unix is getting in the way of internal changes that make it better on Android and Windows.)
This might sound theoretical, but in a way Unix users have been here before. Back in the days before Netscape open-sourced its browser to create Mozilla, Netscape's browser was pretty much the only good option for Unix users, and Netscape had a solid period of relative stagnation in the late 90s and early 00s. I used Netscape back then and it was not really a great experience. I'm not looking forward to the possibility of a rerun of that.
(In the pre-Mozilla days, Unix users were also at the mercy of what Unixes Netscape bothered to provide browser binaries for. I'm pretty sure that there were some Unix workstation users who lost out due to that, which didn't help the fortunes of their Unix vendors in an era where the web was becoming more and more important.)
PS: It's possible that Canonical, Red Hat, and perhaps SuSE would get together to fund enough ongoing Firefox development to keep things viable on Linux (and hopefully other Unixes). Perhaps there are even people in these organizations considering this issue right now.