libva
libva copied to clipboard
vainfo needs sudo on Ubuntu20.04
I faced an issue using libva functions on Ubuntu20.04. Without sudo the output of vainfo will be follow: libva info: VA-API version 1.8.0 libva info: User environment variable requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_8 libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed libva info: va_openDriver() returns 18 vaInitialize failed with error code 18 (invalid parameter),exit I found workaround to change owner group of renderD128 from 'render' to 'video' but maybe this problem can be somehow solved on your side. Thanks, Yuliya
so if you add your user id into render group, it will work, right?
@ymaskina Maybe you could try to use the intel-media-driver or the intel-media-driver-non-free package instead of the Intel Media SDK (libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed)? Trying to use sudo with vainfo leads to failure, at least on GNOME Wayland on my laptop, not to mention that the aforementioned workaround is not needed. Also, as this is presumably a Media SDK issue, shouldn't you be reporting this to https://github.com/Intel-Media-SDK/MediaSDK ?
Some supporting information
sandy@sandys-inspiron:~$ vainfo
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
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
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSliceLP
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointEncSliceLP
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointEncSliceLP
VAProfileVP9Profile3 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointEncSliceLP
VAProfileHEVCMain422_10 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_10 : VAEntrypointVLD
VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP
sandy@sandys-inspiron:~$ sudo vainfo
error: XDG_RUNTIME_DIR not set in the environment.
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
sandy@sandys-inspiron:~$ groups
sandy adm cdrom sudo dip plugdev input lpadmin sambashare kvm libvirt vboxusers
sandy@sandys-inspiron:~$ sudo groups
root
Have a nice day.
I need to use Intel Media SDK as it presents in OpenVINO package. I`ll report it to MediaSDK too, thanks
This is releated to udev rules, managed by OS maintainers. Canonical in this case.
@onabiull I just need somebody adds step with chrgp in installation steps if this is really a feature on Ubuntu20 so that customers don`t have problems using libva in OpenVINO package:) Or maybe it can be handled differently.
@ymaskina : this can't be added to the package installation (meaning libva package in any form: the one you get as OS package or you self build and make-install it) steps since this relates to security setup of particular system. Effectively OS manages access rights to the devices via particular groups. This is system administrator responsibility to add user to the required group. If you develop some higher level SDK or framework with some dedicated installation system (separated from distro installation system), then you probably can consider to add such step within this higher level installation (which will be covered by end-user agreement for your SDK/framework). But I don't think we can do add such a step neither for libva nor mediasdk (where under mediasdk I mean just a library distributed w/ the OS).