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

Ubuntu22 / linux kernel 5.19.0-35-generic - wrong driver directories #699

Open
Consti10 opened this issue Mar 16, 2023 · 3 comments
Open

Comments

@Consti10
Copy link

I am trying to simply use libva on ubuntu22, linux kernel 5.19.0-35-generic by installing the appropriate packages.

However, I cannot even get vainfo to "do anything".

Output:

libva info: VA-API version 1.16.0
libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

After investigating a bit, it looks as if libva looks for the drivers in the wrong directory -
iHD_drv_video.so and i965_drv_video.so are in
/usr/lib/x86_64-linux-gnu/dri
not in
/usr/local/lib/x86_64-linux-gnu/dri

Any ideas ?

@Consti10
Copy link
Author

Manually copying the .so files seems to work:

libva info: VA-API version 1.16.0
libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.16 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

But I don't think that's a good practice

@cxn296
Copy link

cxn296 commented Mar 30, 2023

export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri

@Sherry-Lin
Copy link
Contributor

Thanks for reporting this question. You could get more detail from libva build and installation guideline https://github.com/intel/libva#build-with-autogen-and-meson.

When you install the libva from OSV package repositories, different OSV distro use different default location for libva. Basically, Debian/Ubuntu family install libva to /usr/lib/x86_64-linux-gnu and rpm family like Fedora/CentOS/SUSE/RHEL install libva to /usr/lib64. For Other media component default location, you could refer to Install from OSV package)

Without prefix setting, libva will be install to /usr/local/lib as default. If you use other path as installation target folder or no prefix, you have to add the folder to your environment variable or use LD_LIBRARY_PATH to specify the location, like LD_LIBRARY_PATH=/usr/local/lib if no prefix.

If you intent to overwrite system default libva, you could use same OSV distro prefix, then system libva will be replaced and also your new installed libva version will be overwrited when you upgrade it from OSV distro package repository.

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