Bug 101377 - Gigabyte R9 380 card fails to load, kernel reports bug
Summary: Gigabyte R9 380 card fails to load, kernel reports bug
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: Other All
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-11 03:44 UTC by john
Modified: 2019-11-19 08:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg output of load attempt (144.44 KB, text/plain)
2017-06-11 03:44 UTC, john
no flags Details
lspci output (53.65 KB, text/plain)
2017-07-22 20:36 UTC, john
no flags Details
dmidecode output (16.21 KB, text/plain)
2017-07-22 20:37 UTC, john
no flags Details
kernel build options for review. (114.57 KB, text/plain)
2017-07-22 20:40 UTC, john
no flags Details
attachment-11134-0.html (3.13 KB, text/html)
2017-07-30 21:42 UTC, john
no flags Details

Description john 2017-06-11 03:44:42 UTC
Created attachment 131871 [details]
dmesg output of load attempt

loading the card as a module fails.  fans spin up for 2 seconds, then back down, then blank screen.  system is online but without video.

see dmesg.
Comment 1 m8r-ux3i84 2017-07-21 12:10:50 UTC
This sounds like exactly the problem I have. Newer Linux kernels load different microcode for my 380, which doesn't work. There are two ways to work around this if it's the same problem:

1) Revert to Linux 4.8 or earlier
2) Replace the newer firmware file with the older one: cp /lib/firmware/amdgpu/tonga_smc.bin /lib/firmware/amdgpu/tonga_k_smc.bin

If you try option 2, make a backup of the original tonga_k_smc.bin first.
Comment 2 john 2017-07-22 20:36:58 UTC
Created attachment 132834 [details]
lspci output

both options seem paradoxical.  i dont have the issue if im on the old kernel 4.8 or earlier, however this is with the latest gentoo firmware package 20170622.  once the kernel is upgraded, the drivers crash on load.  adding some lspci for more transparency into this issue
Comment 3 john 2017-07-22 20:37:46 UTC
Created attachment 132835 [details]
dmidecode output
Comment 4 john 2017-07-22 20:40:54 UTC
Created attachment 132836 [details]
kernel build options for review.
Comment 5 m8r-ux3i84 2017-07-23 08:12:57 UTC
Yep, so if Linux 4.8 works for you, just follow my instructions for forcing Linux 4.9 and newer to use the old firmware file, and I'm sure Linux 4.9 and newer will work for you as well.

For what it's worth, I can tell you that this issue happened to me after upgrading my system from a Trinity-based system to a Zen one. With the Trinity system, using the new firmware file works just fine, but it doesn't with the Zen system.
Comment 6 john 2017-07-29 15:36:57 UTC
the problem with this regression to older firmware is that while the kernel boots, none of the 3D functionality inherent in the new drivers is functional. I can regress to an older kernel with the newer firmware 20170622 https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git

and the system boots, however with zero 3d support.

confirming this bug still exists in 4.12.0 through 4.12.14 as of today.
Comment 7 r380bug 2017-07-30 21:12:23 UTC
Either you have a different problem than me (unlikely, as we have the exact same symptoms), or you misunderstood my workaround. Or my workaround somehow doesn't work for you. However, since you talk about actually upgrading the firmware to a newer version, I'm guessing you didn't understand the workaround.

For my workaround, I neither upgraded nor downgraded any firmware version. However, Linux 4.8 and Linux 4.9 try to load different files for the same graphics card. Linux 4.8 loads tonga_smc.bin where as Linux 4.9 loads tonga_k_smc.bin. Linux 4.8 fully works for me, including 3D acceleration, Linux 4.9 runs into the symptoms you described (black screen, fans running full speed).

Now, if I replace tonga_k_smc.bin with tonga_smc.bin, then Linux 4.9 _also_ fully works for me, including 3D acceleration. That's without upgrading or downgrading any firmware files. All I did was this:

cp /lib/firmware/amdgpu/tonga_smc.bin /lib/firmware/amdgpu/tonga_k_smc.bin

Here's the md5sum of all my Tonga firmware files:
fa6590cc9c9c1b2e7c92874fe98460fa  tonga_ce.bin
16bb427918581c29c2e910b5757a1b5b  tonga_k_smc.bin
73befe8abbaa7589d4e701ff77291e62  tonga_k_smc.bin.orig
8ab907852fc93520ad5f0e06dc23298e  tonga_mc.bin
a0fcc61ba211ab74829219a4e2282654  tonga_me.bin
f904f1835656036fd83b0440ddc28528  tonga_mec2.bin
f904f1835656036fd83b0440ddc28528  tonga_mec.bin
89b0391b91ff7159a7b0670c8aace566  tonga_pfp.bin
55f0a189959a11f07d4064a9f96adfb4  tonga_rlc.bin
a61b84ca64068fa6842887a1519ecd4b  tonga_sdma1.bin
8324b832498cb27c0919647df17968b4  tonga_sdma.bin
16bb427918581c29c2e910b5757a1b5b  tonga_smc.bin
fe37ee3d6138cd852215b318cbe65d0a  tonga_uvd.bin
1a81cffe8a10460b8ca9eaad537e7286  tonga_vce.bin

