i965_drv_video.so init failed
Hi, I encountered a similar problem when try using Gstreamer VAAPI plugins on Ubuntu to hardware decode the video stream. When I run vainfo
for i965
driver it failed. Here is the error:
mjzh@mjzh:~$ vainfo
libva info: VA-API version 1.6.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_1
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
Initially, the default driver name is iHD, and I have changed the driver name to i965, and driver path to /usr/lib/x86_64-linux-gnu/dri as follows (The reason why I use iHD rather than i965 is that I think iHD is not officially supported before gstreamer-vaapi 1.18, currently I am using gstreamer-vaapi 1.16):
export LIBVA_DRIVER_NAME=i965
export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
However, I can successfully run vainfo for i965 driver in root, as shown below (although it showed a error: error: can't connect to X server!)
root@mjzh:/home/mjzh# vainfo
X11 connection rejected because of wrong authentication.
error: can't connect to X server!
libva info: VA-API version 1.6.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_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.6 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
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
VAProfileVP9Profile0 : VAEntrypointVLD
here is the result of gst-inspect-1.0 vaapi:
mjzh@mjzh:~$ gst-inspect-1.0 vaapi
Plugin Details:
Name vaapi
Description VA-API based elements
Filename /opt/intel/openvino_2020.3.194/data_processing/gstreamer/lib/gstreamer-1.0/libgstvaapi.so
Version 1.16.2
License LGPL
Source module gstreamer-vaapi
Binary package gstreamer-vaapi
Origin URL http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer
vaapih264feienc: VA-API H264 FEI Advanced encoder (Experimental)
vaapih264enc: VA-API H264 encoder
vaapijpegenc: VA-API JPEG encoder
vaapih265enc: VA-API H265 encoder
vaapisink: VA-API sink
vaapidecodebin: VA-API Decode Bin
vaapipostproc: VA-API video postprocessing
vaapih265dec: VA-API H265 decoder
vaapivp9dec: VA-API VP9 decoder
vaapivp8dec: VA-API VP8 decoder
vaapivc1dec: VA-API VC1 decoder
vaapih264dec: VA-API H264 decoder
vaapimpeg2dec: VA-API MPEG2 decoder
vaapijpegdec: VA-API JPEG decoder
here is the result of lshw -c video:
mjzh@mjzh:~$ sudo lshw -c video
*-display
description: VGA compatible controller
product: Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 0a
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:134 memory:90000000-90ffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff
here is the result of lspci | grep VGA:
mjzh@mjzh:~$ sudo lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller (rev 0a)
here is the available device by running ls /dev/dri:
mjzh@mjzh:~$ ls /dev/dri
by-path card0 renderD128
here is the available video drivers by running ls /usr/lib/x86_64-linux-gnu/dri | grep drv_video.so:
mjzh@mjzh:~$ ls /usr/lib/x86_64-linux-gnu/dri | grep drv_video.so
i965_drv_video.so
nouveau_drv_video.so
nvidia_drv_video.so
r600_drv_video.so
radeonsi_drv_video.so
s3g_drv_video.so
vdpau_drv_video.so
here is the result of strace vainfo: strace_vainfo_output.txt
here is the environment:
CPU: Intel N4200
IGPU: Intel Graphics 505
Ubuntu: Ubuntu 18.04