Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2025 16:36:49 -0800
From:      "Mark G." <fbsd.questions@palaceofretention.ca>
To:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   AMDGPU panic: pkg upgrade -f not upgrading firmware at fault
Message-ID:  <fe5edfa2-4ae9-4bbe-a895-f67490d6534b@palaceofretention.ca>

index | next in thread | raw e-mail

Upgrading from 14.3p6 to 15.0
=============================

Backup system/snapshot first.

Specs:  AI/LLM test toy for ollama.
AMD 16 core threadripper 1950X 128GB RAM
NVMe x4 ZFS raidz1
AMD 7900XTX GPU 24GB VRAM

Foreshadow of important context: kld_list="amdgpu"

(at 14.3)
# freebsd-update fetch
# freebsd-update install

We are at the latest 14.3 patch level 6.  Reboot for hygiene.

# freebsd-update -r 15.0-RELEASE upgrade
No errors
# freebsd-update install
Questions on pkg's /etc/pkg/FreeBSD.conf
gets merged into (I manually set it to use latest):

===
FreeBSD-ports: {
   url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",
   enabled: yes
}
FreeBSD-ports-kmods: {
   url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",
   enabled: yes
}
FreeBSD-base: {
   url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
   enabled: no
}
===

Other merges: /etc/dma/auth.conf
Almost got wiped, I said no because it was replacing my configured
version with the three lines of comments, with no option to edit.

Make copies of /etc/dma/auth.conf -> /etc/dma/auth.conf.mine
Make copies of /etc/dma/dma.conf -> /etc/dma/dma.conf.mine

Choosing no at this merge completely halted the install phase,
so I had to restart:

# freebsd-update install

Redo pkg config merge, accept bad dma/auth.conf merge,
continue with install without further issues.

Reboot into new kernel.  Note that there was no panic
at this time.  I assume the attempt to kld_load the amdgpu
was refused as a kernel ABI mismatch, so didn't panic the
system.


Install base system/userland:

# freebsd-update install

Message about upgrading all ports, do so, but run pkg bootstrap first:

# pkg bootstrap -f
Succeeded

# pkg update
Succeeded

# pkg upgrade -f
Went through three iterations of proceed with the
installation for all ports and completed (eventually,
I was getting sub Mbps transfer rates (i.e. 500kbps)
for alot of files, on a Gbit connection.  Overloaded
servers?).

Said completed successfully.

I see that drm-kmod was upgraded and drm-66-kmod was installed.

Reboot with this in rc.conf:

kld_list="amdgpu"

System loads into the boot process until the attempt
to kld_load amdgpu, whereon we get a panic.  Did not
capture the panic message, sorry.


Boot into single user mode with /bin/sh.

# mount -u /
# vi /etc/rc.conf
comment out kld_load line, save.

Reboot, system boots without panic or graphics driver.

# freebsd-version -kur
15.0-RELEASE
15.0-RELEASE
15.0-RELEASE


Package Repos:

root@brain:/etc/dma # pkg repos
FreeBSD-ports: {
     url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
     enabled         : yes,
     priority        : 0,
     mirror_type     : "SRV",
     signature_type  : "FINGERPRINTS",
     fingerprints    : "/usr/share/keys/pkg"
   }
FreeBSD-ports-kmods: {
     url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_latest_0",
     enabled         : yes,
     priority        : 0,
     mirror_type     : "SRV",
     signature_type  : "FINGERPRINTS",
     fingerprints    : "/usr/share/keys/pkg"
   }
FreeBSD-base: {
     url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_0",
     enabled         : no,
     priority        : 0,
     mirror_type     : "SRV",
     signature_type  : "FINGERPRINTS",
     fingerprints    : "/usr/share/keys/pkgbase-15"
   }

Check what drm kmods we have:

root@brain:~ # pkg info -g drm*
drm-66-kmod-6.6.25.1500068_6
drm-kmod-20250428


Check what gpu-firmware kmods we have:

root@brain:~ # pkg info -g gpu-firm*
gpu-firmware-amd-kmod-aldebaran-20230625.1403000_2
gpu-firmware-amd-kmod-arcturus-20230625.1403000_2
...
gpu-firmware-radeon-kmod-turks-20220511.1403000
gpu-firmware-radeon-kmod-verde-20220511.1403000
===


Looks like they were all built for 14.3 and not upgraded
when the pkg upgrade -f command was run.  Why not?



Remove the 1403000 gpu firmware modules.

root@brain:~ # pkg remove -g gpu-firm*
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 128 packages
(of 0 packages in the universe):

Installed packages to be REMOVED:
	gpu-firmware-amd-kmod-aldebaran: 20230625.1403000_2
...
	gpu-firmware-radeon-kmod-verde: 20220511.1403000

Number of packages to be removed: 128

The operation will free 106 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/128] Deinstalling gpu-firmware-kmod-20241114,1...
...
[128/128] Deinstalling gpu-firmware-radeon-kmod-verde-20220511.1403000...
[128/128] Deleting files for gpu-firmware-radeon-kmod-verde-20220511.1403000: 100%
===


Remove drm-kmod and drm-66-kmod for good measure.
Reboot for hygeine.

System boots.

Reinstall drm-kmod:

