You are not logged in.

#1 2021-01-20 14:01:45

DAC324
Member
Registered: 2020-03-12
Posts: 80

Firefox | XFCE | Nvidia | VDPAU | Hardware Video Acceleration

Hello all,

is it anyhow possible to get hardware accelerated video playback to work in Firefox in a system with the Nvidia 390 proprietary driver?

To be clear:

- No Intel/Nvidia hybrid system
- No Intel onboard solution

Just a plain Nvidia GeForce GTX 550 Ti - nothing else.

I already applied all the tweaks according to https://wiki.archlinux.org/index.php/Ha … celeration.

System environment set according to the ArchWiki:

LIBVA_DRIVER_NAME=vdpau
VDPAU_DRIVER=nvidia

Drivers installed:

local/lib32-libva-vdpau-driver 0.7.4-6
    VDPAU backend for VA API (32-bit)
local/lib32-libvdpau 1.4-1
    Nvidia VDPAU library
local/lib32-mesa-vdpau 20.3.3-1
    Mesa VDPAU drivers (32-bit)
local/libva-vdpau-driver-chromium 0.7.4-8
    VDPAU backend for VA API. (special version for chromium)
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/mesa-vdpau 20.3.3-1
    Mesa VDPAU drivers
local/vdpauinfo 1.4-1
    Command line utility for querying the capabilities of a VDPAU device

VAinfo:

vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG4Simple            :	VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD

VDPAUinfo:

display: :0.0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  390.141  Mon Dec 28 16:13:07 UTC 2020

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12 
422     4096  4096  UYVY YUYV 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0  8192  2048  2048
MPEG2_SIMPLE                    3  8192  2048  2048
MPEG2_MAIN                      3  8192  2048  2048
H264_BASELINE                  41  8192  2048  2048
H264_MAIN                      41  8192  2048  2048
H264_HIGH                      41  8192  2048  2048
VC1_SIMPLE                      1  8190  2048  2048
VC1_MAIN                        2  8190  2048  2048
VC1_ADVANCED                    4  8190  2048  2048
MPEG4_PART2_SP                  3  8192  2048  2048
MPEG4_PART2_ASP                 5  8192  2048  2048
DIVX4_QMOBILE                   0  8192  2048  2048
DIVX4_MOBILE                    0  8192  2048  2048
DIVX4_HOME_THEATER              0  8192  2048  2048
DIVX4_HD_1080P                  0  8192  2048  2048
DIVX5_QMOBILE                   0  8192  2048  2048
DIVX5_MOBILE                    0  8192  2048  2048
DIVX5_HOME_THEATER              0  8192  2048  2048
DIVX5_HD_1080P                  0  8192  2048  2048
H264_CONSTRAINED_BASELINE      41  8192  2048  2048
H264_EXTENDED                  41  8192  2048  2048
H264_PROGRESSIVE_HIGH          41  8192  2048  2048
H264_CONSTRAINED_HIGH          41  8192  2048  2048
H264_HIGH_444_PREDICTIVE       41  8192  2048  2048
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 
R10G10B10A2      16384 16384    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     y
INVERSE_TELECINE                 y
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y         1     4096
VIDEO_SURFACE_HEIGHT             y         1     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  

Verified default driver names:

[     4.537] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia

Mozilla environment variables set:

MOZ_X11_EGL=1
MOZ_ACCELERATED=1
MOZ_WEBRENDER=1

Firefox Nightly is installed from AUR:

local/firefox-nightly-de 86.0a1.20201223-1
    Standalone Web Browser from Mozilla — Nightly build (de-DE)

Firefox about:config options set:

gfx.canvas.azure.accelerated    true
gfx.canvas.azure.backends   skia
gfx.content.azure.backends  skia
gfx.webrender.all   true
gfx.webrender.enabled   true
gfx.webrender.layers-free   true
gfx.webrendest.enabled  true
gfx.webrender.blob-images true
gfx.xrender.enabled true

layers.async-pan-zoom.enabled false
layers.accelerate-all   true
layers.acceleration.force-enabled   true
layers.force-active true

webgl.force-enabled true
webgl.msaa-force    true
layers.acceleration.force-enabled true
layers.gpu-process.enabled true
layers.gpu-process.force-enabled false

