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
- Installed the proprietary nVidia 565.77 driver (per Howto/NVIDIA - RPM Fusion ), and switched to the open kernel version (per Howto/NVIDIA - RPM Fusion ).
- Installed full ffmpeg, and libva-nvidia-driver (per Howto/Multimedia - RPM Fusion )
- 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
- 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
- Played a YouTube video and saw that the GPU was in use (nvidia-smi showed the power usage, clocks and voltage all rise sharply)
- 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 |
- From Flathub, installed Firefox and
org.freedesktop.Platform.ffmpeg-full
- In Flatseal, configured Flatpak Firefox to use the same environment variables as rpm Firefox (
NVD_BACKEND=direct
andMOZ_DISABLE_RDD_SANDBOX=1
) - Copied the rpm Firefox profile to create a Flatpak Firefox profile with the same
about:config settings
shown above. - 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).
- 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!