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

Takashi Shimizu <[email protected]> Thu, 18 Jun 2026 11:10:38 +0900
Newsgroups gmane.os.freebsd.stable
Message-ID <[email protected]>
Thanks to Mark Millard's explanation of the -oOSVERSION mechanism, I was 
able to find a procedure that avoids the drm-kmod panic entirely, 
without disabling the GPU driver or rebuilding from ports.

The key step is, after the first 'freebsd-update install' (kernel 
update) but before rebooting, to explicitly upgrade the kmods packages 
using:

   pkg -oABI=FreeBSD:15:amd64 -oOSVERSION=1501000 update -r 
FreeBSD-ports-kmods
   pkg -oABI=FreeBSD:15:amd64 -oOSVERSION=1501000 upgrade -r 
FreeBSD-ports-kmods

At this point 'uname -r' is still 15.0-RELEASE, so a plain 'pkg upgrade' 
(without -oOSVERSION) only sees 15.0 packages. With -oOSVERSION 
explicitly set to 1501000, pkg correctly fetches the 15.1 builds of 
drm-66-kmod and all related kmods (144 packages in my case, including 
virtualbox-ose-kmod-72).

After that, rebooting into the new 15.1 kernel works without any panic, 
since the kmod versions already match.

Full procedure:

1. bectl create (save a BE)
2. freebsd-update upgrade -r 15.1-RELEASE
3. freebsd-update install (1st run, kernel)
4. pkg -oABI=FreeBSD:15:amd64 -oOSVERSION=1501000 upgrade -r 
FreeBSD-ports-kmods
5. reboot (no panic)
6. freebsd-update install (2nd run, userland)
7. reboot

I tested this on my desktop (AMD GPU, amdgpu) and it worked as expected.

This seems like exactly what FreeBSD-ports-kmods was designed for, but 
the -oOSVERSION step is not something I would have discovered without 
this thread. Would it make sense to document this procedure somewhere - 
perhaps in the upgrading guide or as a note next to the existing 
rebuild-from-ports warning - for desktop users running GPU drivers or 
virtualbox-ose-kmod from packages?

Thanks again to Mark and vermaden for the help.


One more question on this topic.

For users on the pkgbase method (FreeBSD-base repository), is the 
FreeBSD-ports-kmods package automatically installed/upgraded as part of 
the base system upgrade, or does it still require a separate, explicit 
step, similar to what I experienced with freebsd-update?

I write articles in Japanese introducing FreeBSD to general audiences, 
and I am considering what to recommend to readers regarding this issue. 
If pkgbase handles this automatically and avoids the panic I 
encountered, I would like to recommend that readers consider migrating 
to pkgbase, so they do not run into the same problem.

Thank you.

Best regards

Takashi Shimizu