You are not logged in.

#1 2018-10-28 13:55:58

the_m0n5t3r
Member
Registered: 2018-10-28
Posts: 3

[SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

Greetings! ,

I own a HP AY513TX laptop which has AMD Radeon R5 M430 and Intel HD Graphics 520. As M430 is GCN1 Southern Island card I've been using the radeon driver for a while, but recently it kept crashing while I tried to use dxvk so I tried installing amdgpu driver. I removed xf86-video-ati and installed xf86-video-amdgpu package and rebooted but amdgpu module was not used instead radeon module was in use..so I blacklisted radeon, added amdgpu in mkinitcpio modules array and added

radeon.si_support=0 amdgpu.si_support=1

to my kernel parameters as suggested in arch wiki. still amdgpu is not loaded.

This is the output of lspci -k for both my graphics cards

00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
        Subsystem: Hewlett-Packard Company Skylake GT2 [HD Graphics 520]
        Kernel driver in use: i915
        Kernel modules: i915

01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (rev 83)
        Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520]
        Kernel modules: radeon, amdgpu

as you can see the kernel driver in use simply doesn't show up. This is the output of dmesg while it tries to load amdgpu,

[    1.008334] Linux agpgart interface v0.103
[    1.141563] [drm] amdgpu kernel modesetting enabled.
[    1.141589] vga_switcheroo: detected switching method \_SB_.PCI0.GFX0.ATPX handle
[    1.141760] ATPX version 1, functions 0x00000033
[    1.141920] ATPX Hybrid Graphics
[    1.142863] checking generic (a0000000 410000) vs hw (90000000 10000000)
[    1.142898] amdgpu 0000:01:00.0: enabling device (0000 -> 0003)
[    1.143103] [drm] initializing kernel modesetting (HAINAN 0x1002:0x6660 0x103C:0x81EC 0x83).
[    1.143173] [drm:amdgpu_ucode_get_load_type [amdgpu]] *ERROR* Unknown firmware load type
[    1.143184] [drm] register mmio base: 0xB1300000
[    1.143185] [drm] register mmio size: 262144
[    1.143190] [drm] probing gen 2 caps for device 8086:9d10 = 1724843/e
[    1.143192] [drm] probing mlw for device 8086:9d10 = 1724843
[    1.143193] [drm] add ip block number 0 <si_common>
[    1.143194] [drm] add ip block number 1 <gmc_v6_0>
[    1.143195] [drm] add ip block number 2 <si_ih>
[    1.143196] [drm] add ip block number 3 <si_dpm>
[    1.143197] [drm] add ip block number 4 <gfx_v6_0>
[    1.143198] [drm] add ip block number 5 <si_dma>
[    1.166171] ATOM BIOS: BR46778.100
[    1.166472] [drm] vm size is 64 GB, 2 levels, block size is 10-bit, fragment size is 9-bit
[    1.166496] amdgpu 0000:01:00.0: Direct firmware load for radeon/hainan_mc.bin failed with error -2
[    1.166498] amdgpu 0000:01:00.0: si_mc: Failed to load firmware "radeon/hainan_mc.bin"
[    1.166500] amdgpu 0000:01:00.0: Failed to load mc firmware!
[    1.166583] [drm:amdgpu_device_init.cold.15 [amdgpu]] *ERROR* sw_init of IP block <gmc_v6_0> failed -2
[    1.166584] amdgpu 0000:01:00.0: amdgpu_device_ip_init failed
[    1.166586] amdgpu 0000:01:00.0: Fatal error during GPU init
[    1.166588] [drm] amdgpu: finishing device.
[    1.166954] amdgpu: probe of 0000:01:00.0 failed with error -2

I don't know what I did wrong. Can somebody please help me on getting this driver to work. Thank you.

Solution :

Installed both xf86-video-ati and xf86-video-amdgpu packages.
Added (amdgpu radeon) to mkinitcpio modules array
regenerated intramfs with mkinitcpio
Added radeon.si_support=0 amdgpu.si_support=1 to kernel parameters
regenerated grub config
DO NOT BLACKLIST radeon
reboot and done.. amdgpu should work !

Last edited by the_m0n5t3r (2018-11-07 13:12:50)

Offline

#2 2018-11-07 13:13:25

the_m0n5t3r
Member
Registered: 2018-10-28
Posts: 3

Re: [SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

Installed both xf86-video-ati and xf86-video-amdgpu packages.
Added (amdgpu radeon) to mkinitcpio modules array
regenerated intramfs with mkinitcpio
Added radeon.si_support=0 amdgpu.si_support=1 to kernel parameters
regenerated grub config
DO NOT BLACKLIST radeon
reboot and done.. amdgpu should work !

Offline

#3 2021-05-08 19:04:54

now-im
Member
Registered: 2018-02-14
Posts: 19

Re: [SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

Installing both xf86-video-ati is not necessary. I have used this method with systemd-boot by editing "/boot/loader/entries/arch.conf" file.(Yours may differ)
My config file is this:

title          Arch Linux
linux          /vmlinuz-linux
initrd         /intel-ucode.img
initrd         /initramfs-linux.img
options        root=/dev/sdb2 rw radeon.si_support=0 amdgpu.si_support=1

By the way, @the_m0n5t3r Thank you so, so much! After Kernel 5.12 update my AMD card just broke. This saved the day for me. Thank you!

Offline

#4 2021-05-09 04:18:49

the_m0n5t3r
Member
Registered: 2018-10-28
Posts: 3

Re: [SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

@now-im

The issue I had was that firmware file for my gpu was not being loaded as at that time of writing that post AMDGPU did not properly specify firmware file for my GPU (R5 M430). Installing xf86-video-ati package would resolve the issue by taking the firmware file it provides. But I do not know how appropriate that fix is and whether its okay to use that particular firmware file with AMDGPU drivers.

Later on I found out that AMDGPU does have the firmware file for my gpu but it was just not being loaded.
I checked whether the firmware file is provided by AMDGPU by looking into /usr/lib/firmware/amdgpu

 $ ls /usr/lib/firmware/amdgpu/ |grep hainan
hainan_ce.bin
hainan_k_smc.bin
hainan_mc.bin
hainan_me.bin
hainan_pfp.bin
hainan_rlc.bin
hainan_smc.bin

I manually listed the path to that firmware file in FILES array in mkinitcpio.conf.

my mkinitcpio.conf

$ cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(i915 amdgpu)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=(/usr/lib/firmware/amdgpu/hainan_mc.bin)

This produced the same result for me and I felt it was more appropriate than the previous solution I used.
The above mentioned solution is discussed here in this thread. https://bbs.archlinux.org/viewtopic.php?id=241913
Thanks !

Offline

#5 2021-10-02 07:20:39

now-im
Member
Registered: 2018-02-14
Posts: 19

Re: [SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

I did the same by editing

sudo nvim /etc/dracut.conf.d/myflags.conf

Adding the line:

install_items+=" /usr/lib/firmware/amdgpu/hainan_mc.bin "

Thanks!

Offline

#6 2021-10-04 15:05:56

now-im
Member
Registered: 2018-02-14
Posts: 19

Re: [SOLVED] AMDGPU driver fails to load on HP laptop with R5 M430

@the_m0n5t3r By the way, do you still get this?

sudo dmesg | grep -i "hainan"
[    2.822308] [drm] initializing kernel modesetting (HAINAN 0x1002:0x6660 0x1028:0x06B2 0x81).
[    2.823099] kfd kfd: amdgpu: HAINAN  not supported in kfd

Offline

Board footer

Powered by FluxBB