哪些配置可能会导致 Xubuntu Bionic 使用 AMD GPU Pro 驱动程序时部分驱动程序出现故障?

哪些配置可能会导致 Xubuntu Bionic 使用 AMD GPU Pro 驱动程序时部分驱动程序出现故障?

我在装有 AMD Radeon Pro WX 4150 视频设备的 Dell Precision 7530 上运行 Xubuntu Bionic (18.04.3) 时遇到问题。我最近从此位置,特别是文件amdgpu-pro-19.30-934563-ubuntu-18.04.tar.xz

哪些措施有效

  • 加密登录屏幕有效
  • X 在笔记本电脑显示屏上运行良好
  • 通过底座连接的显示器(使用 WD19DC 底座)

哪些地方没有发挥作用

  • 笔记本电脑上的 HDMI 输出
  • 笔记本电脑上的 Mini-DP 输出
  • OpenGL
  • 许多 Qt 应用程序(可能是因为 OpenGL 损坏)

具体来说,xrandr报告称它知道笔记本电脑上的 HDMI 和 DisplayPort 连接,但连接到这些端口时无法识别任何东西。

此外,OpenGL 框架内似乎没有任何功能可以工作。输出glxinfo

name of display: :0.0
Error: couldn't find RGB GLX visual or fbconfig

输出glxgears

Error: couldn't get an RGB, Double-buffered visual

调试细节

lspci -vv显示Intel集成显卡和AMD显卡的相关行:

00:02.0 VGA compatible controller: Intel Corporation Device 3e9b (prog-if 00 [VGA controller])
        Subsystem: Dell Device 0831
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 130
        Region 0: Memory at b3000000 (64-bit, non-prefetchable) [size=16M]
        Region 2: Memory at 60000000 (64-bit, prefetchable) [size=256M]
        Region 4: I/O ports at 4000 [size=64]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon Pro WX 4130/4150] (prog-if 00 [VGA controller])
    Subsystem: Dell Baffin [Polaris11]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 143
    Region 0: Memory at 4100000000 (64-bit, prefetchable) [size=4G]
    Region 2: Memory at 4080000000 (64-bit, prefetchable) [size=2M]
    Region 4: I/O ports at 3000 [size=256]
    Region 5: Memory at b4200000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at b4240000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu

输出dmesg | grep -i amdgpu

[    2.094881] [drm] amdgpu kernel modesetting enabled.
[    2.094883] [drm] amdgpu version: 5.0.73.19.30
[    2.097461] amdgpu 0000:01:00.0: enabling device (0000 -> 0003)
[    2.475623] amdgpu 0000:01:00.0: BAR 2: releasing [mem 0x80000000-0x801fffff 64bit pref]
[    2.475624] amdgpu 0000:01:00.0: BAR 0: releasing [mem 0x70000000-0x7fffffff 64bit pref]
[    2.475646] amdgpu 0000:01:00.0: BAR 0: assigned [mem 0x4100000000-0x41ffffffff 64bit pref]
[    2.475651] amdgpu 0000:01:00.0: BAR 2: assigned [mem 0x4080000000-0x40801fffff 64bit pref]
[    2.475674] amdgpu 0000:01:00.0: VRAM: 4096M 0x000000F400000000 - 0x000000F4FFFFFFFF (4096M used)
[    2.475675] amdgpu 0000:01:00.0: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[    2.475868] [drm] amdgpu: 4096M of VRAM memory ready
[    2.475869] [drm] amdgpu: 15796M of GTT memory ready.
[    2.477995] amdgpu: [powerplay] hwmgr_sw_init smu backed is polaris10_smu
[    3.151808] [drm:hwss_edp_wait_for_hpd_ready [amdgpu]] *ERROR* hwss_edp_wait_for_hpd_ready: wait timed out!
[    3.755912] [drm:hwss_edp_wait_for_hpd_ready [amdgpu]] *ERROR* hwss_edp_wait_for_hpd_ready: wait timed out!
[    4.177658] [drm] Initialized amdgpu 3.33.0 20150101 for 0000:01:00.0 on minor 1
[   14.269498] amdgpu 0000:01:00.0: GPU pci config reset
[   68.615509] [drm:hwss_edp_wait_for_hpd_ready [amdgpu]] *ERROR* hwss_edp_wait_for_hpd_ready: wait timed out!
[   69.223488] [drm:hwss_edp_wait_for_hpd_ready [amdgpu]] *ERROR* hwss_edp_wait_for_hpd_ready: wait timed out!

