Back

Firefox 153 available with support for Vulkan video decoding, JPEG-XL

235 points11 hoursphoronix.com
temp08269 hours ago

Cool, have been using vulkan video decoding via mpv for a while now and it seems fine with little or no performance hits. Glad it's made its way here as getting hardware decoding to actually work in ff has felt like a house of cards (more options are welcome). Does something need to be done to enable/switch to it?

creshal8 hours ago

The primary advantage of dedicated hardware accelerators for the past ~15 years been power efficiency, rather than performance. Not much of a problem on a desktop, but very noticeable on mobile devices.

faragon6 hours ago

8K decoding needs HW acceleration, unless having 8-16 cores with AVX-512.

krzyk5 hours ago

Yes, but that's way out of budget for most consumers.

+1
prima-facie4 hours ago
BoingBoomTschak5 hours ago

I could also imagine the decoded output being pluggable into Vulkan-based filters (mpv uses https://code.videolan.org/videolan/libplacebo) without slow device->host copying.

adrian_b8 hours ago

Yes, while the Chrome/Chromium hardware decoding, or any other uses of the GPU, like WebGL, was always impeccable on Linux, with Firefox that was always an adventure, much more often not working than working (at least with an NVIDIA GPU).

So I also hope that Vulkan decoding might solve this behavior of Firefox on Linux.

Matl8 hours ago

> Yes, while the Chrome/Chromium hardware decoding, or any other uses of the GPU, like WebGL, was always impeccable on Linux

Have you seen the massive blacklist Chromium maintains?

roryirvine8 hours ago

Yeah, Chromium even blacklists perfectly ordinary 2020s "choose this for a quiet life" Intel igpus that work fine in Firefox (and, weirdly, Chrome itself).

First thing to do with Chromium has always been adding various flags to force-enable things, followed by changing a bunch of chrome://gpu settings. Not sure why Chrome does better, but it's closed source so no reasonable way of knowing what it was up to.

Firefox did go through a rough patch 4-5 years ago where it needed various things in about:config to get hw decode when running under Wayland, but it's gone back to working out of the box for me in whatever ESR version has come with the last couple of Debian releases.

RamRodification8 hours ago

Blacklist of what? I don't understand what a blacklist would be used for in this context. Specific unsupported hardware?

+1
cwillu8 hours ago
GreenVulpine6 hours ago

Nvidia drivers on Linux are not really display quality. The effort goes towards CUDA for headless rigs. They work great for AI and that's it. Pair them with an AMD and Intel card for display, graphics and video acceleration. Otherwise you end up with too many cases of booting into a black screen, random software breaking, games not working, bad performance and just jank in general.

drnick16 hours ago

> booting into a black screen, random software breaking, games not working, bad performance and just jank in general.

That has not been my experience at all, using either the old closed source drivers or the newer "open" drivers. (Note: I am referring to the open source Nvidia kernel drivers, not Nouveau.)

gucci-on-fleek7 hours ago

Interesting, I've personally had the exact opposite experience: Chromium hardware decoding was always half-broken for me and nearly impossible to get working, whereas in Firefox, I had to modify a single setting in "about:config" 5 years ago and it's worked perfectly ever since.

temp08267 hours ago

I guess my caveat always is that I use Fedora (which does not include hw codecs by default due to licensing) and have to manage mesa/ffmpeg stuff myself. Adds a bit to the frustration (though it's self-inflicted so I don't usually complain :)

Havoc10 hours ago

Interesting - will see if I can toy with it.

Word of caution though. I’ve found that on my machine (Linux/nvidia) unaccelerated video is way more power efficient. The second video is playing it kept the GPU in a high power state and that uses incrementally more power than the cpu doing software decoding

I had always assumed gpu would obviously be more efficient until I measured it

joebonrichie10 hours ago

Are you using nvidia-vaapi-driver? If so, you'll need to set `CUDA_DISABLE_PERF_BOOST` in your environment.

Havoc9 hours ago

Oh that’s interesting. I shall investigate thanks.

edit: very quick test with MPV seems to confirm this works - eliminates the gnarly additional GPU draw. Measuring draw at wall now puts CPU and GPU route on equal footing...both basically the machines idle draw. Tested both 264 and 265...same outcome. 3090.

Thanks!

Havoc7 hours ago

Bonus discovery I just learned. Under nvtop -> F2 -> Processes -> Fields -> there you can make it show encode/decode. It's disabled by default

dathinab8 hours ago

Interesting.

through, from a pure power POV you probably would want to exclusively use the integrated graphics most CPUs have (1) with the external GPU powered down for most "daily/office-style" usage (browser, news, email, coding (not gamedev,etc.)) and only switch to external GPUs for Gaming, GPGPU, and I guess some edge cases like too many monitors or insisting on running a coding IDE at >240Hz ;)

EDIT, forgot the food note (1): Even the very very minimal GPU recent (non APU) AMD processors have are good enough for many peoples daily "office" needs.

Havoc7 hours ago

