我有一个运行 Ubuntu 16.04 客户端的 ESXi 盒。它是 i5-5300U(因此所有技术都可以启用 Intel GPU PCI 直通)。
我安装了 vainfo + i965-va-driver 及其所有依赖项,但vainfo
失败了:
error: can't connect to X server!
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit
如果我强制使用LIBVA_DRIVER_NAME=i965 vainfo
或DRI_PRIME=1 vainfo
:
error: can't connect to X server!
libva info: VA-API version 0.39.4
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_0_39
vainfo: intel_driver.c:106: intel_driver_init: Assertion `VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_DRI1) || VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_DRI2) || VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_CUSTOM)' failed.
Aborted (core dumped)
我已经束手无策了,因为它与同一系统上的一些驱动程序(英特尔更新工具、第三方 PPA 等)一起工作,结果是:
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.39.2
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_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.3)
vainfo: Driver version: Intel i965 driver for Intel(R) Broadwell - 1.7.1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
(...)
然后我重新启动,就再也没有看到这个成功了。
您将如何解决该问题?
系统
System: Host: websrv Kernel: 4.4.0-92-generic x86_64 (64 bit) Console: tty 0 Distro: Ubuntu 16.04 xenial
Machine: System: VMware product: VMware Virtual Platform
Mobo: Intel model: 440BX Desktop Reference Platform Bios: Phoenix v: 6.00 date: 04/05/2016
CPU(s): 4 Single core Intel Core i5-5300Us (-SMP-) speed: 2294 MHz (max)
Graphics: Card-1: VMware SVGA II Adapter
Card-2: Intel Broadwell-U Integrated Graphics
Display Server: N/A driver: N/A tty size: 238x74 Advanced Data: N/A out of X
Client: Shell (bash) inxi: 2.2.35
答案1
也许我的解决方案对其他人有用:
sudo chgrp video /dev/dri -R
sudo chmod 666 /dev/dri/*
sudo chmod 755 /dev/dri
瞧!