===
root@brain:~ # pkg install drm-kmod
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
The following 130 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	drm-66-kmod: 6.6.25.1500068_6 [FreeBSD-ports]
	drm-kmod: 20250428 [FreeBSD-ports]
	gpu-firmware-amd-kmod-aldebaran: 20230625.1500068_2 [FreeBSD-ports]
...
	gpu-firmware-radeon-kmod-verde: 20220511.1500068 [FreeBSD-ports]

Number of packages to be installed: 130

The process will require 123 MiB more space.
28 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/127] Fetching gpu-firmware-amd-kmod-psp-13-0-4-20230625
...
[127/127] Fetching gpu-firmware-amd-kmod-psp-13-0-11-20230625.1500068_2~01b2165a6b.pkg
...
Checking integrity... done (0 conflicting)
[1/130] Installing drm-66-kmod-6.6.25.1500068_6...
[1/130] Extracting drm-66-kmod-6.6.25.1500068_6: 100%
[2/130] Installing gpu-firmware-amd-kmod-aldebaran-20230625.1500068_2
...
[129/130] Extracting gpu-firmware-kmod-20241114,1: 100%
[130/130] Installing drm-kmod-20250428...
[130/130] Extracting drm-kmod-20250428: 100%
=====
Message from drm-66-kmod-6.6.25.1500068_6:
...
For amdgpu: kld_list="amdgpu"
...
===


root@brain:~ # kldstat
Id Refs Address                Size Name
  1   83 0xffffffff80200000  1f4daa0 kernel
  2    1 0xffffffff8214e000   620c10 zfs.ko
  3    1 0xffffffff8276f000     8808 cryptodev.ko
  4    1 0xffffffff82778000    1c708 geom_eli.ko
  5    1 0xffffffff831f8000     3570 fdescfs.ko
  6    1 0xffffffff831fc000     3390 acpi_wmi.ko
  7    1 0xffffffff83200000     21e8 hcons.ko
  8    3 0xffffffff83203000     30a8 hidmap.ko
  9    1 0xffffffff83207000     21e8 hms.ko
10    1 0xffffffff8320a000     21e8 hsctrl.ko
11    1 0xffffffff8320d000     6210 ig4.ko
12    1 0xffffffff83214000     3220 intpm.ko
13    1 0xffffffff83218000     2178 smbus.ko
14    1 0xffffffff8321b000    32320 linux.ko
15    2 0xffffffff8324e000     6d98 mqueuefs.ko
16    4 0xffffffff83255000     ce68 linux_common.ko
17    1 0xffffffff83262000    2e3f0 linux64.ko
18    1 0xffffffff83291000     2278 pty.ko
19    1 0xffffffff83294000     73c0 linprocfs.ko
20    1 0xffffffff8329c000     440c linsysfs.ko
21    1 0xffffffff832a1000    2f5e0 if_wg.ko

Nothing about amdgpu in /boot/firmware

root@brain:~ # ls -la /boot/firmware/
total 7836
drwxr-xr-x   2 root wheel      11 Dec 11 01:41 .
drwxr-xr-x  15 root wheel      73 Dec 11 14:29 ..
-rw-r--r--   1 root wheel  918268 Dec 11 01:41 iwm3160fw
-rw-r--r--   1 root wheel 1028032 Dec 11 01:41 iwm3168fw
-rw-r--r--   1 root wheel 1049340 Dec 11 01:41 iwm7260fw
-rw-r--r--   1 root wheel 1028316 Dec 11 01:41 iwm7265Dfw
-rw-r--r--   1 root wheel 1180412 Dec 11 01:41 iwm7265fw
-rw-r--r--   1 root wheel 2120860 Dec 11 01:41 iwm8000C
-rw-r--r--   1 root wheel 1811984 Dec 11 01:41 iwm8265fw
-rw-r--r--   1 root wheel 2678284 Dec 11 01:41 iwm9000fw
-rw-r--r--   1 root wheel 2678092 Dec 11 01:41 iwm9260fw

Manually load the driver:

root@brain:~ # kldload amdgpu
root@brain:~ #

No panic.

Uncomment the rc.conf kld_list entry and reboot.

Normal boot.  Graphics loads.

Fix /etc/dma/auth.conf file.

Underlying problem on this system was the failure of
pkg upgrade -f to get the upgraded firmware files for
the drm-kmod dependencies.  Retained 1403000 rather
than fetching 1500068 files.


Hope this helps someone.

Mark

P.S.
Output of fwget for interest's sake:
root@brain:~ # fwget -nv
Trying to match device 0x1539 in class network and vendor intel with pci_network_intel
Trying to match device 0x10fb in class network and vendor intel with pci_network_intel
Trying to match device 0x10fb in class network and vendor intel with pci_network_intel
Trying to match device 0x744c in class video and vendor amd with pci_video_amd
Needed firmware packages: 'gpu-firmware-amd-kmod-dcn-3-2-0
gpu-firmware-amd-kmod-gc-11-0-0
gpu-firmware-amd-kmod-psp-13-0-0
gpu-firmware-amd-kmod-sdma-6-0-0
gpu-firmware-amd-kmod-smu-13-0-0
gpu-firmware-amd-kmod-vcn-4-0-0'










help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fe5edfa2-4ae9-4bbe-a895-f67490d6534b>