No iGPU on my CPU (5800x3d). So was straight software decode (well maybe AVX2?) against GPU decode. GPU route was 80W more.

joebonrichie's comment was excellent though - there is a new nvidia tweak that eliminates the GPU going to a high power state the second it sniffs video. So now GPU & CPU get me the same draw.

>enough for many peoples daily "office" needs

Yeah been considering using my mac air for when not gaming / messing with LLMs, but frankly struggling with it on UX.

SubiculumCode9 hours ago

I haven't been able to get Firefox GPU acceleration to work on Linux in forever.

PcChip7 hours ago

Works out of the box for me on CachyOS, both amd and nvidia

newusertoday8 hours ago

i am bit confused, what does it mean by vulkan video decoding? does it mean that it will be done via gpu or via hardware accelerator sepcific to decoder via some vulkan extension? if it is via extension gpu would be free to do gpu specific things?

wmf7 hours ago

It's a Vulkan extension to use dedicated video decoders like QuickSync, NVDEC and VCN. It's not using shaders.

ivanjermakov10 hours ago

All modern CPUs come with an iGPU, so it's unlikely to be software decoding. Just iGPU driver's decoder being more efficient than dGPU one.

Latty10 hours ago

"All" really isn't true, most AM4 Ryzen chips don't have iGPU (unless they are specificly APUs), and a lot of Intel chips have popular 'F' SKUs without an iGPU.

wtallis10 hours ago

The iGPU's video decoder could even be drastically less efficient than the dGPU's decoder, and it would still be better to use the iGPU, because just powering up the PCIe link and VRAM for the dGPU costs far more power than the video decoding itself.

mradalbert9 hours ago

Exactly, mpv logic causes it to pick up Nvidia for HW video even if renderer is on iGPU. There is special flag to choose device which solves the problem and Nvidia is kept down

bgirard9 hours ago

What makes you think the unaccelerated path would use the accelerated iGPU path? Typically hardware decoding is disabled because of driver/reliability issues and thus would switch to software decoding to sidestep these concerns.

dathinab8 hours ago

I assumed the OP/comment means "software vs. hardware accelerated rendering" when they say "it uses the CPU. And iGPU is still hardware accelerated rendering.

But some modern video codecs are designed to work quite okay with software rendering, especially if it's lower resolutions, and modern higher end dGPUs often have a pretty high "power overhead" on low utilization. To add to it the driver might keep it in a more high power state then strictly needed due to "expecting" more utilization, or similar.

krzyk5 hours ago

Not all, most desktop have two options with or without igpu.

cwillu8 hours ago

Neither of the last two processors I've purchased in the last few years had any iGPU.

doctorpangloss8 hours ago

the story is kind of complicated, it's impossible to guess the culprit, you must profile. HDR content for example can sometimes incorrectly request a bespoke tonemapping instead of a video engine silicon one, like it does in libavcodec, or you have a privacy setting in your browser that breaks GPU compositing. so many little things can go wrong unfortunately.

prima-facie4 hours ago

I understand this is important mainly for Nvidia GPUs. Is there any benefit at all for this (vs the existing VA-API) on Intel and AMD graphics? VA-API seems to work very well on both of these platforms, as far as I've tested.

saibotk48 minutes ago

VA API has some caveats and also requires one to disable sandboxing of the media process.

saibotk45 minutes ago

Sorry my comment was related to the nvidia vaapi driver

rdsubhas3 hours ago

How is the built-in website translation story in Firefox? To be honest, the only reason I'm forced to use Chrome is the way translate quite seamlessly works, both the detection (with mixed-language content in sites with English ads) and the actual translation.

I did try Bergamot but that was a year ago, and the experience was not as good as Chrome...

OuterVale50 minutes ago

Really good. I use it frequently and haven't had any reason to switch to an external offering. It can translate the whole page or just a snippet that you highlight.

nagisa3 hours ago

There are a couple built-in ways you can translate, all of them fully local. First is the full page translation and another that allows you to translate a selection (from the context menu.) Fully local nature, of course, reduces the translation capabilities, but I found the quality to be good enough to very rarely need an external service.

ChrisArchitect9 hours ago
robtherobber11 hours ago

Was there a link to the project on Github? I think that you've mistakenly shared Github's search tool/path

moebrowne10 hours ago

Here's the Bugzilla link which was closed last month: https://bugzilla.mozilla.org/show_bug.cgi?id=2021722

yonatan80707 hours ago

Yup, it's pointing to https://github.com/search

cwillu7 hours ago

I expect it's the https://github.com/search?q=repo%3Amozilla-firefox%2Ffirefox... link that phoronix used in lieu of linking to an actual github issue.

sunaookami8 hours ago

That's not the final release, that's an RC and tech blogs should stop reporting this as final. There were instances in the past where the RC had critical bugs.

pdpi5 hours ago

An RC justifies the "merges" title (compare "releases")

sunaookami5 hours ago

Yeah but not the Phoronix one ("Firefox 153 Available", "Mozilla has uploaded the Firefox 153.0 release binaries today"). Shame because Phoronix was kinda good in the past.