有关硬件和软件的一些背景信息

有关硬件和软件的一些背景信息

我最近买了一台新的(实际上是二手的,但对我来说是新的)Inspiron 5548,配备英特尔酷睿 i7-5500U,还配有 AMD Radeon R7 M260/M265 卡。

我的 Ubuntu 17.04(预发布版)一切正常,但我有一个自第一次安装 Ubuntu 16.10 以来就存在的“问题”,即:

vainfo仅显示有关我的 Intel 显卡的信息,而不显示有关我的其他显卡的信息。我相信我已经安装了所有软件包,并安装了以下 vaapi 驱动程序:

$ ll /usr/lib/x86_64-linux-gnu/dri/*_drv_video.so
-rw-r--r-- 1 root root 2113216 Nov 10 17:34 /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
-rw-r--r-- 3 root root 4416200 Feb  6 05:47 /usr/lib/x86_64-linux-gnu/dri/nouveau_drv_video.so
lrwxrwxrwx 1 root root      18 May 11  2016 /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so -> vdpau_drv_video.so
-rw-r--r-- 3 root root 4416200 Feb  6 05:47 /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
-rw-r--r-- 3 root root 4416200 Feb  6 05:47 /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
lrwxrwxrwx 1 root root      18 May 11  2016 /usr/lib/x86_64-linux-gnu/dri/s3g_drv_video.so -> vdpau_drv_video.so
-rw-r--r-- 1 root root   97224 May 11  2016 /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so

下面是 的输出vainfo,它选取了我的英特尔集成卡:

$ vainfo 
libva info: VA-API version 0.39.4
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.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointVLD

当我使用其他驱动程序请求输出时,我得到的结果如下:

$ LIBVA_DRIVER_NAME=radeonsi vainfo 
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: User requested driver 'radeonsi'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_39
ilo: driver missing
ilo: driver missing
libva error: /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so init failed
libva info: va_openDriver() returns 2
vaInitialize failed with error code 2 (resource allocation failed),exit

有关硬件和软件的一些背景信息

输出因希如下:

# inxi -v2
System:    Host: inspiron-5548 Kernel: 4.10.0-9-generic x86_64 (64 bit) Desktop: MATE 1.17.2
           Distro: Ubuntu Zesty Zapus (development branch)
Machine:   Device: portable System: Dell product: Inspiron 5548 v: A07 serial: 6B7H542
           Mobo: Dell model: 0YDTG3 v: A00 serial: .6B7H542.BR1183055L0209. UEFI: Dell v: A07 date: 06/23/2016
Battery    BAT1: charge: 37.3 Wh 100.0% condition: 37.3/38.4 Wh (97%)
CPU:       Dual core Intel Core i7-5500U (-HT-MCP-) speed/max: 799/3000 MHz
Graphics:  Card-1: Intel HD Graphics 5500
           Card-2: Advanced Micro Devices [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445]
           Display Server: X.org 1.18.4 drivers: modesetting,ati,amdgpu (unloaded: fbdev,vesa,radeon)
           tty size: 190x49 Advanced Data: N/A for root
Network:   Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller driver: r8169
           Card-2: Intel Wireless 7265 driver: iwlwifi
Drives:    HDD Total Size: 1000.2GB (16.4% used)
           ID-1: model: ST1000LM014
Info:      Processes: 232 Uptime: 7 days Memory: 2374.9/15960.3MB Client: Shell (bash) inxi: 2.3.8

即使在谷歌搜索了很多次之后,我仍然找不到如何查看系统 AMD 端的 VAAPI 信息,我很想知道如何发现这一点(尤其是使用 ffmpeg 进行转码)。

额外的信息

在@Brainiarc7 的提示之后,使用变量设置DRI_PRIME=1会使输出发生很大变化:

$ DRI_PRIME=1 LIBVA_DRIVER_NAME=radeonsi vainfo
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: User requested driver 'radeonsi'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_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: mesa gallium vaapi
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

即使驱动程序正在使用,硬件是否正在使用,mesa gallium vaapi或者它只是软件解码器/占位符?无论如何,这都是进步。我发现只有少数受支持的配置文件/入口点(但这可能是驱动程序没有暴露硬件是否确实正在使用)。

我将很乐意提供任何被认为必要的进一步信息。

答案1

对于 AMD GPU,您需要调用 vainfo,如下所示:

DRI_PRIME=1 LIBVA_DRIVER_NAME=radeonsi vainfo 

现在,打印输出并查看是否有任何变化。

相关内容