以下是 的输出grep -i "glx\|amdgpu" Xorg.0.log

[    70.624] (**) ModulePath set to "/opt/amdgpu-pro/lib/xorg/modules,/opt/amdgpu/lib/xorg/modules,/usr/lib/xorg/modules"
[    70.643] (II) LoadModule: "glx"
[    70.644] (II) Loading /opt/amdgpu-pro/lib/xorg/modules/extensions/libglx.so
[    70.651] (II) Module glx: vendor="X.Org Foundation"
[    70.651] (II) Applying OutputClass "AMDgpu" to /dev/dri/card1
[    70.651]    loading driver: amdgpu
[    70.651] (==) Matched amdgpu as autoconfigured driver 0
[    70.651] (II) LoadModule: "amdgpu"
[    70.652] (II) Loading /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so
[    70.653] (II) Module amdgpu: vendor="X.Org Foundation"
[    70.656] (II) Applying OutputClass "AMDgpu" to /dev/dri/card1
[    70.656]    loading driver: amdgpu
[    70.656] (==) Matched amdgpu as autoconfigured driver 0
[    70.656] (II) LoadModule: "amdgpu"
[    70.656] (II) Loading /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so
[    70.656] (II) Module amdgpu: vendor="X.Org Foundation"
[    70.656] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
[    70.675] (II) AMDGPU(G0): [KMS] Kernel modesetting enabled.
[    71.254] (==) AMDGPU(G0): Depth 24, (--) framebuffer bpp 32
[    71.254] (II) AMDGPU(G0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    71.254] (==) AMDGPU(G0): Default visual is TrueColor
[    71.254] (==) AMDGPU(G0): RGB weight 888
[    71.254] (II) AMDGPU(G0): Using 8 bits per RGB (8 bit DAC)
[    71.254] (--) AMDGPU(G0): Chipset: "AMD Radeon (TM) Pro WX Series" (ChipID = 0x67e8)
[    71.400] (II) AMDGPU(G0): glamor X acceleration enabled on AMD Radeon (TM) Pro WX Series
[    71.400] (II) AMDGPU(G0): glamor detected, initialising EGL layer.
[    71.400] (==) AMDGPU(G0): TearFree property default: auto
[    71.400] (II) AMDGPU(G0): Output eDP-1-1 has no monitor section
[    71.400] (II) AMDGPU(G0): Output DisplayPort-1-3 has no monitor section
[    71.400] (II) AMDGPU(G0): Output DisplayPort-1-4 has no monitor section
[    71.400] (II) AMDGPU(G0): Output DisplayPort-1-5 has no monitor section
[    71.400] (II) AMDGPU(G0): Output HDMI-A-1-1 has no monitor section
[    71.401] (II) AMDGPU(G0): EDID for output eDP-1-1
[    71.401] (II) AMDGPU(G0): EDID for output DisplayPort-1-3
[    71.401] (II) AMDGPU(G0): EDID for output DisplayPort-1-4
[    71.401] (II) AMDGPU(G0): EDID for output DisplayPort-1-5
[    71.401] (II) AMDGPU(G0): EDID for output HDMI-A-1-1
[    71.401] (II) AMDGPU(G0): mem size init: gart size :3dadf1000 vram size: s:ffad1000 visible:bfc1cc00
[    71.401] (II) AMDGPU(G0): Video RAM: 4188996 kByte
[    71.401] (==) AMDGPU(G0): DPI set to (96, 96)
[    71.401] (==) AMDGPU(G0): Using gamma correction (1.0, 1.0, 1.0)
[    71.401] (II) AMDGPU(G0): [DRI2] Setup complete
[    71.401] (II) AMDGPU(G0): [DRI2]   DRI driver: radeonsi
[    71.401] (II) AMDGPU(G0): [DRI2]   VDPAU driver: radeonsi
[    71.401] (II) AMDGPU(G0): Front buffer pitch: 4096 bytes
[    71.402] (==) AMDGPU(G0): Backing store enabled
[    71.402] (II) AMDGPU(G0): Direct rendering enabled
[    71.451] (II) AMDGPU(G0): Use GLAMOR acceleration.
[    71.451] (II) AMDGPU(G0): Acceleration enabled
[    71.451] (==) AMDGPU(G0): DPMS enabled
[    71.451] (==) AMDGPU(G0): Silken mouse enabled
[    71.510] (II) Initializing extension GLX
[    71.510] (II) AIGLX: Screen 0 is not DRI2 capable
[    71.510] (EE) AIGLX: reverting to software rendering
[    71.510] (II) GLX: no usable GL providers found for screen 0

