amdgpu causes kernel panic on load with Radeon 860M iGPU

I installed FreeBSD 15.0-RELEASE-p2 on a Lenovo Ideapad Slim 5 laptop, with a AMD Ryzen AI 7 350 CPU and Radeon 860M iGPU. When running kldload amdgpu I get a kernel panic like this

Code:
iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
iic2: <I2C generic I/O> on iicbus2
<6>[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
<6>[drm] initializing kernel modesetting (IP DISCOVERY 0x1002:0x1114 0x17AA:0x3804 0xC2).
<6>[drm] register mmio base: 0x80400000
<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 = 9; apic id = 09
fault virtual address   = 0x18
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80f2d414
stack pointer           = 0x28:0xfffffe013ea927e0
frame pointer           = 0x28:0xfffffe013ea92800
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         = 4907 (kldload)
rdi: 0000000000000000 rsi: 0000000000000000 rdx: 0000000000000000
rcx: 0000000000000000  r8: fffffffffffffff0  r9: fffffffffffffff0
rax: 0000000000000001 rbx: fffff80021103780 rbp: fffffe013ea92800
r10: 00000000000f4240 r11: 0000000000000000 r12: fffff8000163c100
r13: fffff80001b4ca00 r14: 0000000000000000 r15: fffffe0157122000
trap number             = 12
panic: page fault
cpuid = 9
time = 1769887486
KDB: stack backtrace:
#0 0xffffffff80bbe1ed at kdb_backtrace+0x5d
#1 0xffffffff80b71576 at vpanic+0x136
#2 0xffffffff80b71433 at panic+0x43
#3 0xffffffff81079f69 at trap_pfault+0x3c9
#4 0xffffffff8104ffe8 at calltrap+0x8
#5 0xffffffff839114fc at unregister_fictitious_range+0xc
#6 0xffffffff84017227 at amdgpu_device_fini_hw+0x117
#7 0xffffffff84037024 at amdgpu_driver_load_kms+0x84
#8 0xffffffff840268cf at amdgpu_pci_probe+0x29f
#9 0xffffffff80dfc23c at linux_pci_attach_device+0x5ac
#10 0xffffffff80bad2ed at device_attach+0x43d
#11 0xffffffff80baf043 at bus_generic_driver_added+0x73
#12 0xffffffff80baa8c9 at devclass_driver_added+0x29
#13 0xffffffff80baa85e at devclass_add_driver+0x11e
#14 0xffffffff80dfd29c at _linux_pci_register_driver+0xcc
#15 0xffffffff84026623 at amdgpu_evh+0x73
#16 0xffffffff80b4b575 at module_register_init+0x85
#17 0xffffffff80b3c0df at linker_load_module+0xc0f

I've tried the driver with pkg versions of drm-515-kmod, drm-61-kmod, drm-66-kmod, and drm-latest-kmod (6.9) and also the ports versions of drm-61-kmod, drm-66-kmod, and drm-latest-kmod. Fwget didn't find any gpu firmware I didn't already have.

I suspect I'm simply missing a piece of firmware needed, but I have no idea what it is. Thanks in advance
 
If you have access to a recent linux livecd, try to check which firmware files are loaded there. I'm guessing the firmware needed for your graphics card was added/updated in the last year.
 
If you have access to a recent linux livecd, try to check which firmware files are loaded there. I'm guessing the firmware needed for your graphics card was added/updated in the last year.
I did that looking at dmesg | grep amdgpu on a manjaro live cd and all of them seemed to already have been installed on my freebsd system. The issue still remains.
 
Kierteiyu , if you want to try a newer package with updated files.

Checkout, https://github.com/freebsd/freebsd-ports/tree/main/graphics/gpu-firmware-amd-kmod and replace the attached files. You can then build with:

# cd /usr/ports/graphics/gpu-firmware-amd-kmod/
# for FLV in $(make -V FLAVORS); do make package FLAVOR=${FLV}; done

And install with:

# for dir in work-*; do pkg install -y -f $dir/pkg/*.pkg; done

PS: Or use poudiere.

Otherwise, the drm 6.10 PR was approved last week. I'm guessing it will reach at least STABLE soonish and you can try again.
 

Attachments

The DRM 6.10 kmod requires a newer kernel (FreeBSD-CURRENT). I tried the development version of FreeBSD 15, but it's not supported there yet.

Probably the only thing you can do is try building the tagged drm-610_1-kmod against FreeBSD-CURRENT or wait until it gets a release version.
 
drm-kmod currently 515/61/66 (from linux kernel lts)?
based on https://github.com/freebsd/drm-kmod/ tags there are 6.(7,8,9,10), so not lts?

i haven't had any luck finding the exact firmware bin (with linux) but MIGHT be gpu-firmware-amd-kmod-gc-11-5-2-20250808.pkg

gmc_v11_0.c could be that code, but yet 11.5.2 are missing, so will wait for 6.11/6.12lts

i still think its weird it uses non lts

edit
ubuntu 24.04.2 6.8: amdgpu: fatal error during GPU init
edeavouros endeavour 6.10: amdgpu: fatal error during GPU init
ubuntu 24.04.3 6.11: amdgpu works
 
Back
Top