Qual configuração pode causar falha parcial do driver no Xubuntu Bionic com os drivers AMD GPU Pro?

Qual configuração pode causar falha parcial do driver no Xubuntu Bionic com os drivers AMD GPU Pro?

Tenho um problema com o Xubuntu Bionic (18.04.3) rodando em um Dell Precision 7530 com um dispositivo de vídeo AMD Radeon Pro WX 4150. Instalei recentemente o driver AMD GPU Pro deeste local, especificamente o arquivo amdgpu-pro-19.30-934563-ubuntu-18.04.tar.xz.

O que está funcionando

  • A tela de login de criptografia funciona
  • X funciona bem na tela do laptop
  • Monitores conectados ao dock (usando o dock WD19DC)

O que NÃO está funcionando

  • Saída HDMI no laptop
  • Saída Mini-DP no laptop
  • OpenGL
  • Muitos aplicativos Qt (provavelmente porque o OpenGL está quebrado)

Especificamente, xrandrrelata que conhece as conexões HDMI e DisplayPort no laptop, mas nada é reconhecido quando conectado a essas portas.

Além disso, nada parece funcionar na estrutura OpenGL. Saída de glxinfo:

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

Saída de glxgears:

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

Detalhes de depuração

Linhas relevantes de lspci -vvexibição dos gráficos integrados Intel e gráficos 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

Saída de 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!

Aqui está o resultado de 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

As últimas três linhas indicam um problema potencial.

Quando muitos aplicativos Qt tentam iniciar, umfalha de segmentoaparece em dmesg, provavelmente porque eles esperam que o OpenGL funcione. Exemplos de aplicativos quebrados: Wireshark, QDirStat, etc. Abaixo está um exemplo de quando o Wireshark tenta iniciar:

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

A saída do console de 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

Aqui está o backtrace produzido gdb wiresharkapós o segfault:

(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 ()

Possíveis explicações que explorei, mas ainda pode ser isso

  • Tenho arquivos ou pacotes de drivers gráficos concorrentes
  • Eu tenho um arquivo de configuração definido incorretamente, em algum lugar
  • Outra biblioteca instalada/opcional está afetando a funcionalidade doamdgpu
  • Algo mais

eu não instaleia versão Enterprise dos driversporque eles suportam apenas o Ubuntu 18.04.2 e dkmsnão serão compilados com o kernel Linux 5 (mesmo o driver lançado na semana passada).

Eu tentei duas configurações de nível de firmware: sem bypass gráfico integrado. Se o bypass estiver desativado (modo normal), a GPU Intel e a GPU AMD poderão funcionar. Se o desvio de gráficos discretos estiver habilitado, a GPU Intel será ignorada e somente a GPU AMD será habilitada. Embora eu tenha um conjunto diferente de problemas relacionados à comutação, os problemas nesta página afetam ambas as configurações.

Tudo funciona bem no Windows 10, então não acho que seja um problema de hardware.

Responder1

Depois de muitos experimentos (e instalações completamente novas do Ubuntu e do Xubuntu), encontrei uma solução alternativa: desabilitar totalmente os gráficos alternáveis. Nas configurações do firmware do Precision 7530, posso desligar os gráficos comutáveis ​​e usar apenas a placa discreta. Quando faço isso, as falhas relacionadas ao OpenGL desaparecem, assim como o travamento dos aplicativos Qt.

O modo Direct Discrete (habilitando o chip Intel, mas ignorando-o) era insuficiente. Tive que desligar totalmente a comutação e, nesse ponto, o dispositivo Intel VGA não aparece mais no Linux.

Esta não é exatamente uma solução, mas é uma solução alternativa e é melhor que a alternativa.

Editar: O uso de energia é muito pior nesta configuração. Recebo cerca de metade da duração da bateria. Ainda seria ótimo que isso funcionasse corretamente com o chip Intel ainda habilitado.

informação relacionada