You are not logged in.

#1 2024-11-09 23:03:00

Crook3835
Member
Registered: 2024-10-20
Posts: 9

VA-API Hardware Acceleration Not Working

I followed the steps in https://wiki.archlinux.org/title/Hardwa … celeration
Installed the needed packages, used the direct backend and set the enviroment variables but despite that I keep getting the following output when I use vainfo

Trying display: wayland
vaInitialize failed with error code -1 (unknown libva error),exit

Offline

#2 2024-11-11 00:13:13

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

Re: VA-API Hardware Acceleration Not Working

You said you did things you didn't say which things you did and how. What did you setup exactly, what hardware do you have exactly and where and how did you set "environment variables"? What's the output of

printenv

Last edited by V1del (2024-11-11 14:27:18)

Offline

#3 2024-11-11 12:44:05

Crook3835
Member
Registered: 2024-10-20
Posts: 9

Re: VA-API Hardware Acceleration Not Working

V1del wrote:

what hardware do you have exactly and where and how did you seed "environment variables"?

I have an NVIDIA RTX 3050 and a Ryzen 5, I added the enviroment variables to .zshrc

V1del wrote:

What's the output of

printenv
 LANG=en_US.UTF-8
QT_IM_MODULE=fcitx
SHELL=/bin/zsh
VDPAU_DRIVER=nvidia
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
DESKTOP_SESSION=gnome
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
MOTD_SHOWN=pam
SESSION_MANAGER=local/archlinux:@/tmp/.ICE-unix/1521,unix/archlinux:/tmp/.ICE-unix/1521
SHLVL=1
XDG_CURRENT_DESKTOP=GNOME
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
MANAGERPID=1403
INVOCATION_ID=3bb98ec201124e248d7f36a33b4b8595
JOURNAL_STREAM=9:14253
SYSTEMD_EXEC_PID=1548
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.Shell@wayland.service/memory.pressure
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_SETUP_DISPLAY=:1
DISPLAY=:0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.CEXEX2
WAYLAND_DISPLAY=wayland-0
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/kitty.desktop
DESKTOP_STARTUP_ID=gnome-shell/kitty/1548-4-archlinux_TIME748391
GIO_LAUNCHED_DESKTOP_FILE_PID=14614
KITTY_WINDOW_ID=1
TERM=xterm-kitty
COLORTERM=truecolor
KITTY_PID=14614
KITTY_PUBLIC_KEY=1:&4)EroI$eUfjRr0Nm~wfhrtHuUYZIWh#r+%$*K?m
TERMINFO=/usr/lib/kitty/terminfo
KITTY_INSTALLATION_DIR=/usr/lib/kitty
PS1=%{%}[%{%}%n%{%}@%{%}%m %{%}%1~%{%}] %{%}%% 
LIBVA_DRIVER_NAME=vdpau
NVD_BACKEND=direct

Last edited by Crook3835 (2024-11-11 12:46:55)

Offline

#4 2024-11-11 13:15:33

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

Re: VA-API Hardware Acceleration Not Working

LIBVA_DRIVER_NAME=vdpau

With recent cards NVDEC usually works better, try LIBVA_DRIVER_NAME=nvidia .


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

#5 2024-11-11 13:46:00

Crook3835
Member
Registered: 2024-10-20
Posts: 9

Re: VA-API Hardware Acceleration Not Working

Lone_Wolf wrote:
LIBVA_DRIVER_NAME=vdpau

With recent cards NVDEC usually works better, try LIBVA_DRIVER_NAME=nvidia .

Did that, now it says this

 Trying display: wayland
libva error: /usr/lib/dri/nvidia_drv_video.so init failed
vaInitialize failed with error code 1 (operation failed),exit

Offline

#6 2024-11-11 14:42:53

seth
Member
Registered: 2012-09-03
Posts: 58,995

Re: VA-API Hardware Acceleration Not Working

Sanity checks:

pacman -Qs libva

2. Why are you looking for VAAPI? You basically want to use VDPAU whenever you can, not a https://wiki.archlinux.org/title/Hardwa … ion_layers

Online

#7 2024-11-11 16:03:39

Crook3835
Member
Registered: 2024-10-20
Posts: 9

Re: VA-API Hardware Acceleration Not Working

seth wrote:

Sanity checks:

pacman -Qs libva

Here it is:

 local/lib32-libva 2.22.0-1
    Video Acceleration (VA) API for Linux (32-bit)
local/libva 2.22.0-1
    Video Acceleration (VA) API for Linux
local/libva-mesa-driver 1:24.2.6-1
    Open-source VA-API drivers
local/libva-nvidia-driver 0.0.13-1
    VA-API implementation that uses NVDEC as a backend
local/libva-utils 2.22.0-1
    Intel VA-API Media Applications and Scripts for libva
seth wrote:

2. Why are you looking for VAAPI? You basically want to use VDPAU whenever you can, not a https://wiki.archlinux.org/title/Hardwa … ion_layers

As far as I know, vdpau doesn't work on firefox. Correct me if I'm wrong

Offline

#8 2024-11-11 16:10:57

seth
Member
Registered: 2012-09-03
Posts: 58,995

Re: VA-API Hardware Acceleration Not Working

libva-vdpau-driver isn't even intalled, explaining the original error

Next sanity check, are you even running on the nvidia GPU?

glxinfo -B

Edit: video acceleration in browsers is a contant PITA anyways, but will require vaapi, yes.

Last edited by seth (2024-11-11 16:11:52)

Online

#9 2024-11-11 16:43:30

Crook3835
Member
Registered: 2024-10-20
Posts: 9

Re: VA-API Hardware Acceleration Not Working

seth wrote:

libva-vdpau-driver isn't even intalled, explaining the original error

Done.
It gave a core dump error but I removed the LIBVA_DRIVER_NAME variable and now it works....running on the AMD iGPU
There goes my sanity

Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.2.6-arch1.1 for AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.8, DRM 3.59, 6.11.6-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

Edit: it doesn't work with the nvidia card when I specify it on Wayland (displays the error below), on X11 it works

libva error: /usr/lib/dri/nvidia_drv_video.so init failed

Last edited by Crook3835 (2024-11-11 19:03:42)

Offline

#10 2024-11-11 20:11:00

seth
Member
Registered: 2012-09-03
Posts: 58,995

Re: VA-API Hardware Acceleration Not Working

https://wiki.archlinux.org/title/PRIME# … figuration
You can also just use prime-run from the nvidia-prime package but it's very unlikely that you actually want to do that at all.

Why are you trying to run video decoding on the nvidia GPU when the display server runs on the APU?
Unless nvidia supports some codec your APU does not, there's probably only downsides with that.

Online

Board footer

Powered by FluxBB