哪些配置可能會導致使用 AMD GPU Pro 驅動程式的 Xubuntu Bionic 中的部分驅動程式故障?

哪些配置可能會導致使用 AMD GPU Pro 驅動程式的 Xubuntu Bionic 中的部分驅動程式故障?

我在使用 AMD Radeon Pro WX 4150 視訊裝置的 Dell Precision 7530 上執行 Xubuntu Bionic (18.04.3) 時遇到問題。我最近安裝了 AMD GPU Pro 驅動程式這個位置,特別是文件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 等。

[ 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 應用程式的崩潰都會消失。

直接離散模式(啟用英特爾晶片但繞過它)是不夠的。我必須完全關閉切換,此時 Linux 中不再顯示 Intel VGA 裝置。

這並不完全是一個解決方案,但它是一種解決方法,而且比其他方法更好。

編輯:此配置中的功耗非常糟糕。我的電池壽命大約只有一半。在仍然啟用英特爾晶片的情況下,它仍然可以正常工作,這仍然很棒。

相關內容