libva icon indicating copy to clipboard operation
libva copied to clipboard

libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

Open 5l1v3r1 opened this issue 3 years ago • 9 comments

Kali 2020.4 kernel 5.8.0 i installed nvidia and disabled nouveau driver with modprobe. nvidia card is 840m, it gives me an error of

1)GPU at BusId 0xa doesn't have a supported video decoder (even with those configs export LIBVA_DRIVER_NAME=vdpau export VDPAU_DRIVER=nvidia)

2)so i decided to use intel haswell driver (my processor is i7-4510u) with those configs

export LIBVA_DRIVER_NAME=i965 export VDPAU_DRIVER=va_gl

result is libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

  1. the last option was to try iHD driver with those configs

export LIBVA_DRIVER_NAME=iHD export VDPAU_DRIVER=va_gl

result is libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed

I know nvidia sucks with linux and so i tried intel drivers for video decoding to decrease cpu usage while watching youtube (i have installed and configurred firefox 82 which supports vp9 etcc and chromium patched version with vp9 support so the problem are not about browsers)

The problem is with intel drivers. I really wanna ask you. Do you really drop the support of video decoding function for cpu's older than 5-7 years? Because there was no error like that before when i force used intel drivers for video decoding. I am on x11 by the way (no wayland). x11 is supposed to be smooth with your drivers as well.

How can i fix this problem or you force me to buy a new laptop with a new cpu ? In turkey economy sucks nowadays thanks to puny dictator erdogan, (1 dollar = 8 turkish liras), and becuase of i cannot afford a new laptop. For the last 3 days i am trying to fix this problem.

5l1v3r1 avatar Oct 11 '20 23:10 5l1v3r1

Ok i followed your method and everything seems in order but the problem is, the default renderer device is nvidia which bounds to /dev/dri/renderD129 and intel integrated card is loaded in kernel but inactive which bounds to /dev/dri/renderD128 My nvidia card is 840m which does not support vpdau or vaapi means cannot decode video streams in firefox, chromium etc.. At some particular programs like ffmpeg and vpainfo etc i can add some env variables to .bashrc like (export LIBVA_DRIVER_NAME=i965 and export VDPAU_DRIVER=va_gl) and can run the program with --display drm --device /dev/dri/renderD128 parameter to take advantage of intel's integrated card's vpdau. But i cannot do the same with patched chromium and new firefox which supports vaapi and vpdau. Do you know how to overcome this issue? I want to force intel card to be used in only chromium and firefox and the rest can be handled by nvidia I do not want to use nvidia-xconfig or bumblebee because they are not stable and screen tearing appears.

5l1v3r1 avatar Oct 16 '20 20:10 5l1v3r1

Ok fixed. you need to specify the node at 20-intel.conf like Option "kmsdev" "/dev/dri/renderD128" now you can force intel gpu to do the video decoding and the rest will be handled by nvidia gpu which is the primay and only one. You don't need bumblebee, primus or optimus etc.. whic is a pain in the ass for linux. And yeah like Linus said once : Fuck you nvidia.

5l1v3r1 avatar Oct 20 '20 20:10 5l1v3r1

@5l1v3r1 My issue that AMD discrete gpu which I have to use is setting under /dev/dri/renderD129, not 128. So bits is completely wrong. I had to use only AMD mesa vaapi, not intel It seems broken by design because libva generally use the same device as graphic output.

RarogCmex avatar Mar 05 '21 16:03 RarogCmex

@RarogCmex So there's still no way to force VAAPI to use the renderD129 with a discrete GPU in a hybrid setup? Have you found any work around so far?

nnuel avatar Dec 23 '21 01:12 nnuel

@nnuel Nope. I don't use this PC anymore :)

RarogCmex avatar Dec 23 '21 09:12 RarogCmex

Alright, I did file a bugreport separately, as I feel this should be able to get working and not some insurmountable showstopper. I will check later when I install sway on my desktop how the situation is there. With that it's easier to disable the iGPU or dGPU because of the various outputs and I can do some better testing.

nnuel avatar Dec 23 '21 09:12 nnuel

from the design, it is not controlled by libva, it is controlled by application, from another perspective, you need env variable or other method to override the original one from application?

XinfengZhang avatar Dec 23 '21 13:12 XinfengZhang

@XinfengZhang Even with the env variable, the vainfo command doesn't give the result it needs to. It only recognizes the intel GPU for the vaapi, it works with vdpau for AMD, but the VAAPI doesn't show up for AMD, despite the driver being installed, and the correct env variables set. If I can't get it to work in vainfo, then it won't work in the application. Which is parsec, in this case, but I mainly want to know how I can always accelerate on the dGPU.

nnuel avatar Dec 23 '21 17:12 nnuel

hi @nnuel , in the vainfo command , you could use --device --display to specify the adaptor. what I said about "env" means that maybe we need new env variables to specify the adaptors , such as VA_DISPLAY_NODE=xxxx, of course, these variable was not implemented currently

XinfengZhang avatar Dec 25 '21 12:12 XinfengZhang