You are not logged in.

#1 2022-11-18 20:05:17

enbQao
Member
Registered: 2018-05-10
Posts: 17

[SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

Hi there,

I am trying to figure out why Firefox hardware acceleration is "Blocklisted by gfxInfo".
HW acceleration in general works through force-enabling it, but it drives me nuts not knowing why it is not enabled out of the box. I thought I had everything configured properly, but appereantly, I am missing something.

Relevant system information:
* Ryzen 5500U
* Sway window manager

I have
* installed all the suggested drivers (mesa, libva, libva-mesa-driver, libva-utils)
* set the driver via LIBVA_DRIVER_NAME=radeonsi
* set XDG_CURRENT_DESKTOP=sway

I am running Firefox with WebRender enabled under Wayland (both out of the box without explicit configuration and verified through the corresponding entries in about:support).
Also, I have tried digging through https://searchfox.org/mozilla-release/s … tk.cpp#230 to see if I can gain any information on why my setup would be blocklisted, but I could not find anything that could give me a hint about whats blocking it. Additionally, I tried starting Firefox using MOZ_LOG="PlatformDecoderModule:5", but this did not lead to any clues either.

What might I be missing here and why is hardware acceleration still "blocklisted by env: Blocklisted by gfxInfo"?

(and just to clarify: I am NOT trying to get hardware acceleration to work, it works when I force-enable it. I want to find out why it is not enabled by default / out of the box, even though I thought I configured everything properly)

Last edited by enbQao (2022-12-04 09:52:15)

Offline

#2 2022-11-19 22:05:44

xerxes_
Member
Registered: 2018-04-29
Posts: 505

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

Where exactly do you see that hardware acceleration is "Blocklisted by gfxInfo" ? And can you post output of 'gfxinfo -B' here ?

Offline

#3 2022-11-20 11:57:51

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

xerxes_ wrote:

Where exactly do you see that hardware acceleration is "Blocklisted by gfxInfo" ?

It says so in about:support under "HARDWARE_VIDEO_DECODING".

xerxes_ wrote:

And can you post output of 'gfxinfo -B' here ?

What packages does this command come with? Doing a "pacman -F gfxinfo" does not yield any results, i.e. I do not know which package I would need to install to run this command.

Offline

#4 2022-11-20 12:24:28

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

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

This should be the file responsible for the blocklist entries I think:
https://searchfox.org/mozilla-release/s … fxInfo.cpp

Last edited by progandy (2022-11-20 12:44:50)


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

Offline

#5 2022-11-20 17:46:22

adventurer
Member
Registered: 2014-05-04
Posts: 107

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

I think the correct command should be glxinfo -B.

That said, the output in about:support is the same for me.

Above command gives:

name of display: :1
display: :1  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 530 (SKL GT2) (0x1912)
    Version: 22.2.3
    Accelerated: yes
    Video memory: 15869MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#6 2022-11-20 19:01:14

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

xerxes_ wrote:

And can you post output of 'gfxinfo -B' here ?

adventurer wrote:

I think the correct command should be glxinfo -B.

Thanks! The output I get is

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.48, 6.0.9-arch1-1) (0x164c)
    Version: 22.2.3
    Accelerated: yes
    Video memory: 512MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 164 MB, largest block: 164 MB
    VBO free aux. memory - total: 6770 MB, largest block: 6770 MB
    Texture free memory - total: 164 MB, largest block: 164 MB
    Texture free aux. memory - total: 6770 MB, largest block: 6770 MB
    Renderbuffer free memory - total: 164 MB, largest block: 164 MB
    Renderbuffer free aux. memory - total: 6770 MB, largest block: 6770 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 512 MB
    Total available memory: 8176 MB
    Currently available dedicated video memory: 164 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.48, 6.0.9-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
progandy wrote:

This should be the file responsible for the blocklist entries I think:
https://searchfox.org/mozilla-release/s … fxInfo.cpp

Thank you for the link, I have looked through the file. The only part that would be responsible would be

 ////////////////////////////////////
    // FEATURE_HARDWARE_VIDEO_DECODING
    APPEND_TO_DRIVER_BLOCKLIST_EXT(
        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
        DeviceFamily::All, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
        nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
        V(21, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_MESA",
        "Mesa 21.0.0.0");

    // Disable on all NVIDIA hardware
    APPEND_TO_DRIVER_BLOCKLIST_EXT(
        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All,
        DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
        V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_NVIDIA", "");

    // Disable on all AMD devices not using Mesa.
    APPEND_TO_DRIVER_BLOCKLIST_EXT(
        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
        DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
        V(0, 0, 0, 0), "FEATURE_HARDWARE_VIDEO_DECODING_NO_LINUX_AMD", "");

    // Disable on Release/late Beta
#if !defined(EARLY_BETA_OR_EARLIER)
    APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
                               nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
                               nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
                               DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
                               "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", "");

So the only reasons why hardware acceleration should be blocklisted, according to the code, are:

  • Mesa version below 21.0.0.0 -> not the case, since, as seen above, I am using 22.2.3

  • NVIDIA hardware -> not the case since I don't have NVIDIA hardware

These are clearly not applying. The following two I am not sure about though:

  • AMD devices not using Mesa -> not sure if I am using Mesa correctly, is there a way to check for that?

  • EARLY_BETA_OR_EARLIER -> applies to beta versions and probably nightlies, not having those installed either. In the comment it says "Release" though, I am not sure if this is a mistake. The variable indicates beta and nightlies etc., not release

So the only point that could apply here is the third, AMD devices not using Mesa. To check, this is the output I get from 'glxinfo | grep OpenGL' when I am trying to verify the correct installation according to the arch wiki:

OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.48, 6.0.9-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Is there anything wrong here?

Last edited by enbQao (2022-11-20 19:19:07)

Offline

#7 2022-11-21 18:13:46

xerxes_
Member
Registered: 2018-04-29
Posts: 505

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

I don't see anything wrong in your glxinfo output. I don't know why it is not enabled by default.

What is your vainfo output?

Do you have some errors in about:support in the end of section "Graphics" ?

You may try to force vaapi hardware acceleration in about:config :
media.ffmpeg.vaapi.enabled change to true (you may need to restart browser).

Last edited by xerxes_ (2022-11-21 18:22:25)

Offline

#8 2022-11-22 06:18:53

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

xerxes_ wrote:

What is your vainfo output?

Trying display: wayland
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Mesa Gallium driver 22.2.3 for AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.48, 6.0.9-arch1-1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

Everything looks good here as well, I think.

xerxes_ wrote:

Do you have some errors in about:support in the end of section "Graphics" ?

No, there are no errors there. Just the usual system information/configuration, but nothing that would indicate an error.

Offline

#9 2022-11-22 17:36:24

xerxes_
Member
Registered: 2018-04-29
Posts: 505

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

Yes, everything looks good - there is hardware acceleration. Maybe Firefox have some bug to properly discover hardware acceleration?

Offline

#10 2022-11-24 17:14:49

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

xerxes_ wrote:

Yes, everything looks good - there is hardware acceleration. Maybe Firefox have some bug to properly discover hardware acceleration?

Would you say I should open an issue on the official bugtracker for Firefox?

Offline

#11 2022-11-25 17:14:54

xerxes_
Member
Registered: 2018-04-29
Posts: 505

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

You can try open an issue: maybe we will find out something interesting, or there will be solution...

Offline

#12 2022-12-02 14:46:56

ugeuder
Member
Registered: 2010-05-06
Posts: 4

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

progandy wrote:

This should be the file responsible for the blocklist entries I think:
https://searchfox.org/mozilla-release/s … fxInfo.cpp

Thanks, that link is useful.

If I read the code correctly

    // Disable on Release/late Beta
#if !defined(EARLY_BETA_OR_EARLIER)
    APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
                               nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
                               nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
                               DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
                               "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", "");
#endif

on Linux accelerated video decoding will always be disabled unless you run an early beta (whatever that might be). I have not checked from the source, but I'd assume the Arch package is not an early beta?

Offline

#13 2022-12-03 10:50:01

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

ugeuder wrote:

on Linux accelerated video decoding will always be disabled unless you run an early beta (whatever that might be). I have not checked from the source, but I'd assume the Arch package is not an early beta?

This seems to be a correct assumption given the code, but I just checked something else:
I have another device running Fedora 38. There, hardware acceleration is enabled by default and is NOT "blocklisted by end: Blocklisted by gfxInfo". If it is generally disabled by default for any Linux system, shouldn't that also include this installation of Fedora 38? Or maybe over there they change/overwrite some things when building the package for their repos?

Offline

#14 2022-12-03 14:36:33

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,516

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

Is the fedora device running wayland ?


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#15 2022-12-03 16:30:11

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

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

enbQao wrote:

I have another device running Fedora 38. There, hardware acceleration is enabled by default and is NOT "blocklisted by end: Blocklisted by gfxInfo". If it is generally disabled by default for any Linux system, shouldn't that also include this installation of Fedora 38? Or maybe over there they change/overwrite some things when building the package for their repos?

Fedora is patching that: https://src.fedoraproject.org/rpms/fire … aapi.patch
There are a few more patches as well: https://src.fedoraproject.org/rpms/firefox/tree/main


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

Offline

#16 2022-12-04 09:49:31

enbQao
Member
Registered: 2018-05-10
Posts: 17

Re: [SOLVED] Firefox hw-accel "blocklisted by env: Blocklisted by gfxInfo"

Lone_Wolf wrote:

Is the fedora device running wayland ?

Yes, it does.

progandy wrote:

That explains it, thank you!

I think the original question can then be marked as solved.

SOLUTION:
Firefox disables hardware acceleration by default on Linux, as discovered through

prograndy wrote:

This should be the file responsible for the blocklist entries I think:
https://searchfox.org/mozilla-release/s … fxInfo.cpp

and

ugeuder wrote:

If I read the code correctly

    // Disable on Release/late Beta
#if !defined(EARLY_BETA_OR_EARLIER)
    APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Linux, DeviceFamily::All,
                               nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
                               nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
                               DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
                               "FEATURE_HARDWARE_VIDEO_DECODING_DISABLE", "");
#endif

on Linux accelerated video decoding will always be disabled unless you run an early beta (whatever that might be). I have not checked from the source, but I'd assume the Arch package is not an early beta?

Last edited by enbQao (2022-12-04 09:54:22)

Offline

Board footer

Powered by FluxBB