Note that tonga_k_smc.bin and tonga_smc.bin have the same md5sum on my system, because I copied tonga_smc.bin to tonga_k_smc.bin to make Linux 4.9 work.
Comment 8 john 2017-07-30 21:42:19 UTC
Created attachment 133137 [details]
attachment-11134-0.html

My apologies as it seems I didn't fully understand the proposed workaround.  I'll test this out.

On July 30, 2017 2:12:23 PM PDT, bugzilla-daemon@freedesktop.org wrote:
>https://bugs.freedesktop.org/show_bug.cgi?id=101377
>
>--- Comment #7 from r380bug@safetymail.info ---
>Either you have a different problem than me (unlikely, as we have the
>exact
>same symptoms), or you misunderstood my workaround. Or my workaround
>somehow
>doesn't work for you. However, since you talk about actually upgrading
>the
>firmware to a newer version, I'm guessing you didn't understand the
>workaround.
>
>For my workaround, I neither upgraded nor downgraded any firmware
>version.
>However, Linux 4.8 and Linux 4.9 try to load different files for the
>same
>graphics card. Linux 4.8 loads tonga_smc.bin where as Linux 4.9 loads
>tonga_k_smc.bin. Linux 4.8 fully works for me, including 3D
>acceleration, Linux
>4.9 runs into the symptoms you described (black screen, fans running
>full
>speed).
>
>Now, if I replace tonga_k_smc.bin with tonga_smc.bin, then Linux 4.9
>_also_
>fully works for me, including 3D acceleration. That's without upgrading
>or
>downgrading any firmware files. All I did was this:
>
>cp /lib/firmware/amdgpu/tonga_smc.bin
>/lib/firmware/amdgpu/tonga_k_smc.bin
>
>Here's the md5sum of all my Tonga firmware files:
>fa6590cc9c9c1b2e7c92874fe98460fa  tonga_ce.bin
>16bb427918581c29c2e910b5757a1b5b  tonga_k_smc.bin
>73befe8abbaa7589d4e701ff77291e62  tonga_k_smc.bin.orig
>8ab907852fc93520ad5f0e06dc23298e  tonga_mc.bin
>a0fcc61ba211ab74829219a4e2282654  tonga_me.bin
>f904f1835656036fd83b0440ddc28528  tonga_mec2.bin
>f904f1835656036fd83b0440ddc28528  tonga_mec.bin
>89b0391b91ff7159a7b0670c8aace566  tonga_pfp.bin
>55f0a189959a11f07d4064a9f96adfb4  tonga_rlc.bin
>a61b84ca64068fa6842887a1519ecd4b  tonga_sdma1.bin
>8324b832498cb27c0919647df17968b4  tonga_sdma.bin
>16bb427918581c29c2e910b5757a1b5b  tonga_smc.bin
>fe37ee3d6138cd852215b318cbe65d0a  tonga_uvd.bin
>1a81cffe8a10460b8ca9eaad537e7286  tonga_vce.bin
>
>Note that tonga_k_smc.bin and tonga_smc.bin have the same md5sum on my
>system,
>because I copied tonga_smc.bin to tonga_k_smc.bin to make Linux 4.9
>work.
>
>-- 
>You are receiving this mail because:
>You reported the bug.
Comment 9 john 2017-07-31 23:34:32 UTC
unfortunately copying the firmware did not solve the problem.  the fan noise is no longer emitted, however the graphics driver still fails to properly load.

could this be an issue with, perhaps, the IOMMU implementation of my motherboard?  is IOMMU2 support a requirement perhaps?
Comment 10 Alexander Tsoy 2017-08-01 12:17:38 UTC
(In reply to john from comment #9)
> unfortunately copying the firmware did not solve the problem.  the fan noise
> is no longer emitted, however the graphics driver still fails to properly
> load.

Did you rebuild initramfs after copying the firmware?
Comment 11 john 2017-08-04 19:55:06 UTC
initrd was rebuilt.  Im purchasing another R9 380 card for further testing (different manufacturer.)  Its possible the build quality of the card is just mediocre as ive seen numerous reports of problems related specifically to gigabyte cards and their implementation of the R9 chipset.
Comment 12 john 2017-08-08 16:38:29 UTC
I've continued testing with a separate Sapphire Radeon R9 380 graphics card, and cannot reproduce the hardware issue.  the latest kernel 4.12.1 through 4.12.5 all load the driver properly as a module with no special kernel parameters present.
Comment 13 Martin Peres 2019-11-19 08:19:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/187.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.