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

libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) #278

Open
lattice0 opened this issue Feb 14, 2019 · 56 comments

Comments

@lattice0
Copy link

lattice0 commented Feb 14, 2019

I'm doing a QT program and I'm getting this error on my Ubuntu (it's a VM):

libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

I tried all possible solutions on web and they didn't work.

I found that export LIBVA_DRIVER_NAME=i965 could work, but with it, I have the following errors:

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

What can be done?

@XinfengZhang
Copy link
Contributor

I havent tried VM before, we need more information, could you help to enable LIBVA_TRACE and attach the report?

@ceyusa
Copy link
Contributor

ceyusa commented Feb 17, 2019

I don't think that any libva's driver was designed to work virtualized.

Perhaps somebody should try to develop a libva's driver that proxies to the call to the host libva's and composite with the virtualized video driver... but it sounds hard

@XinfengZhang
Copy link
Contributor

if the HW is exposed, and can be access, work with i915, I think UMD driver can work with VM. it is transparent for UMD driver. from intel/media-driver#520 some one tried VM with virtual mediated pass-through GPU (Intel GVT-g). it works with i965.

@XinfengZhang
Copy link
Contributor

of course, it also depend on which kind of VM @LucasZanella are using. just support several , such as KVM

@jnqnfe
Copy link

jnqnfe commented Mar 24, 2019

@XinfengZhang

I am experiencing this issue also, and I'm NOT using a VM!

I experience it using VLC both 3.0.x and 4.0-dev

VLC has three plugins for connecting to vaapi: wayland, x11 and drm; wayland and x11 have higher priority and so are tried first before falling back to drm. On my system, the wayland one ends early because the VLC window is not wayland (I don't think wayland support is complete yet); then the x11 one is tried, which experiences the issue reported here and thus fails; it then tries the drm one which works.

the following is the relevant portion of output from VLC trying the x11 one (with LIBVA_TRACE=1):

libva info: Open new log file 1.011659.thd-0x0000028f for the thread 0x0000028f
libva info: LIBVA_TRACE is on, save log into 1.011659.thd-0x0000028f
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

since when VLC tries the drm one it overwrites the trace file, I modified VLC 4.0-dev to deliberately break the drm one to stop it doing so thus I could see what it contained (as you asked for one); unfortunately it only contains this:

[58891.570032][ctx       none]==========va_TraceInitialize
[58891.570073][ctx       none]==========va_TraceTerminate

if I try using LIBVA_DRIVER_NAME=i965 in addition, I get:

libva info: Open new log file 1.012657.thd-0x0000030b for the thread 0x0000030b
libva info: LIBVA_TRACE is on, save log into 1.012657.thd-0x0000030b
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns -1
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1

with the same useless trace

contrastingly the output from the drm based attempt gave the following and works successfully (with just LIBVA_TRACE=1):

libva info: Open new log file 1.013329.thd-0x000007b1 for the thread 0x000007b1
libva info: LIBVA_TRACE is on, save log into 1.013329.thd-0x000007b1
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0

and this with LIBVA_DRIVER_NAME=i965 LIBVA_TRACE=1:

libva info: Open new log file 1.013515.thd-0x000007e8 for the thread 0x000007e8
libva info: LIBVA_TRACE is on, save log into 1.013515.thd-0x000007e8
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0

@roberto68
Copy link

roberto68 commented Jun 20, 2019

I've simliar issue (chromium won't start) same error and I'm not on the Virtual machine, btw where can find the info about driver - i.e to specify driver name? I've intel UHD 620

@roberto68
Copy link

here's my output does anything here seem to be wrong?
vainfo libva info: VA-API version 1.4.1 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib64/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_4 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.4 (libva 2.4.0) vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.3.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointEncSlice VAProfileVP9Profile2 : VAEntrypointVLD

@p4vook
Copy link

p4vook commented Apr 25, 2020

Any updates on this? I'm experiencing this issue on wayland.

@XinfengZhang
Copy link
Contributor

hi @pavel-the-best not sure whether my understanding correct. there are two issue

  1. driver name issue, it should already been fixed with latest libva, such as 2.7.1
  2. driver init issue. it is driver issue. or permission issue... it is not a libva issue

@ipr
Copy link

ipr commented Jun 28, 2020

I am getting:
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

This is with kernel 5.8-rc2+, Debian Bullseye, Mesa 20.1.1, gcc 9.3.0 and amdgpu driver.

Both Chromium and VLC have problems, Chromium won't show start page while VLC segfaults when playing video.

Edit: building and installing 2.8.0 fixes VLC but Chromium is still broken in 5.8-rc2+: it can't show even settings, just error.

@wangyan-intel
Copy link

@ipr Just want to clarify it. Chromium will broken when use VLC plugin to playback. Right? IMHO, Google doesn't provide media HW acceleration directly in chromium and there is one non-official patch from community. So I guess you use VLC plugin in chromium.

@grantcarthew
Copy link

Same issue here running OpenShot on Debian Unstable. Trying to export using the VA-API and it can't find the hardware device.

@LaserEyess
Copy link

LaserEyess commented Nov 30, 2020

I have this issue with an amd card. I am using mpv's vaapi video output driver for testing. Manually exporting LIBVA_DRIVER_NAME=radeonsi lets libva find the driver, but otherwise it fails with this exact same error.

To reproduce I do

LIBVA_TRACE=1 mpv --no-config --vo=vaapi any_file.mkv

I get the following error message:

[   0.035][d][vo/vaapi/vaapi] libva: Open new log file 1.000219.thd-0x0003129c for the thread 0x0003129c
[   0.035][d][vo/vaapi/vaapi] libva: LIBVA_TRACE is on, save log into 1.000219.thd-0x0003129c
[   0.035][d][vo/vaapi/vaapi] libva: VA-API version 1.9.0
[   0.035][e][vo/vaapi/vaapi] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[   0.035][e][vo/vaapi/vaapi] Failed to initialize VAAPI: unknown libva error

Trace file: https://0x0.st/i7c1.thd-0x0

Here is what does work:

LIBVA_DRIVER_NAME=radeonsi LIBVA_TRACE=1 mpv --no-config --vo=vaapi any_file.mkv
[   0.036][d][vo/vaapi/vaapi] libva: Open new log file 1.000815.thd-0x0003130f for the thread 0x0003130f
[   0.036][d][vo/vaapi/vaapi] libva: LIBVA_TRACE is on, save log into 1.000815.thd-0x0003130f
[   0.036][d][vo/vaapi/vaapi] libva: VA-API version 1.9.0
[   0.036][d][vo/vaapi/vaapi] libva: User environment variable requested driver 'radeonsi'
[   0.036][d][vo/vaapi/vaapi] libva: Trying to open /usr/lib/dri/radeonsi_drv_video.so
[   0.093][d][vo/vaapi/vaapi] libva: Found init function __vaDriverInit_1_9
[   0.098][d][vo/vaapi/vaapi] libva: va_openDriver() returns 0
[   0.098][v][vo/vaapi/vaapi] Initialized VAAPI: version 1.9

Trace file: https://0x0.st/i7cI.thd-0x0

This file is the output of LIBVA_TRACE=1 vainfo: https://0x0.st/i7Z2.txt
Trace file: https://0x0.st/i7cl.thd-0x0

I can manually cause vainfo to fail, with a different error, by doing LIBVA_DRIVER_NAME= LIBVA_TRACE=1 vainfo

libva info: Open new log file 1.001222.thd-0x000314ab for the thread 0x000314ab
libva info: LIBVA_TRACE is on, save log into 1.001222.thd-0x000314ab
vaInitialize failed with error code -1 (unknown libva error),exit

Trace file: https://0x0.st/i7cU.thd-0x0

I'm using libva 2.9.1 and libva-utils 2.9.1

EDIT: On my laptop with an intel GPU, I do not get this issue. libva is properly detecting iHD and loading it.

@LaserEyess
Copy link

Some more information, vainfo --display x11 actually fails with the same error but vainfo --display (wayland|drm) do not fail. Additionally, using mpv --hwdec=vaapi --gpu-context=x11egl fails with the same error but mpv --hwdec=vaapi --gpu-context=wayland does not.

The issue here seems to be that, under Xwayland, libva cannot load radeonsi, whereas it loads fine in wayland or drm.

@newcanopies
Copy link

newcanopies commented Apr 5, 2021

Same error on Windows running WSL2 Ubuntu 20.04 using VcXSrv:

$ uname -a
  | Linux machine 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Same error:
$ npm start

electron
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

Tried:
$ export LIBVA_DRIVER_NAME=i965 LIBVA_TRACE=1
$ vainfo --display x11

libva info: Open new log file 1.081847.thd-0x000011ba for the thread 0x000011ba
libva info: LIBVA_TRACE is on, save log into 1.081847.thd-0x000011ba
libva info: VA-API version 1.7.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Same output at running Node/electron app:

electron
libva info: Open new log file 1.082046.thd-0x0000121c for the thread 0x0000121c
libva info: LIBVA_TRACE is on, save log into 1.082046.thd-0x0000121c
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

@gauravguptabits
Copy link

Same error for Google chrome.

gaurav.gupta@ibs-lap-127:~$ google-chrome
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[24038:24038:0411/155153.991304:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
nvc0_screen_create:1111 - Error allocating PGRAPH context for M2MF: -16
libva error: /usr/lib/x86_64-linux-gnu/dri/nouveau_drv_video.so init failed

@XinfengZhang
Copy link
Contributor

How to disable LIBVA_TRACE ??
LIBVA_TRACE=0 did not stop generating the logs

how about unset LIBVA_TRACE?

@XinfengZhang
Copy link
Contributor

@LaserEyess about AMD , it should because the AMD new driver name "radeonsi"
if it is X11, we should get the name from https://github.com/intel/libva/blob/master/va/x11/dri2_util.c#L176
I suppose we have not received "radeonsi", maybe you could try to update mesa. they add this name at 2019-10-07 by commit 3b8aeb09069a

@XinfengZhang
Copy link
Contributor

@gauravguptabits , could you help to share more information, what's your gpu? seems it is nvidia, how about your kmd , it is also nouveau?

@PranavBhattarai
Copy link

PranavBhattarai commented Jun 3, 2021

Trying to run the Freezer from the terminal in Fedora 34 throws a similar error.
It does open the app but throws a warning/error statement in the terminal.
Is there related to this bug in any way?!

Alacritty terminal + Fish shell

@XinfengZhang
Copy link
Contributor

hi @PranavBhattarai , how about the system configuration, it looks like it could not find the compatible driver name against KMD. but you always could use LIBVA_DRIVER_NAME to specify the driver name.

@PranavBhattarai
Copy link

PranavBhattarai commented Jun 4, 2021

@XinfengZhang

pranav@fedora ~> journalctl | grep 'libva'
May 29 10:25:57 fedora code.desktop[4021]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
May 31 13:29:18 fedora chromium-browser.desktop[16431]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Jun 03 09:08:31 fedora gsd-media-keys[3979]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Jun 04 10:34:38 fedora nautilus[8156]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

I don't think I will see more error logs from now onwards except when I launch Freezer from terminal which I think use Nautilus as u can see the last journal log. I have use sudo dnf autoremove which cleaned up a lot of things. But when I type the command which you can see below, I still see Libva as installed package.

pranav@fedora ~> dnf info Libva
Last metadata expiration check: 0:51:31 ago on Fri 04 Jun 2021 10:18:32 AM +0545.
Installed Packages
Name         : libva
Version      : 2.11.0
Release      : 1.fc34
Architecture : x86_64
Size         : 294 k
Source       : libva-2.11.0-1.fc34.src.rpm
Repository   : @System
From repo    : anaconda
Summary      : Video Acceleration (VA) API for Linux
URL          : https://github.com/intel/libva
License      : MIT
Description  : Libva is a library providing the VA API video acceleration API.

Intel Chips inside my Dell:

Intel® Core™ i5-5200U CPU @ 2.20GHz × 4
Mesa Intel® HD Graphics 5500 (BDW GT2)

Don't know how to use the LIBVA_DRIVER_NAME environment variable since I'm noob (let me know in simple steps).

If there is anything that I can help to solve this 2 YEAR old issue, do let me know.

@XinfengZhang
Copy link
Contributor

could you help to try this command line?
xdpyinfo|grep DRI
and paste the result

@PranavBhattarai
Copy link

@XinfengZhang

pranav@fedora ~> xdpyinfo | grep DRI
    DRI3

@mt190502
Copy link

mt190502 commented Jun 8, 2021

how about the solution of #278 (comment) ?

Not worked, sorry :(

@XinfengZhang
Copy link
Contributor

could you help also do the same thing like:
xdpyinfo | grep DRI
&
echo $XDG_SESSION_TYPE

@newcanopies
Copy link

same error on env Linux machine 5.4.72-microsoft-standard-WSL2 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

$ vainfo --display x11

libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

@PranavBhattarai
Copy link

PranavBhattarai commented Jun 10, 2021

@XinfengZhang I think I started to see these new bugs after when I added the environment variable like you asked, using set -U LIBVA_DRIVER_NAME iHD command. Probably because iHD might not be the right value I should use. What value I should set instead of iHD? How do I know which one to write?

Screenshot from 2021-06-10 16-29-21

Edit: Depending upon which graphics, it might differ. I have this graphics "Mesa Intel® HD Graphics 5500 (BDW GT2)". There some of something other libva driver name for this value!

@XinfengZhang
Copy link
Contributor

it is driver name, you could refer to this:
https://github.com/intel/libva/blob/master/va/drm/va_drm_utils.c#L39-L49
yes, it depend on the platform and driver installed, for BDW, it could be i965 or iHD
but also need to check whether the i965_video_drv.so or iHD_video_drv.so on your machine
you also could specify the folder location by this env variable :
LIBVA_DRIVERS_PATH

@XinfengZhang
Copy link
Contributor

same error on env Linux machine 5.4.72-microsoft-standard-WSL2 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

$ vainfo --display x11

libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

I dont think you could run libva on WSL2, maybe you could try to check whether there are device node in /dev/dri/ firstly

@dmitryermilov
Copy link
Contributor

same error on env Linux machine 5.4.72-microsoft-standard-WSL2 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
$ vainfo --display x11

libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

I dont think you could run libva on WSL2, maybe you could try to check whether there are device node in /dev/dri/ firstly

As far as I know WSL exposes "/dev/dxg". Even if you rename /dev/dxg to /dev/dri/card0 it hardly will work because media driver relies on specific behavior of i915 kernel mode driver while /dev/dxg represents a different KMD.

@mt190502
Copy link

could you help also do the same thing like:
xdpyinfo | grep DRI
&
echo $XDG_SESSION_TYPE

  1. DRI3
  2. Wayland

@XinfengZhang
Copy link
Contributor

@MuhammedTaha02 , your config is same as PranavBhattarai's , so suppose his solution should works, how about your platforms? what's the display adaptor ? maybe you could use "lspci -x" to check “VGA compatible controller”

@PranavBhattarai
Copy link

I think I found a final solution to my problem.
Screenshot from 2021-06-11 11-57-00

It is VGA compatible. And the kernel driver I'm using is i915.
Does this mean, I should use set -U LIBVA_DRIVER_NAME i915 to set a new environment variable?! @XinfengZhang

@uartie
Copy link
Contributor

uartie commented Jun 11, 2021

It is VGA compatible. And the kernel driver I'm using is i915.
Does this mean, I should use set -U LIBVA_DRIVER_NAME i915 to set a new environment variable?! @XinfengZhang

@PranavBhattarai No. i915 is a Intel GPU kernel-mode-driver (KMD) for Linux. LIBVA/VAAPI drivers are user-mode-drivers (UMD)... which eventually interact with the GPU KMD via DRM (libdrm). Only i965 and iHD are valid for Intel LIBVA/VAAPI UMD.

@prettydiff
Copy link

I too am getting this error:

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[3819:3819:1115/130453.743127:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[3853:7:1115/130454.595982:ERROR:command_buffer_proxy_impl.cc(122)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
  • I am using Bodhi Linux as VirtualBox VM on a Windows 10 host.
    • Bodhi Linux is an extremely lightweight Ubuntu clone.
    • I have a NVidia GeForce video card on the host, but VirtualBox guests use a virtual video card that performs slowly.
    • I have 3D acceleration turned on for Virtual Box in my NVidia control panel.
  • This error is triggered from Chromium running as a child process of a Node.js application.
  • I looked through the comments in this thread and Bodhi Linux does not have many of the commands mentioned, such as vainfo.

@ghost
Copy link

ghost commented Feb 7, 2022

I used to have this issue on wayland and obviously setting vaSetDriverName on a prod app is not the solution.
I got it to work using vaGetDisplayWl instead of vaGetDisplay()

@XinfengZhang
Copy link
Contributor

yes, vaGetDisplay for X11, vaGetDisplayWl for Wayland , vaGetDisplayDRM for drm, vaGetDisplayGLX for glx . the sample is https://github.com/intel/libva-utils/blob/master/common/va_display.c#L43-L52, each init function have different vaGetDisplayXXX

@lillolollo
Copy link

lillolollo commented Jun 13, 2022

I'm trying to start chrome on rocky linux 8 guest on a VM VirtualBox and i have the same error

 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
 [2309:2309:0613/125954.429739:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
 [2378:2378:0613/125955.119925:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
 [2414:2414:0613/125955.286515:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
 [2349:8:0613/125955.305391:ERROR:command_buffer_proxy_impl.cc(126)] ContextResult::kTransientFailure: Failed to           send GpuControl.CreateCommandBuffer   

I have resolved the libva erorr with

 export LIBVA_DRIVER_NAME=vmwgfx

maybe you need to add this driver name to the list?

Now I have only this error

ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

@xenoterracide
Copy link

xenoterracide commented Jul 21, 2022

I've had this since maybe june on manjaro. Happens with any chromium based browser including electron. It was working fine before that. Anyone have any ideas?

❯ LIBVA_DRIVER_NAME=i965 opera

libva info: Open new log file 1.045816.thd-0x00067a99 for the thread 0x00067a99
libva info: LIBVA_TRACE is on, save log into 1.045816.thd-0x00067a99
libva error: /usr/lib/dri/i965_drv_video.so init failed
^C^C
❯ LIBVA_DRIVER_NAME=iHD opera

libva info: Open new log file 1.045859.thd-0x00067fc1 for the thread 0x00067fc1
libva info: LIBVA_TRACE is on, save log into 1.045859.thd-0x00067fc1
^C^C^C
vainfo: VA-API version: 1.15 (libva 2.15.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.4 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
❯ xdpyinfo | grep -i DRI
    DRI3
Linux manjaro 5.15.53-1-MANJARO #1 SMP PREEMPT Thu Jul 7 16:56:55 UTC 2022 x86_64 GNU/Linux

1.045859.thd-0x00067fc1.log

@evelikov
Copy link
Contributor

evelikov commented Aug 10, 2022

@xenoterracide *odds are you would have to track down which component and version caused the regression.

If it turns out to be driver specific (aka not in libva itself), do report it on the respective project i965 or iHD. If it's opera specific you'll have to find their bugtracker.

@xenoterracide
Copy link

Actually the problem turned out to be that if I had both of those drivers installed the problem happens turns out I needed the media driver's package but if the other package was installed it got confused regardless of what I set the environment variable to be. I didn't used to need the media's driver package so when I upgraded... They switched out packages on me.

@steadfasterX
Copy link

as I am not sure which of those components is the root cause I also want to point to a current issue with chromium (and chromium based) browsers:

@Sunscorcher
Copy link

I am definitely not using a VM, I am using Debian 12 bookworm. When I run teams like

google-chrome --app=https://teams.microsoft.com

I see this error periodically:

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

It does not stop teams or chrome from working, but it is noise in the terminal.

@evelikov
Copy link
Contributor

evelikov commented Nov 6, 2023

The latest libva release includes a bunch of fixes, so make sure you use that - not sure if Debian 12 ships it or not.

I've opened a few more MRs that help, although landing anything in libva (and related projects) is as easy as milking a rock ☹️

@onlineapps-cloud
Copy link

onlineapps-cloud commented Apr 6, 2024

hi, i have same error, my hardware specs:

Server version:   2.6.2
System:           Linux
Operating System: Linux (Ubuntu 22.04)
CPUs:             Intel(R) Core(TM) i3-9100F CPU @ 3.60GHz (Intel)
                  1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary):    NVIDIA GeForce GTX 1070 (8 GiB) (NVIDIA) 
                  Driver: 535.161.07, CUDA: 12.2 (up to: 12.2), Compute: 6.1, cuDNN: 
vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit
xdpyinfo | grep -i DRI
    DRI2
    DRI3

@ngholbrook
Copy link

I didn't put down the stack trace because we have seen enough of those. Obviously, mine crashed as well. Here's how I looked up the correct parameters and created a command that would allow it to run on my system.

used the inxi command to see what drivers are being used on the computer. Mine was obviously nvidia
'
nic@CreepingDeath:~/Downloads$ inxi -Fxz
System:
Kernel: 5.15.0-102-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
Desktop: Cinnamon 6.0.4 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy
Machine:
Type: Desktop Mobo: ASRock model: B365M-ITX/ac serial:
UEFI: American Megatrends v: P4.20 date: 05/15/2019
CPU:
Info: 8-core model: Intel Core i7-9700F bits: 64 type: MCP
arch: Coffee Lake rev: D cache: L1: 512 KiB L2: 2 MiB L3: 12 MiB
Speed (MHz): avg: 800 min/max: 800/4700 cores: 1: 800 2: 800 3: 800
4: 800 5: 800 6: 800 7: 800 8: 800 bogomips: 48000
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: NVIDIA TU106 [GeForce RTX 2070] vendor: Gigabyte driver: nvidia
v: 535.161.07 bus-ID: 01:00.0
Device-2: Logitech CrystalCam type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-5:4
Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia
resolution: 3440x1440~100Hz
OpenGL: renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2
v: 4.6.0 NVIDIA 535.161.07 direct render: Yes
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: ASRock
driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
Device-2: NVIDIA TU106 High Definition Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel bus-ID: 01:00.1
Device-3: Logitech CrystalCam type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-5:4
Sound Server-1: ALSA v: k5.15.0-102-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: kernel
port: N/A bus-ID: 00:1f.6
IF: eno1 state: down mac:
Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak]
driver: iwlwifi v: kernel bus-ID: 02:00.0
IF: wlp2s0 state: up mac:
Bluetooth:
Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-9:5
Report: hciconfig ID: hci0 rfk-id: 0 state: up address:
bt-v: 2.1 lmp-v: 4.2
Drives:
Local Storage: total: 4.59 TiB used: 847.24 GiB (18.0%)
ID-1: /dev/nvme0n1 vendor: Crucial model: CT1000P1SSD8 size: 931.51 GiB
temp: 29.9 C
ID-2: /dev/sda vendor: TeamGroup model: T253E2002T size: 1.86 TiB
ID-3: /dev/sdb type: USB vendor: Seagate model: BUP Slim size: 1.82 TiB
Partition:
ID-1: / size: 843.16 GiB used: 33.69 GiB (4.0%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 98.2 MiB used: 32.4 MiB (33.0%) fs: vfat
dev: /dev/nvme0n1p2
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
System Temperatures: cpu: 24.0 C mobo: N/A gpu: nvidia temp: 50 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 340 Uptime: 1h 36m Memory: 31.27 GiB used: 5.18 GiB (16.6%)
Init: systemd runlevel: 5 Compilers: gcc: 11.4.0 Packages: 2623 Shell: Bash
v: 5.1.16 inxi: 3.3.13
`
After looking at the information, I ran the following code.

1. export LIBVA_DRIVER_NAME=nvidia LIBVA_TRACE=1
2. ./eDEX-UI-Linux-x86_64.AppImage --in-process-gpu --no-sandbox

And it worked. This is on a machine with a nvidia card obviously but you should be able to see what driver is being used, export it and then run the edex file with the listed parameters or customize to your personal setup.

@deborahapthorp
Copy link

deborahapthorp commented Jan 7, 2025

I am getting this exact same error on Ubuntu 22.04.5 64-bit with GNOME Version 42.9 and X11 windowing. I'm not really a Linux expert and am trying to run some eye tracking software (Tobii Pro Eye Tracker Manager) on this system. Trying to run it in this system returns this trace:

deborah@tobii-pro-spectrum:~$ tobiiproeyetrackermanager
[2025-01-07T04:19:51.541Z]  INFO: Main/47339 on tobii-pro-spectrum: APP VERSION:  2.7.2
[2025-01-07T04:19:51.699Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47378] id: [IpcStreamServer] type: [EtmProcess.IpcServer]
[2025-01-07T04:19:51.713Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47377] id: [IpcComServer] type: [EtmProcess.IpcServer]
[2025-01-07T04:19:51.717Z]  INFO: Main/47339 on tobii-pro-spectrum: IPC Client Socket connected for: EtmModule.ElectronMain-518d05f0-7821-4f35-96e9-73ff82b1fe76
[2025-01-07T04:19:51.931Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47404] id: [EtmModule.DataPersistence] type: [EtmProcess.EtmModule]
[2025-01-07T04:19:51.932Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.DataPersistence MODULE_INITIALIZED
[2025-01-07T04:19:51.974Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47403] id: [EtmModule.UpdatesService] type: [EtmProcess.EtmModule]
[2025-01-07T04:19:51.974Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.UpdatesService MODULE_INITIALIZED
[2025-01-07T04:19:52.065Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47405] id: [EtmModule.SdkService] type: [EtmProcess.Executable]
[2025-01-07T04:19:52.065Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.SdkService MODULE_INITIALIZED
[2025-01-07T04:19:52.072Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.UpdatesService MODULE_INITIALIZED
[2025-01-07T04:19:52.072Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.DataPersistence MODULE_INITIALIZED
[2025-01-07T04:19:52.072Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.SdkService MODULE_INITIALIZED
[2025-01-07T04:19:52.476Z]  INFO: Main/47339 on tobii-pro-spectrum: Service initialization done pid: [47452] id: [EtmModule.Telemetry] type: [EtmProcess.EtmModule]
[2025-01-07T04:19:52.476Z]  INFO: Main/47339 on tobii-pro-spectrum: EtmModule.Telemetry MODULE_INITIALIZED
[2025-01-07T04:19:52.476Z]  INFO: Main/47339 on tobii-pro-spectrum: ALL_ESSENTIAL_MODULES_LOADED
[2025-01-07T04:19:52.477Z]  INFO: Main/47339 on tobii-pro-spectrum: Creating main window.
[2025-01-07T04:19:52.525Z]  INFO: Main/47339 on tobii-pro-spectrum: **** PATH INDEX **** /opt/TobiiProEyeTrackerManager/resources/app.asar/index.html
[2025-01-07T04:19:52.536Z] ERROR: Main/47339 on tobii-pro-spectrum: 
    Child process encountered an error: pid: [47405] id: [EtmModule.SdkService] type: [EtmProcess.Executable] SDK:: Recieved unhandled message from parent process: <Buffer@0x6b58410 7b 22 65 76 65 6e 74 22 3a 22 61 6c 6c 2d 65 73 73 65 6e 74 69 61 6c 2d 6d 6f 64 75 6c 65 73 2d 6c 6f 61 64 65 64 22 7d>``

    
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[47339:0107/151953.929332:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
Trace/breakpoint trap (core dumped)

I have tried all of the fixes on this thread and nothing has worked so far.

Further info as requested on threads above:

deborah@tobii-pro-spectrum:~$ xdpyinfo | grep DRI
    DRI2
    DRI3

deborah@tobii-pro-spectrum:~$ echo $XDG_SESSION_TYPE
x11

If I run export LIBVA_DRIVER_NAME=X11, I get the same output as above, but minus the message that it failed to get the driver name; instead I get:

[51468:0107/160808.677241:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye

I have seen a lot of uninformative error messages in my time, but this one really takes the cake.

I have asked the Tobii tech team for help, and they referred me to this thread, but to be honest I have not yet found it very helpful, so any assistance would be gratefully appreciated.

Best

Deborah.

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