16.04 版中未使用 AMD GPU

16.04 版中未使用 AMD GPU

我遇到了一个问题。我的 GPU 是 Intel HD4400 和 AMD Radeon HD8670m。安装 Ubuntu 16.04 和 Linux 内核 4.10.8(此版本支持我的 GPU)后,我发现我的独立 GPU 未被使用。以下是和的lspci | grep VGA输出lspci | grep Display

    xpuska@xpuska-Inspiron-3537:~/Downloads/amdgpu-pro-16.60-379184$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)

xpuska@xpuska-Inspiron-3537:~/Downloads/amdgpu-pro-16.60-379184$ lspci | grep Display
03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev ff)

输出dmesg | egrep "radeon|drm"

[    3.346584] [drm] Initialized
[    3.389738] [drm] radeon kernel modesetting enabled.
[    3.394605] radeon 0000:03:00.0: enabling device (0000 -> 0003)
[    3.394784] [drm] initializing kernel modesetting (HAINAN 0x1002:0x6660 0x1028:0x05EA 0x00).
[    3.394796] [drm] register mmio base: 0xC0500000
[    3.394797] [drm] register mmio size: 262144
[    3.394998] [drm] Memory usable by graphics device = 2048M
[    3.395003] fb: switching to inteldrmfb from EFI VGA
[    3.395167] [drm] Replacing VGA console driver
[    3.405777] radeon 0000:03:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
[    3.405778] radeon 0000:03:00.0: GTT: 2048M 0x0000000080000000 - 0x00000000FFFFFFFF
[    3.405782] [drm] Detected VRAM RAM=2048M, BAR=256M
[    3.405783] [drm] RAM width 64bits DDR
[    3.405852] [drm] radeon: 2048M of VRAM memory ready
[    3.405852] [drm] radeon: 2048M of GTT memory ready.
[    3.405861] [drm] Loading hainan Microcode
[    3.405948] [drm] Internal thermal controller without fan control
[    3.406013] [drm] probing gen 2 caps for device 8086:9c18 = 5323c42/0
[    3.407903] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.407904] [drm] Driver supports precise vblank timestamp query.
[    3.418125] [drm] radeon: dpm initialized
[    3.418131] [drm] GART: num cpu pages 524288, num gpu pages 524288
[    3.419452] [drm] probing gen 2 caps for device 8086:9c18 = 5323c42/0
[    3.419456] [drm] PCIE gen 2 link speeds already enabled
[    3.422412] [drm] PCIE GART of 2048M enabled (table at 0x0000000000040000).
[    3.422541] radeon 0000:03:00.0: WB enabled
[    3.422543] radeon 0000:03:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff8a2f4ee39c00
[    3.422544] radeon 0000:03:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0xffff8a2f4ee39c04
[    3.422546] radeon 0000:03:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0xffff8a2f4ee39c08
[    3.422547] radeon 0000:03:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0xffff8a2f4ee39c0c
[    3.422548] radeon 0000:03:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0xffff8a2f4ee39c10
[    3.422549] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.422549] [drm] Driver supports precise vblank timestamp query.
[    3.422550] radeon 0000:03:00.0: radeon: MSI limited to 32-bit
[    3.422603] radeon 0000:03:00.0: radeon: using MSI.
[    3.422627] [drm] radeon: irq initialized.
[    3.665095] [drm] ring test on 0 succeeded in 1 usecs
[    3.665100] [drm] ring test on 1 succeeded in 1 usecs
[    3.665105] [drm] ring test on 2 succeeded in 1 usecs
[    3.665113] [drm] ring test on 3 succeeded in 4 usecs
[    3.665120] [drm] ring test on 4 succeeded in 4 usecs
[    3.665336] [drm] ib test on ring 0 succeeded in 0 usecs
[    3.665390] [drm] ib test on ring 1 succeeded in 0 usecs
[    3.665441] [drm] ib test on ring 2 succeeded in 0 usecs
[    3.665484] [drm] ib test on ring 3 succeeded in 0 usecs
[    3.665525] [drm] ib test on ring 4 succeeded in 0 usecs
[    3.665900] [drm] Radeon Display Connectors
[    3.667334] [drm] Initialized radeon 2.49.0 20080528 for 0000:03:00.0 on minor 0
[    3.684899] [drm] Initialized i915 1.6.0 20161121 for 0000:00:02.0 on minor 1
[    3.685209] [drm] amdgpu kernel modesetting enabled.
[    3.703713] fbcon: inteldrmfb (fb0) is primary device
[    4.797500] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   15.678225] [drm] probing gen 2 caps for device 8086:9c18 = 5323c42/0
[   15.678239] [drm] PCIE gen 2 link speeds already enabled
[   15.684288] [drm] PCIE GART of 2048M enabled (table at 0x0000000000040000).
[   15.684399] radeon 0000:03:00.0: WB enabled
[   15.684401] radeon 0000:03:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff8a2f4ee39c00
[   15.684402] radeon 0000:03:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0xffff8a2f4ee39c04
[   15.684403] radeon 0000:03:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0xffff8a2f4ee39c08
[   15.684404] radeon 0000:03:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0xffff8a2f4ee39c0c
[   15.684405] radeon 0000:03:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0xffff8a2f4ee39c10
[   15.925963] [drm] ring test on 0 succeeded in 1 usecs
[   15.925969] [drm] ring test on 1 succeeded in 1 usecs
[   15.925973] [drm] ring test on 2 succeeded in 1 usecs
[   15.925982] [drm] ring test on 3 succeeded in 4 usecs
[   15.925988] [drm] ring test on 4 succeeded in 4 usecs
[   15.926019] [drm] ib test on ring 0 succeeded in 0 usecs
[   15.926043] [drm] ib test on ring 1 succeeded in 0 usecs
[   15.926066] [drm] ib test on ring 2 succeeded in 0 usecs
[   15.926080] [drm] ib test on ring 3 succeeded in 0 usecs
[   15.926097] [drm] ib test on ring 4 succeeded in 0 usecs
[   23.229928] [drm] probing gen 2 caps for device 8086:9c18 = 5323c42/0
[   23.229932] [drm] PCIE gen 2 link speeds already enabled
[   23.236038] [drm] PCIE GART of 2048M enabled (table at 0x0000000000040000).
[   23.236136] radeon 0000:03:00.0: WB enabled
[   23.236138] radeon 0000:03:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff8a2f4ee39c00
[   23.236139] radeon 0000:03:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0xffff8a2f4ee39c04
[   23.236140] radeon 0000:03:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0xffff8a2f4ee39c08
[   23.236141] radeon 0000:03:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0xffff8a2f4ee39c0c
[   23.236142] radeon 0000:03:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0xffff8a2f4ee39c10
[   23.475035] [drm] ring test on 0 succeeded in 1 usecs
[   23.475041] [drm] ring test on 1 succeeded in 1 usecs
[   23.475046] [drm] ring test on 2 succeeded in 1 usecs
[   23.475054] [drm] ring test on 3 succeeded in 4 usecs
[   23.475061] [drm] ring test on 4 succeeded in 4 usecs
[   23.475121] [drm] ib test on ring 0 succeeded in 0 usecs
[   23.475175] [drm] ib test on ring 1 succeeded in 0 usecs
[   23.475229] [drm] ib test on ring 2 succeeded in 0 usecs
[   23.475243] [drm] ib test on ring 3 succeeded in 0 usecs
[   23.475273] [drm] ib test on ring 4 succeeded in 0 usecs

抱歉我的英语不好。

答案1

我是 ubuntu 新手,遇到的问题和你类似。我的笔记本电脑上同时安装了 Intel HD 4000 和 AMD Radeon HD8670m。

经过一番研究,你可以强制 ubuntu 使用 DRI_PRIME 的 AMD 显卡运行程序/游戏

DRI_PRIME=1 ./EXECUTIBLE_PROGRAM

有趣的是,当我使用 glmark2 检查性能时,使用下面的代码,我的 Intel HD 4000 的性能比我的 AMD 显卡好得多

sudo apt-get glmark2
DRI_PRIME=0 glmark2
DRI_PRIME=1 glmark2

我在英特尔的成绩是 2000,而在 AMD 的成绩只有 700。

相关内容