AMD GPU 890M (Ryzen AI 9 HX 370) system panic

Hi.
Last fall I bought an AceMagic F3A mini PC with a Ryzen AI 9 HX 370 processor. This APU contains a Radeon 890M GPU. I bought this mini PC with the idea that I wanted to run FreeBSD on it in the future. That's why I waited until FreeBSD included GPU support from Linux 6.12. This GPU support should already be included in FreeBSD 15.1. That's why I decided to install FreeBSD 15.1 on this mini PC yesterday. After the installation, I switched from pkg Quarterly to pkg Latest and updated and rebooted. After the reboot, I did: pkg install drm-kmod and sysrc kld_list+=amdgpu. After that, I tried: pkg install gpu-firmware-amd-kmod, but the system response was something like no suitable GPU firmware was found. The fwget command also found no firmware. Then I rebooted. After restarting, the computer did not start and reported a panic, see the manual transcription of the text from the screen.
How to solve this problem? Thank you for any advice.

Code:
vgapci0: child drmn0 request pci_enable_io
vgapci0: child drmn0 request pci_enable_io
<6>[drm] initializing kernel modesetting (IP DISCOVERY 0x1002:0x150E 0x1002:0x0123 0xC1)
<6>[drm] register mmio base: 0xDC400000
<6>[drm] register mmio size: 524288
drmn0: Fatal error during GPU init
drmn0: amdgpu: finishing device.


Fatal trap 12: page fault while in kernel mode
cpuid = 6; apic id = 06
fault virtual address    = 0x18
fault code        = supervisor read data, page not present
instruction pointer    = 0x20:0xffffffff80f4bd94
stack pointer        = 0x20:0xfffffe01cbc997e0
frame pointer        = 0x20:0xfffffe01cbc99800
code segment        = base 0x0, limit 0xfffff, type    0x1b
            = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags    = interrupt enabled, resume, IOPL = 0
current process        = 197 (kldload)
rdi: 0000000000000000 rsi: 0000000000000000 rdx: 0000000000000000
rcx: 0000000000000000  r8: fffffffffffffff0  r9: fffffffffffffff0
rax: 0000000000000001 rbx: fffff800161f7780 rbp: fffffe01cbc99800
r10: 0000000000000031 r11: ffffffcffffffff5 r12: fffff80001d3b500
r13: fffff80001d3ce00 r14: 0000000000000000 r15: fffffe01d04b3000
trap number        = 12
panic: page fault
cpuid = 6
time = 1784473146
KDB: stack backtrace:
#0 0xffffffff80bd678d at kdb_backtrace+0x5d
#1 0xffffffff80b872f6 at vpanic+0x136
#2 0xffffffff80b871b3 at panic+0x43
#3 0xffffffff81098fcd at trap_pfault+0x37d
#4 0xffffffff8106f188 at calltrap+0x8
#5 0xffffffff83d166bc at unregister_fictitious_range+0xc
#6 0xffffffff83617227 at amdgpu_device_fini_hw+0x117
#7 0xffffffff836370c4 at amdgpu_driver_load_kms+0x84
#8 0xffffffff8362696f at amdgpu_pci_probe+0x29f
#9 0xffffffff80e17f5c at linux_pci_attach_device+0x57c
#10 0xffffffff80bc563d at device_attach+0x43d
#11 0xffffffff80bc7393 at bus_generic_driver_added+0x73
#12 0xffffffff80bc2bf9 at devclass_driver_added+0x29
#13 0xffffffff80bc2b8e at devclass_add_driver+0x11e
#14 0xffffffff80e18fbc at _linux_pci_register_driver+0xcc
#15 0xffffffff836266c3 at amdgpu_evh+0x73
#16 0xffffffff80b611c5 at module_register_init+0x85
#17 0xffffffff80b51d2f at linker_load_module+0xc0f
Uptime: 14s
Dumping 1632 out of 48714 MB:
 
How to solve this problem?
Boot to single user mode and remove that kld_list from rc.conf. Then it should boot normally again.

I suspect you unintentionally installed the drivers for 15.0 instead of 15.1 (drivers in FreeBSD-ports are newer than in FreeBSD-ports-kmods)
 
Thanks for the answer.
Sorry, I must have phrased my question wrong. English is not my native language. I removed kld_list="amdgpu" from /etc/rc.conf yesterday after the panic, so the system boots. I need advice on how to get amdgpu working properly. I installed FreeBSD 15.1 as my system. Is it really possible that I accidentally installed drivers from FreeBSD 15.0 in FreeBSD 15.1? How can I fix this and install the correct drivers? I don't know if it's important, but my system is based on pkg-base. Thank you very much.
 
Hello komarek , assuming you don't have specific Gorgon/Krakan point CPUs and just Strix Halo, you will have to compile drm-612-kmod from ports (as it is not available as a pkg yet) and then install it and you will have to install the gpu-firmware-amd-kmod package (# pkg install gpu-firmware-amd-kmod, you can remove the packages that aren't needed by your GPU later if you you wish).

Note that if you are using X11 you will have to use modesetting.

Quick summary for installing from sources:
  1. # pkg install FreeBSD-src-sys - assuming you don't have FreeBSD sources already installed, if you have you have to be on the branch that tracks your kernel i.e. releng/15.1, stable/15 or main and it has to be up to date (i.e. do # git pull)
  2. https://docs.freebsd.org/en/books/handbook/ports/#ports-using-installation-methods - use git to fetch the source (clone to /usr/ports)
  3. # cd /usr/ports/graphics/drm-612-kmod
  4. # make package
  5. # pkg install work/pkg/*.pkg
  6. Keep amdgpu out of kld_list and reboot
  7. # kldload amdgpu - If it doesn't panic, you are good to go, add amdgpu back to kld_list
If there are panics, do the following:
  1. # pkg remove -g gpu-firmware* - if necessary manually remove any files on /boot/modules that start with amdgpu_ (i.e. don't delete amdgpu.ko)
  2. # pkg install gpu-firmware-amd-kmod
  3. Retry loading the amdgpu kernel module
If it fails again please post a full dmesg log.
 
Thank you very much for your answer.
I will be able to try the whole procedure, as you suggest, only tomorrow. I will only correct a small detail. Unfortunately, I do not have a Strix Halo APU (I do not have the money for one....), but I only have a Strix Point HX 370 APU. So should I follow your instructions, or will the procedure for the Strix Point APU be different in some way?
 
Back
Top