media.ffmpeg.vaapi.enabled true
media.ffmpeg.vaapi-drm-display.enabled true
media.ffmpeg.dmabuf-textures.enabled true
media.ffvpx.enabled false

Firefox Graphics:

Compositing: WebRender

HW_COMPOSITING: 
available by default
force_enabled by user: Force-enabled by pref

OPENGL_COMPOSITING:
available by default
force_enabled by user: Force-enabled by pref

GPU_PROCESS:
disabled by default: Disabled by default
available by user: Enabled via layers.gpu-process.enabled

WEBRENDER:
available by default
force_enabled by user: Force enabled by envvar
disabled by env: Not qualified

WEBRENDER_QUALIFIED:
available by default
blocklisted by env: No qualified hardware

WEBRENDER_COMPOSITOR:
disabled by default: Disabled by default
available by user: Enabled via gfx.webrender.compositor

WEBRENDER_PARTIAL:
available by default

WEBRENDER_ANGLE:
available by default
unavailable by env: OS not supported

WEBRENDER_DCOMP_PRESENT:
available by default
disabled by user: User disabled via pref
unavailable by env: Requires Windows 10 or later
unavailable by runtime: Requires ANGLE

WEBRENDER_SOFTWARE:
available by default
disabled by user: User force-enabled full WR

OMTP:
available by default

WEBGPU:
disabled by default: Disabled by default
available by user: Enabled via dom.webgpu.enabled

Firefox modified settings:

gfx.blacklist.layers.opengl.failureid: FEATURE_FAILURE_SOFTWARE_GL
gfx.canvas.azure.accelerated: true
gfx.color_management.enablev4: true
gfx.color_management.mode: 1
gfx.font_rendering.cleartype_params.rendering_mode: 5
gfx.font_rendering.fontconfig.max_generic_substitutions: 127
gfx.webrender.all: true
gfx.webrender.compositor: true
gfx.webrender.enabled: true
gfx.webrender.quality.force-disable-sacrificing-subpixel-aa: true
gfx.webrendest.enabled: true
layers.accelerate-all: true
layers.acceleration.force-enabled: true
layers.async-pan-zoom.enabled: false
layers.force-active: true
layers.gpu-process.enabled: true
layout.css.dpi: 96
media.ffmpeg.dmabuf-textures.enabled: true
media.ffmpeg.vaapi.enabled: true
media.ffvpx.enabled: false
media.gmp-gmpopenh264.abi: x86_64-gcc3
media.gmp-gmpopenh264.lastUpdate: 1584952229
media.gmp-gmpopenh264.version: 1.8.1.1
media.gmp-manager.buildID: 20201223092736
media.gmp-manager.lastCheck: 1610896758
media.gmp.storage.version.observed: 1
media.gpu-process-decoder: true

If I start firefox-nightly with MOZ_LOG=PlatformDecoderModule:5, I get the following log while trying to play a video from https://tekeye.uk/html/html5-video-test-page :

[Child 17734: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 17734: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox GPU decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox RDD decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox GPU decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 17734: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox RDD decoder rejects requested type
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox GPU decoder rejects requested type
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder rejects requested type
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox GPU decoder rejects requested type
[Child 17734: MediaPDecoder #1]: D/PlatformDecoderModule Initialising FFmpeg decoder.
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 17734: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder rejects requested type
[Child 17734: MediaPDecoder #2]: D/PlatformDecoderModule Initialising VA-API FFmpeg decoder
[Child 17734: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful.
[Child 17734: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[0x7fecec16e420] ::PrepareTrimmers: sample[0,23219] no trimming information
[Child 17734: MediaPDecoder #3]: D/PlatformDecoderModule AudioTrimmer[0x7fecec16e420] ::HandleDecodedResult: sample[0,23219] (decoded[0,23219] no trimming needed

Right after that, the Firefox tab with the video in it crashes, and it asks me to file a crash report.

At a first glance, it looks like Firefox is initializing the FFmpeg VA-API decoder which apparently fails for firefox on the VDPAU configuration described above.

Remark: Hardware acceleration in chromium and mpv works without errors, as does ffmpeg with --hwaccel=vdpau.

Does anybody know what is missing in order to get Firefox working?

Offline

Board footer

Powered by FluxBB