You are not logged in.

#1 2022-04-06 14:36:06

Dante777
Member
From: Greece
Registered: 2016-07-12
Posts: 31

[SOLVED] Firefox 99 breaks VAAPI

Hi everybody.
As the title says, as of today's Firefox's update (v. 99) there's no vp8/9 ( youtube) hardware acceleration.
A part of Firefox's changelog :

The Linux sandbox has been strengthened: processes exposed to web content no longer have access to the X Window system (X11).

I'm running KDE PLasma, on Wayland, on an Intel UHD620 integrated graphics.
Vainfo verifies that acceleration is up and running, no issues there.

vainfo: VA-API version: 1.13 (libva 2.14.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD

I've tried every flag/switch there is at the Archwiki/Firefox section, to no avail.
I'm launching firefox with these

Exec=env MOZ_DISABLE_RDD_SANDBOX=1 MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox/firefox %u

env variables (.desktop file)
Any ideas?

Last edited by Dante777 (2022-04-08 15:14:11)

Offline

#2 2022-04-06 18:05:48

wwmm
Member
From: Rio de Janeiro, Brazil
Registered: 2010-08-14
Posts: 28

Re: [SOLVED] Firefox 99 breaks VAAPI

Videos were broken for me too. The only fix I have found so far was opening about:config and setting media.rdd-ffmpeg.enabled to false. The variable MOZ_DISABLE_RDD_SANDBOX=1 did not help.

Last edited by wwmm (2022-04-06 18:10:57)

Offline

#3 2022-04-06 18:56:47

aesteve
Member
Registered: 2022-04-06
Posts: 2

Re: [SOLVED] Firefox 99 breaks VAAPI

Hi, I also noticed this problem after upgrading to firefox 99. When running firefox with the command "MOZ_SANDBOX_LOGGING=1 LD_DEBUG=libs MOZ_LOG="PlatformDecoderModule:5" firefox" I see messages like these:

[...]
[Child 10149: Main Thread]: D/PlatformDecoderModule FFMPEG: Couldn't load function av_frame_get_colorspace
     10149:     /usr/lib/libavcodec.so.59: error: symbol lookup error: undefined symbol: av_frame_get_color_range (fatal)
[Child 10149: Main Thread]: D/PlatformDecoderModule FFMPEG: Couldn't load function av_frame_get_color_range
[...]

I tried downgrading to firefox 98, and these messages are gone and video acceleration works again:

[...]
[RDD 16177: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG: Initialising VA-API FFmpeg decoder
[RDD 16177: MediaPDecoder #2]: D/PlatformDecoderModule FFMPEG:   codec vp9 : Google VP9
[...]

So it looks like it is some incompatibility with the FFMPEG library. Do you see the same if you run that command?

Offline

#4 2022-04-06 19:28:13

wwmm
Member
From: Rio de Janeiro, Brazil
Registered: 2010-08-14
Posts: 28

Re: [SOLVED] Firefox 99 breaks VAAPI

@aesteve I have the same ffmpeg errors when media.rdd-ffmpeg.enabled is set to true. With it disabled I could not see ffmpeg errors. But it is not clear if I have hardware acceleration working in this case. But at least the videos play.

Last edited by wwmm (2022-04-06 19:31:53)

Offline

#5 2022-04-06 19:43:57

progandy
Member
Registered: 2012-05-17
Posts: 5,266

Re: [SOLVED] Firefox 99 breaks VAAPI

wwmm wrote:

@aesteve I have the same ffmpeg errors when media.rdd-ffmpeg.enabled is set to true. With it disabled I could not see ffmpeg errors. But it is not clear if I have hardware acceleration working in this case. But at least the videos play.

As of FF98 vaapi only works with rdd-ffmpeg enabled, so that setting disables vaapi.

Last edited by progandy (2022-04-06 19:44:18)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2022-04-06 19:45:25

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,970

Re: [SOLVED] Firefox 99 breaks VAAPI

https://github.com/archlinux/svntogit-p … a5cba4e182

Looks like ff 99 was build against ffmpeg 5 , not ffmpeg 4.4 as ff 97 and 98 were.

Maybe someone is willing to test if building against ffmpeg4.4 works better ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2022-04-06 20:21:21

aesteve
Member
Registered: 2022-04-06
Posts: 2

Re: [SOLVED] Firefox 99 breaks VAAPI

Lone_Wolf wrote:

https://github.com/archlinux/svntogit-p … a5cba4e182

Looks like ff 99 was build against ffmpeg 5 , not ffmpeg 4.4 as ff 97 and 98 were.

Maybe someone is willing to test if building against ffmpeg4.4 works better ?

I have not recompiled it, but I forced it to link against ffmpeg 4.4 isntead of 5. After upgrading again to firefox 99, I found this workaround:

cd /usr/lib/firefox
sudo ln -s /usr/lib/libavdevice.so.58 libavdevice.so.59
sudo ln -s /usr/lib/libavfilter.so.7 libavfilter.so.8
sudo ln -s /usr/lib/libavformat.so.58 libavformat.so.59
sudo ln -s /usr/lib/libavutil.so.56 libavutil.so.5

And it works again, I have video acceleration working in ff 99. Of course, this is a crude workaround, I don't recommend doing this, but at least this should only affect firefox and not any other program in your system.
I guess then it was some mistake of the arch maintainer? Maybe we could report this bug somewhere?

Offline

#8 2022-04-06 20:30:44

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [SOLVED] Firefox 99 breaks VAAPI

This works for me again for h264, even with MOZ_DISABLE_RDD_SANDBOX=0. However, I saw this:

[RDD 16666: MediaPDecoder #2]: D/PlatformDecoderModule   failed to create texture over DMABuf memory!

which ends here: https://bugzilla.mozilla.org/show_bug.cgi?id=1751363

Regarding FFMPEG, I got this, but could not find more about the second message (setting MOZ_DISABLE_RDD_SANDBOX=1 doesn't matter):

[...]
[RDD 16666: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG:   VA-API FFmpeg init successful
[...]
[RDD 16666: MediaSupervisor #1]: D/PlatformDecoderModule FFMPEG: VAAPI is disabled by parent decoder module.
[...]

See also: https://bbs.archlinux.org/viewtopic.php … 1#p2027201

I'm not sure if it's accelerated now or not. Anyone knows more?

Edit: Untouched FF99

Last edited by Tarqi (2022-04-07 09:17:37)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#9 2022-04-07 00:45:42

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 507

Re: [SOLVED] Firefox 99 breaks VAAPI

From what I have experienced, Firefox v99 from Flatpak with MOZ_DISABLE_RDD_SANDBOX=1 can use VAAPI for h264 but not for VP9. Checked with "cat /sys/kernel/debug/dri/0/amdgpu_pm_info".

Offline

#10 2022-04-08 15:05:21

Dante777
Member
From: Greece
Registered: 2016-07-12
Posts: 31

Re: [SOLVED] Firefox 99 breaks VAAPI

Update:
Video Acceleration (vp9) is working again!
Running Firefox on KDE Plasma, natively on Wayland, on an Intel UHD 620 chip, with a working "intel-media-driver" package.
I set up Firefox v.99 from scratch, with JUST this one flag set (nothing else) :

about:config

media.ffmpeg.vaapi.enabled
true

and the following env variables at execution :

MOZ_DISABLE_RDD_SANDBOX=1 MOZ_ENABLE_WAYLAND=1

Edit: Defining video format for V.A.

Last edited by Dante777 (2022-04-08 15:10:55)

Offline

#11 2022-04-09 21:45:35

davidx
Member
Registered: 2016-07-19
Posts: 6

Re: [SOLVED] Firefox 99 breaks VAAPI

i downgraded firefox, had to make a new ff profile. now i updated firefox again and no more issues. maybe delete your profile and start a new one if you still have issues? idk it must have done something here.

Offline

#12 2022-04-09 22:54:19

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: [SOLVED] Firefox 99 breaks VAAPI

Tarqi wrote:

This works for me again for h264, even with MOZ_DISABLE_RDD_SANDBOX=0. However, I saw this:

[RDD 16666: MediaPDecoder #2]: D/PlatformDecoderModule   failed to create texture over DMABuf memory!

which ends here: https://bugzilla.mozilla.org/show_bug.cgi?id=1751363

Regarding FFMPEG, I got this, but could not find more about the second message (setting MOZ_DISABLE_RDD_SANDBOX=1 doesn't matter):

[...]
[RDD 16666: MediaPDecoder #1]: D/PlatformDecoderModule FFMPEG:   VA-API FFmpeg init successful
[...]
[RDD 16666: MediaSupervisor #1]: D/PlatformDecoderModule FFMPEG: VAAPI is disabled by parent decoder module.
[...]

See also: https://bbs.archlinux.org/viewtopic.php … 1#p2027201

I'm not sure if it's accelerated now or not. Anyone knows more?

Edit: Untouched FF99

I see the same output from Firefox 99. It is not accelerated. It doesn't matter if MOZ_DISABLE_RDD_SANDBOX is set to 1 or 0.


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#13 2022-04-27 11:20:52

michelesr
Member
Registered: 2016-02-04
Posts: 67

Re: [SOLVED] Firefox 99 breaks VAAPI

Is this really solved? I get the same message:

[RDD 581: MediaSupervisor #1]: D/PlatformDecoderModule FFMPEG: VAAPI is disabled by parent decoder module.

And can't see any GPU video decoding load with "sudo intel_gpu_top", meaning video decoding is not accelerated.

Offline

#14 2022-04-27 13:16:06

progandy
Member
Registered: 2012-05-17
Posts: 5,266

Re: [SOLVED] Firefox 99 breaks VAAPI

The solution is to downgrade to FF98 or wait for FF100 / use the developer edition for now.

I was somehow able to get hardware decoding for youtube with FF98, but most other videos simply do not play. I use the developer edition or mpv/yt-dlp for those.

Last edited by progandy (2022-04-27 13:17:53)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#15 2022-05-03 18:55:01

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: [SOLVED] Firefox 99 breaks VAAPI

It is unusable with Firefox 100.
Logs show:

[Child 3689, MediaDecoderStateMachine #1] WARNING: Decoder=7f61a16cd400 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005): file /build/firefox/src/firefox-100.0/dom/media/MediaDecoderStateMachine.cpp:3577
[Child 3689, MediaDecoderStateMachine #1] WARNING: Decoder=7f61a16cd400 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005): file /build/firefox/src/firefox-100.0/dom/media/MediaDecoderStateMachine.cpp:3577

and it segfaults:

[Tue May  3 20:48:08 2022] MediaPD~oder #3[3920]: segfault at 18 ip 00007f9a93fe727d sp 00007f9a882ba260 error 4 in libavutil.so.57.17.100[7f9a93fc9000+72000]
[Tue May  3 20:48:08 2022] Code: fa 55 ba 01 00 00 00 48 89 fd 53 48 83 ec 18 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 48 8b 47 18 89 74 24 04 48 8d 74 24 04 <48> 8b 40 18 48 8b 38 ff 15 86 7b 07 00 85 c0 75 1a 48 8b 44 24 08
[Tue May  3 20:48:28 2022] traps: MediaPD~oder #2[3938] general protection fault ip:7f72f29af27d sp:7f72e6cf44a0 error:0 in libavutil.so.57.17.100[7f72f2991000+72000]
[Tue May  3 20:49:00 2022] traps: MediaPD~oder #1[3977] general protection fault ip:7fbceeeb727d sp:7fbce32014a0 error:0 in libavutil.so.57.17.100[7fbceee99000+72000]
[Tue May  3 20:49:16 2022] traps: MediaPD~oder #1[4074] general protection fault ip:7f9c24c4527d sp:7f9c190104a0 error:0 in libavutil.so.57.17.100[7f9c24c27000+72000]
[Tue May  3 20:49:28 2022] MediaPD~oder #2[4144]: segfault at 18 ip 00007fd26686427d sp 00007fd25aba94a0 error 4 in libavutil.so.57.17.100[7fd266846000+72000]
[Tue May  3 20:49:28 2022] Code: fa 55 ba 01 00 00 00 48 89 fd 53 48 83 ec 18 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 48 8b 47 18 89 74 24 04 48 8d 74 24 04 <48> 8b 40 18 48 8b 38 ff 15 86 7b 07 00 85 c0 75 1a 48 8b 44 24 08
[Tue May  3 20:49:58 2022] traps: MediaPD~oder #2[4166] general protection fault ip:7f7babc6427d sp:7f7b9ffae4a0 error:0 in libavutil.so.57.17.100[7f7babc46000+72000]
[Tue May  3 20:50:04 2022] MediaPD~oder #1[4210]: segfault at 0 ip 00007fe5583fe281 sp 00007fe54bdb14a0 error 4 in libavutil.so.57.17.100[7fe5583e0000+72000]
[Tue May  3 20:50:04 2022] Code: 00 00 00 48 89 fd 53 48 83 ec 18 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 48 8b 47 18 89 74 24 04 48 8d 74 24 04 48 8b 40 18 <48> 8b 38 ff 15 86 7b 07 00 85 c0 75 1a 48 8b 44 24 08 64 48 2b 04
$ coredumpctl 
TIME                          PID  UID  GID SIG     COREFILE EXE                      SIZE
Tue 2022-05-03 20:48:08 CEST 3798 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:48:28 CEST 3930 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:49:01 CEST 3967 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:49:16 CEST 3999 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:49:28 CEST 4123 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:49:59 CEST 4158 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a
Tue 2022-05-03 20:50:05 CEST 4190 1000 1000 SIGSEGV none     /usr/lib/firefox/firefox  n/a

Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#16 2022-05-03 21:10:22

progandy
Member
Registered: 2012-05-17
Posts: 5,266

Re: [SOLVED] Firefox 99 breaks VAAPI

Sometimes the decoder crashes, but reloading the video usually fixes it for me. (Intel Kabylake (Gen9) / HD Graphics 630 rev 04) I guess those crashes would be worth a bug report if you can't find one that matches. (You'd have to confirm it is still crashing in the nightly, though)

Last edited by progandy (2022-05-03 21:11:15)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#17 2022-05-16 18:21:05

queuecumber
Member
Registered: 2022-05-16
Posts: 1

Re: [SOLVED] Firefox 99 breaks VAAPI

I'm getting this exact same behavior on firefox developer 101.0b7 specifically the error message:

[RDD 16666: MediaPDecoder #2]: D/PlatformDecoderModule   failed to create texture over DMABuf memory!

which then seems to cause

[RDD 581: MediaSupervisor #1]: D/PlatformDecoderModule FFMPEG: VAAPI is disabled by parent decoder module.

not sure what other information I can provide other than whatever it is doesn't seem to be fixed

Offline

#18 2022-06-08 17:32:32

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Firefox 99 breaks VAAPI

I was still having this issue on Firefox 101, but changing media.rdd-process.enabled from false to true in about:config seemed to fix it for me. This is while still using MOZ_DISABLE_RDD_SANDBOX=1.

Offline

#19 2022-06-08 17:44:28

progandy
Member
Registered: 2012-05-17
Posts: 5,266

Re: [SOLVED] Firefox 99 breaks VAAPI

ooo wrote:

I was still having this issue on Firefox 101, but changing media.rdd-process.enabled from false to true in about:config seemed to fix it for me. This is while still using MOZ_DISABLE_RDD_SANDBOX=1.

That is normal. the rdd-process is now required for vaapi decoding. the sandbox should be fixed in version 102 (DRI_PRIME might be broken in 102, though)
https://wiki.archlinux.org/title/Firefo … celeration

Last edited by progandy (2022-06-08 17:45:17)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#20 2022-06-10 11:28:39

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,423

Re: [SOLVED] Firefox 99 breaks VAAPI

I installed firefox 101.0.1 from repos today, but it still refuses to use vaapi.
Tried with and without MOZ_DISABLE_RDD_SANDBOX=1, with vp9 and avc1.
I'm on xorg and media.ffmpeg.vaapi.enabled is enabled as well as rdd-ffmpeg.

Started with MOZ_LOG="PlatformDecoderModule:5" it doesn't even to try to use vaapi:
http://0x0.st/oMUS.txt
http://0x0.st/oMUQ.txt

Last edited by kokoko3k (2022-06-10 11:33:14)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#21 2022-06-19 18:08:29

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,423

Re: [SOLVED] Firefox 99 breaks VAAPI

And my problem was that webrender was falling back in software implementation.
Forcing it made vaapi work, but only with MOZ_DISABLE_RDD_SANDBOX=1.

Ps: I forgot to check the moon phase!

Last edited by kokoko3k (2022-06-19 18:09:28)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#22 2022-09-07 08:31:15

tigerjack
Member
Registered: 2017-08-20
Posts: 76

Re: [SOLVED] Firefox 99 breaks VAAPI

I am on Firefox 104.0.2 (64-bit) and I still have to pass the `MOZ_DISABLE_RDD_SANDBOX=1` for the hardware acceleration to work.

Offline

#23 2022-09-13 11:04:24

tigerjack
Member
Registered: 2017-08-20
Posts: 76

Re: [SOLVED] Firefox 99 breaks VAAPI

tigerjack wrote:

I am on Firefox 104.0.2 (64-bit) and I still have to pass the MOZ_DISABLE_RDD_SANDBOX=1 for the hardware acceleration to work.

I'm on Sway and I was able to use Intel GPU with no flags (except for the MOZ_ENABLE_WAYLAND=1) by modifying a few options in `about:config`


  • media.ffmpeg.vaapi.enabled    true

  • gfx.webrender.enabled and gfx.webrender.all  true

  • layers.acceleration.force-enabled  true

The last two were taken here

Offline

Board footer

Powered by FluxBB