You are not logged in.

#1 2024-11-29 17:03:56

Tuxiy
Member
Registered: 2023-04-29
Posts: 2

VA-API hardware acceleration broken on nvidia

I did everything in https://wiki.archlinux.org/title/Hardwa … ing_VA-API
vainfo shows what it's supposed to say:

Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD

vdpau also seems good to me:

display: :0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  565.57.01  Thu Oct 10 11:55:58 UTC 2024

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12
422     4096  4096  UYVY YUYV
444     4096  4096  NV24 YV24
420_16  4096  4096  P010 P016
422_16  4096  4096  UYVY YUYV
444_16  4096  4096  Y_U_V_444_16

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 65536  4080  4080
MPEG2_SIMPLE                    3 65536  4080  4080
MPEG2_MAIN                      3 65536  4080  4080
H264_BASELINE                  51 65536  4096  4096
H264_MAIN                      51 65536  4096  4096
H264_HIGH                      51 65536  4096  4096
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      51 65536  4096  4096
H264_EXTENDED                  51 65536  4096  4096
H264_PROGRESSIVE_HIGH          51 65536  4096  4096
H264_CONSTRAINED_HIGH          51 65536  4096  4096
H264_HIGH_444_PREDICTIVE       51 65536  4096  4096
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 ---
AV1_MAIN                       --- not supported ---
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- 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

grep -iE 'vdpau | dri driver' .local/share/xorg/Xorg.0.log returns:

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

this is my printenv:

LINENO=1
SHELL=/usr/bin/bash
WINDOWID=8388611
COLORTERM=truecolor
I3SOCK=/run/user/1000/i3/ipc-socket.693
LC_ADDRESS=en_US.UTF-8
LC_NAME=en_US.UTF-8
LIBVA_DRIVER_NAME=nvidia
LC_MONETARY=en_US.UTF-8
XDG_SEAT=seat0
PWD=/home/tuxiy
XDG_SESSION_DESKTOP=i3
LOGNAME=tuxiy
XDG_SESSION_TYPE=x11
SYSTEMD_EXEC_PID=628
XAUTHORITY=/run/user/1000/lyxauth
BLE_SESSION_ID=1732898179.937802/1575
MOTD_SHOWN=pam
HOME=/home/tuxiy
LC_PAPER=en_US.UTF-8
LANG=en_US.UTF-8
XDG_CURRENT_DESKTOP=i3
INVOCATION_ID=2ce8ea1b749a4898be841f340546f1fc
ALACRITTY_SOCKET=/run/user/1000/Alacritty-:0-1568.sock
XDG_SESSION_CLASS=user
TERM=alacritty
LC_IDENTIFICATION=en_US.UTF-8
USER=tuxiy
bleopt_connect_tty=1
DISPLAY=:0
SHLVL=1
_ble_util_fdlist_cloexec=
LC_TELEPHONE=en_US.UTF-8
LC_MESSAGES=C
LC_MEASUREMENT=en_US.UTF-8
XDG_VTNR=2
XDG_SESSION_ID=c1
LC_CTYPE=en_US.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
GTK3_MODULES=xapp-gtk3-module
PATH=/home/tuxiy/.local/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
ALACRITTY_LOG=/tmp/Alacritty-1568.log
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
_ble_util_fdvars_export=
MAIL=/var/spool/mail/tuxiy
ALACRITTY_WINDOW_ID=8388611
LC_NUMERIC=en_US.UTF-8

I have all the necessary packages and everything seems fine. However, hardware acceleration doesn't work on Mercury browser (firefox fork), and not on stremio either.
Firefox complains about a missing /lib/dri/nvidia_drv_video.so, while it is actually present.
Stremio spits out:

[libmpv_render] Loading hwdec driver 'vaapi'
[libmpv_render/vaapi] VAAPI hwdec only works with OpenGL or Vulkan backends.
[libmpv_render] Loading failed.

Any ideas what could be the issue? I've been screwing my brains for the past 3 hours. Btw, sorry for my bad english.

Offline

#2 2024-11-29 17:09:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,310

Re: VA-API hardware acceleration broken on nvidia

browsers are a somewhat special case in any case. Can you check whether it works in a local video player, like mpv or VLC or so?

Offline

#3 2024-11-30 06:29:58

Tuxiy
Member
Registered: 2023-04-29
Posts: 2

Re: VA-API hardware acceleration broken on nvidia

With mpv it kind of works. It spits out an error:

● Video  --vid=1  (h264 640x360 30 fps) [default]
● Audio  --aid=1  (aac 2ch 44100 Hz 96 kbps) [default]
Using hardware decoding (vaapi).
[E] pw.loop [loop.c:69 pw_loop_new()] 0x558fa6bee8c0: can't make support.system handle: No such file or directory
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 640x360 vaapi[nv12]
AV: 00:00:17 / 00:00:20 (87%) A-V:  0.000

running `nvidia-smi dmon` while mpv is playing returns:

# gpu    pwr  gtemp  mtemp     sm    mem    enc    dec    jpg    ofa   mclk   pclk
# Idx      W      C      C      %      %      %      %      %      %    MHz    MHz
    0      -     21      -     18     19      0      0      -      -    405    135
    0      -     21      -     18     19      0      0      -      -    405    135
    0      -     21      -     18     20      0      0      -      -    405    135
    0      -     24      -      8      6      0      7      -      -   2505    993
    0      -     24      -      7      5      0      5      -      -   2505   1124
    0      -     24      -      7      5      0      4      -      -   2505   1124
    0      -     24      -      9      6      0      3      -      -   2505   1124
    0      -     24      -      8      5      0      2      -      -   2505   1124
    0      -     24      -      8      5      0      2      -      -   2505   1124
    0      -     24      -      7      5      0      1      -      -   2505   1124
    0      -     24      -     11      6      0      1      -      -   2505   1124
    0      -     25      -      8      5      0      1      -      -   2505   1124
    0      -     26      -     99     32      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     25      -      7      5      0      1      -      -   2505   1124
    0      -     26      -      7      5      0      1      -      -   2505   1124
    0      -     26      -      7      5      0      1      -      -   2505   1124
    0      -     27      -     99     36      0      1      -      -   2505   1124
    0      -     26      -      3      3      0      0      -      -   2505   1124

Offline

Board footer

Powered by FluxBB