Can I make hardware decoding work in Flathub's Flatpak Firefox on an nVidia GPU?

Summary

On my Fedora 41 KDE system, I’ve installed the open kernel drivers for my nVidia 3060Ti GPU from rpmfusion. I’ve also installed the rpmfusion patent-encumbered codecs and libva-nvidia-driver. With appropriate config settings and environment variables, this allows several codecs (H264, VP9, VP8 and AV1) to be hardware decoded in rpm Firefox.

However, Flatpak Firefox, with the same config settings and environment variables, doesn’t allow hardware decoding of any codecs at all.

Detailed steps

  1. Installed the proprietary nVidia 565.77 driver (per Howto/NVIDIA - RPM Fusion ), and switched to the open kernel version (per Howto/NVIDIA - RPM Fusion ).
  2. Installed full ffmpeg, and libva-nvidia-driver (per Howto/Multimedia - RPM Fusion )
  3. Set the following preferences in rpm Firefox’s about:config (per nvidia-vaapi-driver/README.md at master · elFarto/nvidia-vaapi-driver · GitHub )
  • media.hardware-video-decoding.force-enabled -> true
  • media.ffmpeg.vaapi.enabled → true
  • media.av1.enabled → false
  • gfx.x11-egl.force-enabled → true
  • widget.dmabuf.force-enabled → true
  1. Ran rpm Firefox with appropriate environment variables (again per nvidia-vaapi-driver/README.md at master · elFarto/nvidia-vaapi-driver · GitHub): export NVD_BACKEND=direct&& export MOZ_DISABLE_RDD_SANDBOX=1&& firefox
  2. Played a YouTube video and saw that the GPU was in use (nvidia-smi showed the power usage, clocks and voltage all rise sharply)
  3. In rpm Firefox’s about:support, verified that hardware decoding was available for several codecs
Codec Name Software Decoding Hardware Decoding
H264 Supported Supported
VP9 Supported Supported
VP8 Supported Supported
AV1 Supported Supported
HEVC Unsupported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported
  1. From Flathub, installed Firefox and org.freedesktop.Platform.ffmpeg-full
  2. In Flatseal, configured Flatpak Firefox to use the same environment variables as rpm Firefox (NVD_BACKEND=direct and MOZ_DISABLE_RDD_SANDBOX=1 )
  3. Copied the rpm Firefox profile to create a Flatpak Firefox profile with the same about:config settings shown above.
  4. Ran Flatpak Firefox, played a YouTube video and saw that the GPU was not being used for acceleration (power, clocks and voltage stayed flat, unlike the spike they showed in rpm Firefox).
  5. In Flatpak Firefox, about:support showed that hardware decoding was not available for any codec.
Codec Name Software Decoding Hardware Decoding
H264 Supported Unsupported
VP9 Supported Unsupported
VP8 Supported Unsupported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported

Hardware / OS details

CPU: Ryzen 5700X

GPU: Palit RTX 3060Ti

OS: Fedora 41 KDE, kernel version 6.12.15-200, all pending updates applied

GPU driver: 565.77, open kernel version

Questions

Has anyone successfully gotten hardware video decoding to work on Flatpak Firefox with a nVidia card? In principle Flatpak Firefox does support hardware decoding (e.g. someone here got it working with Intel graphics - How to Enable Video Hardware Acceleration on Flatpak Firefox - #3 by freechelmi - Tutorials and Tips - Flathub Discourse ) but perhaps it doesn’t work with nVidia?

Am I missing any steps in setting this up in Flatpak?

[You might ask, “why not just use rpm Firefox and forget about Flatpak?”

A couple of motivations: (1) I’d like to use Flatpak Floorp, which is a fork of Firefox. In fact, I have the same problem on Flatpak Floorp as Firefox, but I’m focusing my troubleshooting on getting Flatpak Firefox to work first, before I deal with any differences between Flatpak Firefox and Flatpak Floorp. (2) I’m trying to figure out whether Kinoite or a derivative could viably work for me, where Flatpak is recommended for all GUI apps.]

Thank you for any possible help!

1 Like

Are you referring to the Fedora or Flathub flatpak of Firefox? The answer will be different for each.

Is it possible to enable hardware acceleration in Firefox Fedora Flatpak?
Additionally, it is from Flathub.

1 Like

You might need to manually copy Nvidia VAAPI driver and then reboot.
You don’t need to do this manually after August 2025.

cp /usr/lib64/dri/nvidia_drv_video.so ~/.var/app/org.mozilla.firefox/dri/nvidia_drv_video.so

Flatpak nvidia drivers are needed, so I guess it is not viable for Fedora Flatpak?

1 Like

You might need to manually copy Nvidia VAAPI driver and then reboot.
You don’t need to do this manually after August 2025.

Yes! I copied that file, set the LIBVA_DRIVERS_PATH for the Firefox Flatpak, and hardware decoding is working now.

Thanks so much for finding that!

1 Like

Nice thread.
How do I activate the support if firefox was installed with DNF ?
Thanks

Steps 1-6 in the original post were enough for me to get hardware decoding working on the dnf-installed version of Firefox. The driver copying was only needed for the Flatpak.

(In step 1, I stated driver version 565, but it’s also working fine for me on 570).

After doing this, I also edited the application settings in KDE Menu Editor so that it starts with the correct environment variables (NVD_BACKEND=direct and MOZ_DISABLE_RDD_SANDBOX=1) every time when launched from the desktop.