web-dev-qa-db-fra.com

Quelle configuration pourrait entraîner une défaillance partielle du pilote dans Xubuntu Bionic avec les pilotes AMD GPU Pro?

J'ai un problème avec Xubuntu Bionic (18.04.3) fonctionnant sur un Dell Precision 7530 avec un périphérique vidéo AMD Radeon Pro WX 4150. J'ai récemment installé le pilote AMD GPU Pro à partir de cet emplacement , en particulier le fichier amdgpu-pro-19.30-934563-ubuntu-18.04.tar.xz.

Ce qui fonctionne

  • L'écran de connexion au chiffrement fonctionne
  • X fonctionne bien sur l'écran du portable
  • Écrans connectés à la station d'accueil (à l'aide de la station d'accueil WD19DC)

Ce qui ne fonctionne PAS

  • Sortie HDMI sur l'ordinateur portable
  • Sortie mini-DP sur l'ordinateur portable
  • OpenGL
  • De nombreuses applications Qt (probablement parce qu'OpenGL est cassé)

Plus précisément, xrandr indique qu'il connaît les connexions HDMI et DisplayPort sur l'ordinateur portable, mais rien n'est reconnu lorsqu'il est connecté à ces ports.

De plus, rien ne semble fonctionner dans le cadre d'OpenGL. Sortie de glxinfo:

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

Sortie de glxgears:

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

Détails de débogage

Lignes pertinentes de lspci -vv montrant les graphiques intégrés Intel et les graphiques 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

Sortie 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!

Voici la sortie 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

Les trois dernières lignes indiquent un problème potentiel.

Lorsque de nombreuses applications Qt essaient de démarrer, un défaut de segmentation apparaît dans dmesg, probablement parce qu'ils s'attendent à ce que OpenGL fonctionne. Exemples d'applications cassées: Wireshark, QDirStat, etc. Voici un exemple à partir duquel Wireshark essaie de démarrer:

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

La sortie 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

Voici le backtrace produit par gdb wireshark après la faute de segmentation:

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

Explications possibles que j'ai explorées, mais qui pourraient tout de même l'être

  • J'ai des fichiers ou des packages de pilotes graphiques concurrents
  • J'ai un fichier de configuration mal défini, quelque part
  • Une autre bibliothèque installée/facultative affecte la fonctionnalité de amdgpu
  • Autre chose

Je n'ai pas installé la version Enterprise des pilotes car ils ne prennent en charge que Ubuntu 18.04.2 et dkms ne sera pas construit avec le noyau Linux 5 (même le pilote sorti la semaine dernière).

J'ai essayé deux configurations au niveau du firmware: avec un sans contournement graphique intégré. Si le contournement est désactivé (mode normal), le GPU Intel et le GPU AMD peuvent tous deux conduire. Si le contournement graphique discret est activé, le GPU Intel est contourné et seul le GPU AMD est activé. Bien que j'ai un ensemble différent de problèmes liés à la commutation, les problèmes de cette page affectent les deux configurations.

Tout fonctionne bien dans Windows 10, donc je ne pense pas que ce soit un problème matériel.

3
Ethan T

Après de nombreuses expériences (et des installations Ubuntu et Xubuntu complètement nouvelles), j'ai trouvé une solution: désactiver complètement les graphiques commutables. Dans les paramètres du firmware du Precision 7530, je peux désactiver les graphiques commutables et utiliser uniquement la carte discrète. Quand je fais cela, les échecs liés à OpenGL disparaissent ainsi que le plantage des applications Qt.

Le mode Direct Discrete (activant la puce Intel mais la contournant) était insuffisant. J'ai dû désactiver complètement la commutation, auquel cas le périphérique Intel VGA n'apparaît plus pour Linux.

Ce n'est pas exactement une solution, mais c'est une solution de contournement, et c'est mieux que l'alternative.

Edit: La consommation d'énergie est bien pire dans cette configuration. J'ai environ la moitié de la durée de vie de la batterie. Ce serait toujours bien pour que cela fonctionne correctement avec la puce Intel toujours activée.

2
Ethan T