VA-API/VDPAU translation layers not working properly

I reinstalled Manjaro (KDE) a couple of days ago and noticed something odd. While setting up video acceleration in Firefox, I noticed my graphics cards video decoder wasn’t being used, resulting in stutters and dropped frames during h264-video-playback. Upon closer inspection, I encountered the same issue while using the VA-API instead of VDPAU for decoding in VLC. (Decoding using VDPAU seems to work just fine.) As I’m using a Nvidia card with proprietary drivers, I made sure both libva and the libva-vdpau-driver (VDPAU-based backend for VA-API) are installed.

So far, I’ve followed the hardware video acceleration guide from the Arch-wiki including setting environment variables to no difference. I seems as if the translation layer isn’t doing it’s job properly. Am I missing something?

Here some info on my system and setup:

    ~  inxi -Fza                                                                                               ✔ 
tput: unknown terminal "xterm-256color"
tput: unknown terminal "xterm-256color"
Argument "" isn't numeric in numeric eq (==) at /usr/bin/inxi line 379.
System:
  Kernel: 5.10.7-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=5f402940-9e66-4e9f-94e7-df64cf67496e rw quiet 
  udev.log_priority=3 noapic 
  Desktop: KDE Plasma 5.20.5 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: Gigabyte model: B550 AORUS PRO v: x.x serial: <filter> 
  UEFI: American Megatrends v: F10 date: 09/18/2020 
CPU:
  Info: 8-Core model: AMD Ryzen 7 3800XT bits: 64 type: MT MCP arch: Zen 2 
  family: 17 (23) model-id: 71 (113) stepping: N/A microcode: 8701021 
  L2 cache: 4 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 124618 
  Speed: 2712 MHz min/max: 2200/3900 MHz boost: enabled Core speeds (MHz): 
  1: 2712 2: 2088 3: 2109 4: 2142 5: 3593 6: 2053 7: 2052 8: 2049 9: 2056 
  10: 2093 11: 3593 12: 2072 13: 2052 14: 2053 15: 3003 16: 2132 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  conditional, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA driver: nvidia v: 460.32.03 alternate: nouveau,nvidia_drm 
  bus ID: 0a:00.0 chip ID: 10de:2486 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: nvidia display ID: :0 screens: 1 
  Screen-1: 0 s-res: 4480x1440 s-dpi: 81 s-size: 1405x457mm (55.3x18.0") 
  s-diag: 1477mm (58.2") 
  Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 82 
  size: 598x336mm (23.5x13.2") diag: 686mm (27") 
  Monitor-2: DP-0 res: 2560x1440 dpi: 109 size: 597x336mm (23.5x13.2") 
  diag: 685mm (27") 
  OpenGL: renderer: GeForce RTX 3060 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 460.32.03 
  direct render: Yes 
Audio:
  Device-1: NVIDIA driver: snd_hda_intel v: kernel bus ID: 0a:00.1 
  chip ID: 10de:228b 
  Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte 
  driver: snd_hda_intel v: kernel bus ID: 0c:00.4 chip ID: 1022:1487 
  Device-3: Logitech HD Webcam C510 type: USB driver: snd-usb-audio,uvcvideo 
  bus ID: 1-6.2:4 chip ID: 046d:081d serial: <filter> 
  Sound Server: ALSA v: k5.10.7-3-MANJARO 
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel 
  port: f000 bus ID: 08:00.0 chip ID: 10ec:8125 
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 4.55 TiB used: 511.16 GiB (11.0%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Crucial model: CT1000P5SSD8 
  size: 931.51 GiB block size: physical: 512 B logical: 512 B 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: P4CR311 temp: 42.9 C 
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital 
  model: WD40EZRZ-00GXCB0 size: 3.64 TiB block size: physical: 4096 B 
  logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 0A80 
Partition:
  ID-1: / raw size: 931.01 GiB size: 915.4 GiB (98.32%) 
  used: 258.65 GiB (28.3%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2 
  ID-2: /boot/efi raw size: 512 MiB size: 511 MiB (99.80%) 
  used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: file size: 16 GiB used: 0 KiB (0.0%) priority: -2 
  file: /swapfile 
Sensors:
  System Temperatures: cpu: 54.4 C mobo: N/A gpu: nvidia temp: 45 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:
  Processes: 322 Uptime: 3h 19m wakeups: 0 Memory: 31.37 GiB 
  used: 2.76 GiB (8.8%) Init: systemd v: 247 Compilers: gcc: 10.2.0 
  Packages: 1452 pacman: 1447 lib: 403 flatpak: 0 snap: 5 Shell: Zsh v: 5.8 
  running in: konsole inxi: 3.2.02

On VDPAU using vdpauinfo:

    ~  vdpauinfo                                                                                               ✔ 
display: :0   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  460.32.03  Sun Dec 27 18:50:11 UTC 2020

Video surface:

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

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 65536  4096  4096
MPEG2_SIMPLE                    3 65536  4096  4096
MPEG2_MAIN                      3 65536  4096  4096
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                   1 262144  8192  8192
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                   1 262144  8192  8192
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      153 262144  8192  8192
HEVC_MAIN_10                   153 262144  8192  8192
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   153 262144  8192  8192
HEVC_MAIN_444                  153 262144  8192  8192
HEVC_MAIN_444_10               153 262144  8192  8192
HEVC_MAIN_444_12               153 262144  8192  8192

Output surface:

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

Bitmap surface:

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

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     8192
VIDEO_SURFACE_HEIGHT             y         1     8192
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  

On VA-API using vainfo

    ~  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
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

That’s odd. It’s not displaying the model. I’ve seen reports of the newer drivers not playing so well with some “older” cards lately.

Quite the opposite. It’s an Nvidia RTX 3060 Ti. I actually managed to get it working including proper hardware decoding with VA-API under Manjaro XFCE using the 455 drivers back in early December.