简体   繁体   English

在 WSL2 中使用英特尔 QSV

[英]Using Intel QSV in WSL2

I want to use Intel QSV in WSL2.我想在 WSL2 中使用英特尔 QSV。

Based on the experience of using QSV on a native Ubuntu PC, I installed the same library, but it doesn't work.根据在原生Ubuntu PC上使用QSV的经验,我安装了同样的库,但是没有用。

ex) ffmpeg, libva, vainfo, intel Media SDK, gmmlib, media-driver... ex) ffmpeg, libva, vainfo, intel Media SDK, gmmlib, media-driver...

My CPU supports QSV, but I can't initialize it.我的 CPU 支持 QSV,但我无法初始化它。

In vainfo it works like this:在 vainfo 中它是这样工作的:

$ ls /dev/dri
card0 renderD128

$ sudo vainfo
Trying display: wayland
error: XDG_RUNTIME_DIR not set in the environment.
Trying display: x11
libva info: VA-API version 1.16.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
vaInitialize failed with error code 18 (invalid parameter),exit

I want WSL to be initialized properly so I can use it in C.我希望正确初始化 WSL,以便我可以在 C 中使用它。

Try changing the libva driver to i965 if it solves the error, Your error logs shows the call to i965 driver instead of iHD.如果可以解决错误,请尝试将 libva 驱动程序更改为 i965,您的错误日志显示调用 i965 驱动程序而不是 iHD。

DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument

export LIBVA_DRIVER_NAME="i965" export LIBVA_DRIVER_PATH="/usr/lib/x86_64-linux-gnu/dri"导出 LIBVA_DRIVER_NAME="i965" 导出 LIBVA_DRIVER_PATH="/usr/lib/x86_64-linux-gnu/dri"

Please make sure that the shared object files already exists in this path.请确保共享的 object 文件已存在于此路径中。

for more information you can visit.欲了解更多信息,您可以访问。 https://github.com/intel/media-driver/issues/195 https://github.com/intel/media-driver/issues/195

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM