intel / libva

Libva is an implementation for VA-API (Video Acceleration API)
http://intel.github.io/libva/
Other
663 stars 302 forks source link

[vaapi] libva: vaGetDriverNames() failed with unknown libva error #807

Open Quaxo76 opened 7 months ago

Quaxo76 commented 7 months ago

I just assembled a new computer with nVidia RTX 3090 GPU. The operating system is Kubuntu 23.10. I installed the official nVidia drivers (535.161.07), as other more recent versions give different issues. I noticed that raytracing wasn't working correctly so I downloaded a raytrace demo ("Relic of Life" from GPUScore). When trying to start it, I would get the error libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) After following some tips online, I did the following:

sudo add-apt-repository ppa:ubuntuhandbook1/nvidia-vaapi
sudo apt update
sudo apt install nvidia-vaapi-driver
sudo apt install vainfo
export NVD_BACKEND=direct
export LIBVA_DRIVER_NAME=nvidia

Now vainfo reports this:

libva info: VA-API version 1.19.0
libva info: User environment variable requested driver ‘nvidia’
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.19 (libva 2.12.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
VAProfileHEVCMain : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointVLD

Now the error above is not displayed, but raytracing still does not work, and now when I try to watch a hardware-accelerated video with the command: mpv --hwdec=vaapi /path/to/file.mp4 the video plays, but without hardware acceleration, and I get another libva error:

 (+) Video --vid=1 (*) (h264 2560x1440 60.000fps)
[vaapi] libva: vaGetDriverNames() failed with unknown libva error
VO: [gpu] 2560x1440 yuv420p
V: 00:00:00 / 00:01:51 (0%)
(process:6506): GLib-GIO-CRITICAL **: 18:52:24.808: g_dbus_connection_emit_signal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

So basically I get no raytracing and no hardware accelerated video playing (plus other issues that may not be related).

I tried reverting to the official version of nvidia-vaapi-driver (the one included in the Ubnutu repositories) and now when running vainfo, I get:

libva info: VA-API version 1.19.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns 1
vaInitialize failed with error code 1 (operation failed),exit
XinfengZhang commented 7 months ago

suppose the issue related with https://github.com/elFarto/nvidia-vaapi-driver?