最后三行表明存在一个潜在问题。

当许多 Qt 应用程序尝试启动时,段错误出现在 中dmesg,大概是因为他们希望 OpenGL 能够工作。损坏的应用程序示例:Wireshark、QDirStat 等。以下是 Wireshark 尝试启动时的示例:

[ 4574.568730] wireshark[12453]: segfault at 10 ip 00007f2ebfde6530 sp 00007ffdfeb2ea70 error 4 in libdrm_amdgpu.so.1.0.0[7f2ebfdde000+c000]

控制台输出wireshark

screen 0 does not appear to be DRI2 capable
screen 0 does not appear to be DRI2 capable
amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1)
Segmentation fault

gdb wireshark这是发生段错误后产生的回溯:

(gdb) r
Starting program: /usr/bin/wireshark 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffde8ad700 (LWP 14468)]
screen 0 does not appear to be DRI2 capable
screen 0 does not appear to be DRI2 capable
amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1)

Thread 1 "wireshark" received signal SIGSEGV, Segmentation fault.
0x00007fffdcde6530 in amdgpu_query_info () from /opt/amdgpu/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1
(gdb) bt
#0  0x00007fffdcde6530 in amdgpu_query_info () from /opt/amdgpu/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1
#1  0x00007fffd607654c in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#2  0x00007fffd6081248 in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#3  0x00007fffd5e88678 in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#4  0x00007fffd5eb388f in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#5  0x00007fffd51782c5 in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#6  0x00007fffd5cd354c in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#7  0x00007fffd6073c7b in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#8  0x00007fffd5d9106e in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#9  0x00007fffd5d91576 in ?? () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#10 0x00007fffd5d94709 in eglInitialize () from /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
#11 0x00007fffdd87f3c4 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so
#12 0x00007fffe2e5b369 in QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#13 0x00007fffe2e5e7fe in QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#14 0x00007fffe31242ab in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
#15 0x00007ffff04c3add in QPlatformIntegrationFactory::create(QString const&, QStringList const&, int&, char**, QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#16 0x00007ffff04d4922 in QGuiApplicationPrivate::createPlatformIntegration() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#17 0x00007ffff04d545d in QGuiApplicationPrivate::createEventDispatcher() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#18 0x00007fffeff20885 in QCoreApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff04d6eef in QGuiApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007ffff0c9c659 in QApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00005555557f3ce1 in WiresharkApplication::WiresharkApplication(int&, char**) ()
#22 0x00005555556e7574 in main ()

我已经探索过可能的解释,但仍然可能是

  • 我有竞争的显卡驱动程序文件或软件包
  • 我在某处错误地设置了配置文件
  • 另一个已安装/可选库正在影响amdgpu
  • 其他内容

我没有安装企业版驱动程序因为它们仅支持 Ubuntu 18.04.2,并且dkms不会使用 Linux 5 内核(甚至是上周发布的驱动程序)进行构建。

我尝试了两种固件级配置:带集成显卡旁路和不带集成显卡旁路。如果禁用旁路(正常模式),则 Intel GPU 和 AMD GPU 均能驱动。如果启用独立显卡旁路,则 Intel GPU 将被旁路,并且仅启用 AMD GPU。虽然我遇到了一系列与切换相关的不同问题,但本页上的问题会影响这两种配置。

在 Windows 10 中一切运行正常,所以我不认为这是一个硬件问题。

答案1

经过多次试验(以及全新安装 Ubuntu 和 Xubuntu),我找到了一种解决方法:完全禁用可切换显卡。在 Precision 7530 固件设置中,我可以关闭可切换显卡并仅使用独立显卡。当我这样做时,与 OpenGL 相关的故障以及 Qt 应用程序崩溃都会消失。

直接离散模式(启用但绕过英特尔芯片)不够好。我不得不完全关闭切换,此时英特尔 VGA 设备不再出现在 Linux 上。

这不完全是一个解决方案,但它是一种变通方法,并且比其他方法更好。

编辑:此配置的耗电量非常糟糕。我的电池寿命只有一半。如果英特尔芯片仍然启用,它仍然可以正常工作,那就太好了。

相关内容