Open tamasd opened 5 months ago
Are you using fedora's FF Flatpak or the one from mozilla?
https://src.fedoraproject.org/flatpaks/firefox
Here is the FF from Mozilla. https://flathub.org/apps/org.mozilla.firefox
I wonder if you might get better luck w/ the Mozilla one?
I switched from the Flathub version to the Fedora one. Making my host libraries available in the flatpak and playing around a bit with LD_LIBRARY_PATH
, so the Intel driver could find libigdgmm.so.12
, I was able to make vaapitest
run. However, hardware decoding was still unavailable, the about:support
page had the same error message.
The Fedora version is worse than the Flathub one, because the software decoder can only play YouTube videos at ~1fps. So I switched back to the Flathub version (that I had originally), this way the software decoding works.
Yeah this issue has nothing to do with the Fedora flatpak, is that screenshot from a ublue system?
I haven't been able to reproduce on my intel systems, the hwaccel is working on all of them ootb, so maybe it's something else.
@tamasd I suggest to update your Firefox, this seemed to be broader issue that was fixed in version 127.0.2. I have this version from Flatpak, don't see any issues.
I checked with 127.0.2, unfortunately I have the same error :(
I think this will be resolved temporarly when the new freedesktop flatpak platform will be released (in a month or so) and a new firefox version will be released using that. However, it might come back when a new Fedora will be released, because the rpm fusion intel driver package is built against Fedora's libraries and not the standard platform.
Should we give this a tag "unable to confirm*" and close? What do we need to confirm root cause?
I have Firefox 128.0.3 now, the situation is not changed.
Can I get a confirmation from someone who has Intel iGPU and the Flatpak Firefox that on the about:support
page HARDWARE_VIDEO_DECODING
is enabled? If not, open the Firefox flatpak shell with flatpak run --command=sh org.mozilla.firefox
and type MOZ_GFX_DEBUG=1 /app/lib/firefox/vaapitest -d /dev/dri/renderD128
or MOZ_GFX_DEBUG=1 /app/lib/firefox/vaapitest -d /dev/dri/renderD129
in the shell. Is there an error in the output?
Reopening since this is still affecting people.
Sorry if this is off topic but been googling this for ages now and it's infuriating, especially as people are gonna be moving to Firefox from chrome after the manifest v2 deprecation. Proper GPU decoding support really does matter, especially whilst multitasking. (Nvidia GPU btw)
@tamasd First, thank you for your issue and for the detailed troubleshooting, that's very helpful!
TL;DR - I believe things should be working well now, at least on intel.
Here's what I'm seeing on a recent bluefin image ( ghcr.io/ublue-os/bluefin-dx-nvidia:stable Version: 40.20241101.0 )... So Fedora 40 on a hybrid intel+nvidia laptop running flatpak mozilla firefox version 132.
I have all default settings for Firefox in Flatseal, nothing custom. I tried to set old "forced" config options to defaults in about:config
to see where we are today, including resetting media.ffmpeg.vaapi.enable
to default.
Within a flatpak run --command=sh org.mozilla.firefox
shell:
$ MOZ_GFX_DEBUG=1 /app/lib/firefox/vaapitest -d /dev/dri/renderD128
vaapitest start, device /dev/dri/renderD128
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
vaInitialize finished
Profile: H264Main
Profile: H264High
Profile: H264ConstrainedBaseline
Profile: VP8Version0_3
Profile: VP9Profile0
Profile: VP9Profile2
Profile: AV1Profile0
vaapitest finished
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
$ MOZ_GFX_DEBUG=1 /app/lib/firefox/vaapitest -d /dev/dri/renderD129
vaapitest start, device /dev/dri/renderD129
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/nvidia_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed -1
On host using flatpak binary:
$ MOZ_GFX_DEBUG=1 /var/lib/flatpak/app/org.mozilla.firefox/current/active/files/lib/firefox/vaapitest -d /dev/dri/renderD128
vaapitest start, device /dev/dri/renderD128
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vaInitialize finished
Profile: H264Main
Profile: H264High
Profile: H264ConstrainedBaseline
Profile: VP8Version0_3
Profile: VP9Profile0
Profile: VP9Profile2
Profile: AV1Profile0
vaapitest finished
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
$ MOZ_GFX_DEBUG=1 /var/lib/flatpak/app/org.mozilla.firefox/current/active/files/lib/firefox/vaapitest -d /dev/dri/renderD129
vaapitest start, device /dev/dri/renderD129
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vaInitialize finished
Profile: H264Main
Profile: H264High
Profile: H264ConstrainedBaseline
Profile: VP8Version0_3
Profile: VP9Profile0
Profile: AV1Profile0
Profile: VP9Profile2
vaapitest finished
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
240
Nvidia vaapi does fail, but I haven't dug in to that as I don't want to use it and it does show as supported in host.
I have Firefox 132.0 and the system is on the sha256:27d65e684ef5e4159e480ec4c531b137579d31707773cba9d13bf75dbbf47495
revision, tracking the latest
branch. The issue still exists.
@bsherman what are your flatpak info and overrides? Mine are:
$ flatpak info org.mozilla.firefox
Firefox - Fast, Private & Safe Web Browser
ID: org.mozilla.firefox
Ref: app/org.mozilla.firefox/x86_64/stable
Arch: x86_64
Branch: stable
Version: 132.0
License: MPL-2.0
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 267,6 MB
Runtime: org.freedesktop.Platform/x86_64/23.08
Sdk: org.freedesktop.Sdk/x86_64/23.08
Commit: eddd807e2511ac9589811461dca1a8e9e119958730fafc21425dae23cac1b5e8
Parent: 4fea3214184b32a765c4bb2d764b9b2700251f5e9b7863d666b67000829235c3
Subject: Export org.mozilla.firefox
Date: 2024-10-29 12:47:03 +0000
$ flatpak override --show org.mozilla.firefox
[Context]
filesystems=xdg-run/app/org.keepassxc.KeePassXC/org.keepassxc.KeePassXC.BrowserServer;
$ flatpak override --show --user org.mozilla.firefox
[Context]
sockets=!fallback-x11;!x11
devices=dri
filesystems=host-os
[Environment]
LIBVA_DRIVER_NAME=iHD
LIBVA_DRIVERS_PATH=/run/host/usr/lib64/dri
LIBVA_MESSAGING_LEVEL=1
MOZ_ENABLE_WAYLAND=1
MOZ_DISABLE_RDD_SANDBOX=1
NVD_BACKEND=direct
@tamasd
$ flatpak info org.mozilla.firefox
Firefox - Fast, Private & Safe Web Browser
ID: org.mozilla.firefox
Ref: app/org.mozilla.firefox/x86_64/stable
Arch: x86_64
Branch: stable
Version: 132.0.1
License: MPL-2.0
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 267.5 MB
Runtime: org.freedesktop.Platform/x86_64/23.08
Sdk: org.freedesktop.Sdk/x86_64/23.08
Commit: 0e0e422a8c3302703c13198b964ac50dc14ad64cdf756e63ad8d726c31c1df84
Parent: eddd807e2511ac9589811461dca1a8e9e119958730fafc21425dae23cac1b5e8
Subject: Export org.mozilla.firefox
Date: 2024-11-04 19:36:26 +0000
In this possibly related ticket, the solution was to modify the intel driver GUC parameter.
I wonder if that may help for you, depending on your specific hardware.
Also, this PR just merged, https://github.com/ublue-os/bluefin/pull/1876
It will set media.ffmpeg.vaapi.enabled
to true
in Firefox's about:config
(assuming it's not already forced to false
).
I have found this is needed on AMD, I don't think it will help on Intel, especially if the problem is GUC related, but it's worth mentioning.
Tomorrow's Bluefin builds will have this.
I installed Bluefin on my laptop and noticed that YouTube videos make my laptop quite warm. I started to look into it, and I saw that Firefox can't use hardware acceleration for video decoding.
First I checked the output of
vainfo
:The
about:support
page says thatHARDWARE_VIDEO_DECODING
runtime is unavailable because it got force disabled byglxInfo
with the failure codeFEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED
.After reading forum posts and tutorials, I set environment variables in Flatseal:
MOZ_DISABLE_RDD_SANDBOX=1
MOZ_ENABLE_WAYLAND=1
LIBVA_MESSAGING_LEVEL=1
LIBVA_DRIVERS_PATH=/run/host/usr/lib64/dri
LIBVA_DRIVER_NAME=iHD
<- this is the appropriate driver for my iGPUI enabled GPU acceleration in the Devices section.
I also set a dozen configurations in
about:config
in various combinations but nothing worked.So I looked into what Firefox is actually doing when checking the hardware support. Turns out there is a small program called
vaapitest
. Running this inside the flatpak container revealed the actual problem:Running it outside of the flatpak works:
I checked the
libstdc++.so.6
file for the CXXABI support and it has it:The one in the flatpak (coming from
org.freedesktop.Platform
) does not:I think the problem is that the
intel-media-driver
package from RPMFusion is compiled against a newerlibstdc++
while the flatpak platform ships an older one.