https://bugs.freedesktop.org/show_bug.cgi?id=94249
Bug ID: 94249 Summary: Linux incorrectly detects a Radeon GPU Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: krejzi@email.com
I've recently got a HP Probook 470 G3 laptop, which has an onboard Intel Skylake Graphics and an AMD Radeon R7 M340 GPU.
However, the Linux seems to detect the GPU as following:
01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265] [1002:6900] (rev 83)
Which makes it a GCN 1.2 GPU which tries to use AMDGPU. That of course doesn't work. The driver loads, but as soon as it does, it corrupts all the available data from lspci -v output. I also can't use it with DRI_PRIME, since X server crashes while loading amdgpu (probably due to it not being an amdgpu supported GPU).
Wikipedia identifies the mentioned card as GCN 1.0 OLAND GPU. Windows catalyst also claims it's R7 M340 and not R7 M360.
It's probably a BIOS issue, but can it be worked around somehow?
https://bugs.freedesktop.org/show_bug.cgi?id=94249
Alex Deucher alexdeucher@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Linux incorrectly detects a |Topaz GPU not working |Radeon GPU |correctly
--- Comment #1 from Alex Deucher alexdeucher@gmail.com --- The driver is correct. It is a topaz GPU. Try disabling runpm (append amdgpu.runpm=0 on the kernel command line in grub).
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #2 from Armin K krejzi@email.com --- I'm sorry I didn't reply earlier, I didn't get the mail that there was a reply.
Using runpm=0 didn't change a thing.
I forgot to post the corrupted lspci data as said in the original post:
01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265] [1002:6900] (rev ff) (prog-if ff) !!! Unknown header type 7f Kernel driver in use: amdgpu Kernel modules: amdgpu
Without the amdgpu module loaded, it looks as down below (with other options included with -v).
The X server still crashes when AMDGPU DDX is present. Here's the relevant part of the Xorg.log:
Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Backtrace: Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 0: /usr/libexec/Xorg (OsInit+0x35a) [0x5ca1aa] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 1: /lib/libc.so.6 (killpg+0x40) [0x7f5cfaf453df] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 2: /usr/lib/libdrm_amdgpu.so.1 (amdgpu_cs_submit+0x333) [0x7f5cf56ff383] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 3: /usr/lib/libdrm_amdgpu.so.1 (amdgpu_cs_submit+0x3b) [0x7f5cf56ff02b] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 4: /usr/lib/dri/radeonsi_dri.so (radeon_drm_winsys_create+0x14fad) [0x7f5cf451e3ed] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 5: /usr/lib/dri/radeonsi_dri.so (__driDriverGetExtensions_radeonsi+0x45afe1) [0x7f5cf48ecce1] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 6: /usr/lib/dri/radeonsi_dri.so (amdgpu_winsys_create+0x18f9) [0x7f5cf450dc59] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 7: /usr/lib/dri/radeonsi_dri.so (amdgpu_winsys_create+0x5a60) [0x7f5cf4515d80] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 8: /usr/lib/dri/radeonsi_dri.so (__driDriverGetExtensions_radeonsi+0x45b6ce) [0x7f5cf48eda8e] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 9: /usr/lib/dri/radeonsi_dri.so (__driDriverGetExtensions_radeonsi+0x45b448) [0x7f5cf48ed6d8] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 10: /usr/lib/dri/radeonsi_dri.so (amdgpu_winsys_create+0xba8) [0x7f5cf450b688] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) unw_get_proc_name failed: no unwind info found [-10] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 11: /usr/lib/dri/radeonsi_dri.so (?+0xba8) [0x7f5cf4037938] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 12: /usr/lib/dri/radeonsi_dri.so (__driDriverGetExtensions_radeonsi+0x2f81cf) [0x7f5cf462722f] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 13: /usr/lib/dri/radeonsi_dri.so (__driDriverGetExtensions_radeonsi+0x2f5269) [0x7f5cf4621269] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 14: /usr/lib/libgbm.so.1 (gbm_surface_has_free_buffers+0xcfb) [0x7f5cf54f38cb] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 15: /usr/lib/libgbm.so.1 (gbm_surface_has_free_buffers+0xe8) [0x7f5cf54f2108] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 16: /usr/lib/libgbm.so.1 (gbm_create_device+0xa4) [0x7f5cf54f1dc4] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 17: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (_init+0x828b) [0x7f5cf5919d6b] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 18: /usr/libexec/Xorg (InitOutput+0xb52) [0x480732] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 19: /usr/libexec/Xorg (remove_fs_handlers+0x498) [0x4396d8] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 20: /lib/libc.so.6 (__libc_start_main+0xf0) [0x7f5cfaf307a0] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 21: /usr/libexec/Xorg (_start+0x29) [0x421529] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) 22: ? (?+0x29) [0x29] Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Segmentation fault at address 0x10 Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: Fatal server error: Mar 01 16:23:34 krejzi /usr/libexec/gdm-x-session[629]: (EE) Caught signal 11 (Segmentation fault). Server aborting
Ignore the /usr/libexec/gdm-x-session, as GNOME's gdm reditects Xorg.log to systemd journal instead.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #3 from Armin K krejzi@email.com --- Ping? This is still problematic with Linux 4.5.1, xf86-video-amdgpu-1.1.0, xorg-server-1.18.3 and mesa-11.2.0.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #4 from Michel Dänzer michel@daenzer.net --- First of all, for Topaz / Iceland I think it's best to use current Git snapshots of Mesa and libdrm_amdgpu.
Please attach the full Xorg log corresponding to the failure.
A gdb backtrace would also be helpful, see https://www.x.org/wiki/Development/Documentation/ServerDebugging/ .
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #5 from Armin K krejzi@email.com --- I'm using Mesa 12.1.0-devel (git-c98c732) and libdrm-2.4.70. I think that's quite recent. I'm also using linux-4.7.0 atm.
You can find the requested information in the attached files.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #6 from Armin K krejzi@email.com --- Created attachment 125417 --> https://bugs.freedesktop.org/attachment.cgi?id=125417&action=edit Xorg log
Here's the Xorg.log extracted from journal.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #7 from Armin K krejzi@email.com --- Created attachment 125418 --> https://bugs.freedesktop.org/attachment.cgi?id=125418&action=edit gdb backtrace Xorg
Here's the best backtrace I could obtain from the Xorg server. I used a core file stored in journal. I'm not sure where those missing symbols are from.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #8 from Armin K krejzi@email.com --- Created attachment 125419 --> https://bugs.freedesktop.org/attachment.cgi?id=125419&action=edit gdb backtrace glxinfo
Here's the backtrace of glxinfo when trying to use DRI3 PRIME (not loading amdgpu, but running DRI_PRIME=1 glxinfo with xf86-video-intel using DRI3).
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #9 from Armin K krejzi@email.com --- Created attachment 125420 --> https://bugs.freedesktop.org/attachment.cgi?id=125420&action=edit dmesg output from the current system
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #10 from Armin K krejzi@email.com --- Created attachment 125437 --> https://bugs.freedesktop.org/attachment.cgi?id=125437&action=edit dmesg output from the current system
Trying airied's drm-next tree from today. The dmesg output is a bit different but the segfaults are still the same.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #11 from Michel Dänzer michel@daenzer.net --- Weird, it seems to crash on this line of libdrm_amdgpu's amdgpu_vamgr_find_va:
LIST_FOR_EACH_ENTRY_SAFE(hole, n, &mgr->va_holes, list) {
Are you using any unusual compiler (options)?
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #12 from Armin K krejzi@email.com --- I use clang 3.9 svn (same crash with clang 3.8 by the way) with -march=skylake -g -O2 -pipe
https://bugs.freedesktop.org/show_bug.cgi?id=94249
Armin K krejzi@email.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|DRM/AMDgpu |libdrm Summary|Topaz GPU not working |libdrm_amdgpu: Crash when |correctly |built with clang
--- Comment #13 from Armin K krejzi@email.com --- Rebuilding libdrm with gcc instead of clang using the same flags fixes the problem.
The issues is indeed in libdrm_amdgpu. Now I get this with glxinfo:
OpenGL renderer string: Gallium 0.4 on AMD ICELAND (DRM 3.2.0 / 4.7.0-krejzi, LLVM 3.9.0) OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel (git-c98c732) OpenGL core profile shading language version string: 4.30
I'd be grateful if the issue was fixed, I'm trying to get rid of gcc.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #14 from Michel Dänzer michel@daenzer.net --- Created attachment 125478 --> https://bugs.freedesktop.org/attachment.cgi?id=125478&action=edit Make sure the second argument to container_of() is initialized
Does this patch fix the problem with clang?
https://bugs.freedesktop.org/show_bug.cgi?id=94249
--- Comment #15 from Armin K krejzi@email.com --- (In reply to Michel Dänzer from comment #14)
Created attachment 125478 [details] [review] Make sure the second argument to container_of() is initialized
Does this patch fix the problem with clang?
It appears like its working! Thanks.
https://bugs.freedesktop.org/show_bug.cgi?id=94249
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #16 from Michel Dänzer michel@daenzer.net --- Should be fixed with
commit b214b05ccd433c484a6a65e491a1a51b19e4811d Author: Rob Clark robclark@freedesktop.org Date: Tue Aug 2 16:16:02 2016 -0400
list: fix an issue with android build using clang
dri-devel@lists.freedesktop.org