Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vaInitialize failed with error code -1 #809

Open
Jorman opened this issue Apr 20, 2024 · 3 comments
Open

vaInitialize failed with error code -1 #809

Jorman opened this issue Apr 20, 2024 · 3 comments

Comments

@Jorman
Copy link

Jorman commented Apr 20, 2024

Hi,

I've spent the last few hours trying to configure hw acceleration on my server but can't seem to get a breakthrough.
I apologize in advance if this isn't a libva issue, but I "think" I installed the right drivers but still can't get things to work, ok I'm not that experienced, but from memory in the past with another system I had succeeded.
Okay, so I have a server with two video cards, one integrated and one added, to be precise I have:
OS -> Debian 12
iGPU -> Intel UHD Graphics 630 integrated with the i5-10400 processor
Esternal GPU -> 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10de:1f82] (rev a1)

I then installed intel-media-va-driver-non-free and nvidia-driver.
For the iGPU I am pretty sure of the drivers, while for the nvidia card, I find my card among both the nouveau and newer drivers, but I've installed the new one like the nvidia-detect advises

nvidia-detect
Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10de:1f82] (rev a1)

Checking card:  NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)
Your card is supported by all driver versions.
Your card is also supported by the Tesla 470 drivers series.
It is recommended to install the
    nvidia-driver
package.

I rebooted the system but every time I run vainfo this is the output

vainfo
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Searching the net I saw that it is possible to run vainfo only for a particular board, so I tried but the result is always the same

ll /dev/dri
totale 0
drwxr-xr-x 2 root root         80 20 apr 20.30 by-path
crw-rw---- 1 root video  226,   0 20 apr 20.30 card0
crw-rw---- 1 root render 226, 128 20 apr 20.30 renderD128
vainfo --display drm --device /dev/dri/renderD128
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
vainfo --display drm --device /dev/dri/card0
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Also according to intel the iGPU is not installed/detected

intel_gpu_top
No device filter specified and no discrete/integrated i915 devices found

I am at a loss as to what to try next to get it all working.
The end goal is to have both video cards working and use them at "will" in the various dockers installed on the server, obviously the server is headless

Does anyone have any suggestions on how to proceed?

Thanks

J

@XinfengZhang
Copy link
Contributor

looks you disabled iGPU from intel, please help to check bios setting firstly.
then make sure you installed i915 .

@Jorman
Copy link
Author

Jorman commented May 24, 2024

@XinfengZhang
Yes it was, I just updated the bios and activated both, the iGPU and the nVidia GPU, because this configuration have also one external GPU, the funny is that now I can see both GPU with nvtop and programs can use it, but the commands in the first topic still not working
I think I've installed too many packages, before discover that it was one bios option that had disabled the iGPU because a real GPU was installed. I don't know if removing some useless package can be a good idea

@mirh
Copy link

mirh commented May 25, 2024

Libva cannot open nvidia_drv_video.so because there's no such file to begin with out of the box, they only support VDPAU and NVDEC. You have to install nvidia-vaapi-driver or vdpau-va-driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants