Re: Recommended upgrade procedure to avoid drm-kmod panic on 15.1-RELEASE

Takashi Shimizu <[email protected]> Wed, 17 Jun 2026 17:43:11 +0900
Newsgroups gmane.os.freebsd.stable
Message-ID <[email protected]>
Following up on this thread with some experimental results.

I tried to see if it was possible to install the 15.1 version of 
drm-66-kmod before the first reboot, to avoid the panic entirely. Here 
is what I found:

1. After 'freebsd-update install' (first run, kernel update), 
'freebsd-version' still reports 15.0-RELEASE-p9, even though the new 
kernel is already installed on disk.

2. The FreeBSD-ports-kmods repository URL uses ${VERSION_MINOR}, which 
still resolves to 0 at this point:

   url: "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_quarterly_0"

3. I tried 'export VERSION_MINOR=1' before running pkg, but this had no 
effect - pkg still resolved the URL using kmods_quarterly_0, and 'pkg 
search -r FreeBSD-ports-kmods drm-66-kmod' only returned the 15.0 build.

So it appears VERSION_MINOR is computed internally by pkg (likely via 
its own ABI detection) rather than read from the environment, and it 
does not change until after reboot into the new kernel.

This suggests there is currently no way to pre-stage the matching 15.1 
kmod package before the reboot that activates the new kernel - the 
panic-prone window between 'reboot into new kernel' and 'pkg upgrade 
drm-66-kmod' seems unavoidable with the current tooling.

Is my understanding correct, or is there a way to override the 
ABI/VERSION_MINOR detection that I am missing? If this is indeed a gap, 
would it be reasonable to suggest that freebsd-update or the upgrading 
instructions recommend disabling the affected kld_list entries and 
display manager before the first reboot, for systems with GPU kmods 
installed from packages?

Thank you again for your time.

Best regards

Takashi Shimizu