Possible solution to the drm-kmod kernel mismatch after upgrade from Bapt

Yeah, there are a lot of threads about the problem on the Forum:

That's why I decided to start a new topic.
 
Well it would be great if this becomes simpler & more convenient. To be honest, I don't want to have to think about it at all. :)

A completely different approach would be to change the language about when to update, so that freebsd-update doesn't encourage us to update as soon as a new release appears, but rather warns us to wait until the kernel modules have been recompiled.... It could even detect that we use kernel modules so as to emit this warning.
 
Today I have updated two systems and their jails from FreeBSD 14.1-RELEASE to 14.2-RELEASE using freebsd-update. Things worked flawlessly. During the process I have deleted [pkg]drm-kmod[/pkg] which had pulled in [pkg]drm-61-kmod[/pkg] while running FreeBSD 14.1-RELEASE. Due to my old hardware and an advise in a different thread I have installed [pkg]drm-515-kmod[/pkg]. I do not know what might have happend if I would have been running [pkg]drm-515-kmod[/pkg] before the upgrade. I am using the "latest" pkg repository.

Thanks to all the users here in the forum who have pointed out a solution. Also thanks to Bapt for the fix and all the people in the background who have tested the fix. I think that this has not been easy knowing that lots of users are waiting for a simple procedure to upgrade.
 
Today I have updated two systems and their jails from FreeBSD 14.1-RELEASE to 14.2-RELEASE using freebsd-update. Things worked flawlessly. During the process I have deleted [pkg]drm-kmod[/pkg] which had pulled in [pkg]drm-61-kmod[/pkg] while running FreeBSD 14.1-RELEASE. Due to my old hardware and an advise in a different thread I have installed [pkg]drm-515-kmod[/pkg]. I do not know what might have happend if I would have been running [pkg]drm-515-kmod[/pkg] before the upgrade. I am using the "latest" pkg repository.

Thanks to all the users here in the forum who have pointed out a solution. Also thanks to Bapt for the fix and all the people in the background who have tested the fix. I think that this has not been easy knowing that lots of users are waiting for a simple procedure to upgrade.
I installed this one as soon as I upgraded to 14.1-RELEASE instead of drm-515-kmod. It worked on intel HD630.

You can test it. It means, you install it, you deactivate the loading of i915kms or amdgpu kmod (and Xorg), you reboot (because that kind of kmod doesn't play well with kldunload). After what, you try the suited kmod with kldload. And, if things are ok, try to start Xorg.

If something goes wrong, you can always deinstall drm-61-kmod and put drm-515-kmod instead.
 
I've added the kmods_latest_2 repo to 14.2-R like this:

Code:
mkdir -p '/usr/local/etc/pkg/repos' && ee '/usr/local/etc/pkg/repos/FreeBSD-kmods-latest.conf'

Code:
FreeBSD-kmods-latest: {
  url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}",
  enabled: yes,
  priority: 1,
  mirror_type: "SRV",
  signature_type: "FINGERPRINTS",
  fingerprints: "/usr/share/keys/pkg"
}

Uninstalled official-repos drm-515-kmod, installed drm-61-kmod from FreeBSD-kmods-latest, rebooted, and it works fine right now!

I like this over using older 515 or needing to pull src/ports/build; I'm sure it could be overall improved, but I think I'd be fine with doing this for future FreeBSD versions.
 
Last edited:
I've added the repo to 14.2-R like this:

Code:
mkdir -p '/usr/local/etc/pkg/repos' && ee '/usr/local/etc/pkg/repos/FreeBSD-kmods.conf'

Code:
FreeBSD-kmods {
        url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_2
        signature_type: "fingerprints"
        fingerprints: "/usr/share/keys/pkg"
        mirror_type: "srv"
        enabled: yes
        priority: 1,
}

Uninstalled official-repos drm-515-kmod, installed drm-61-kmod from FreeBSD-kmods, rebooted, and it works fine right now!

I like this over using older 515 or needing to pull src/ports/build; I'm sure it could be overall improved, but I think I'd be fine with doing this for future FreeBSD versions.
A more robust conf file content is:
Code:
FreeBSD-kmods {
    url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}
    signature_type: "fingerprints"
    fingerprints: "/usr/share/keys/pkg"
    mirror_type: "srv"
    enabled: yes
}
As the "2" is in fact the minor version of the RELEASE. Your conf file won't work when you'll upgrade to 14.3-RELEASE.
 
Unfortunately there are no packages for Freebsd 13. This is only for 14.* right now. Emrion I think you need commas at the end of the lines in that pkg.conf.
Code:
FreeBSD-kmods {
    url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR},
    signature_type: "fingerprints",
    fingerprints: "/usr/share/keys/pkg",
    mirror_type: "srv",
    enabled: yes,
    priority: 1,
}
 
I think you need commas at the end of the lines in that pkg.conf.
Nice find!

I did pkg -vv and made a format that looks good (no comma on last conf option):

Code:
FreeBSD-kmods-latest: {
  url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}",
  enabled: yes,
  priority: 1,
  mirror_type: "SRV",
  signature_type: "FINGERPRINTS",
  fingerprints: "/usr/share/keys/pkg"
}
 
Incorporated the above line in my existing file for 'latest' repository and commented the old one. There are only four packages are to be upgraded . So it is implied that every time when I have to do package update then first I have to update with original latest line then with above url.
Create another .conf file in/usr/local/etc/pkg/repos/ instead of modifiying an existing one. It works perfectly, and uses kmods_latest_${VERSION_MINOR} only for the kmod modules that are present in this repos (if I well understood).
 
So it will not consider priority 0 or merge both. Then the package DB have only higher version of particular package.
 
So it will not consider priority 0 or merge both. Then the package DB have only higher version of particular package.
I'm not sure what the behavior is for multiple repos with the same priority. I've always just bumped up the priority for the repos I want to go first. One thing to keep in mind is the higher priority repos don't have to have every package in them. The lower priority repos will be checked for packages that don't exist in the higher priority repos. It's a simple and elegant inheritance implementation.
 
Please, I don’t have anywhere near the knowledge you all have. I upgraded to 14.2 and now my GT1030 NVIDIA card does not allow the xorg pkg open a GUI. I’ve carried out the same process as I did when I updated to 14.0, I’m thinking that the drm-kmod of the 515 is the issue, but I don’t have the experience nor knowledge as to simply making a drm-kmod work for the older GT1030 card. And, since I cannot open a GUI, I can’t download and install any updates for the card from NVIDIA. Any help will be greatly appreciated.
 
I upgraded to 14.2 and now my GT1030 NVIDIA card does not allow the xorg pkg open a GUI.
Your GeForce GT 1030 is supported by FreeBSD Display Driver – x64 550.127.05 | FreeBSD x64 , so I suggest you try installing the proprietary x11/nvidia-driver by means of pkg install nvidia-driver; follow Chapter 5. The X Window System using nvidia-modeset in /etc/rc.conf and nvidia in a Section "Device" in an appropriate Xorg .conf file.

Using the Nvidia proprietary driver, you shouldn't have to experience any difficulty in installing it. You don't need a (partly) open source solution like graphics/nvidia-drm-61-kmod.
 
Please, I don’t have anywhere near the knowledge you all have. I upgraded to 14.2 and now my GT1030 NVIDIA card does not allow the xorg pkg open a GUI. I’ve carried out the same process as I did when I updated to 14.0, I’m thinking that the drm-kmod of the 515 is the issue, but I don’t have the experience nor knowledge as to simply making a drm-kmod work for the older GT1030 card. And, since I cannot open a GUI, I can’t download and install any updates for the card from NVIDIA. Any help will be greatly appreciated.
If the GT1030 is the only GPU you have in the computer and you're using xorg (not Wayland), consider switching to configuration without nvidia-drm-[510|515|61]-kmod. It should be more stable in KBI, as it does not require LinuxKPI.

Current x11/nvidia-driver (should be installed in your computer, as it is required by all of nvidia-drm-[510|515|61]-kmod.

You need to delete drm stuff from kld_list variable in /etc/rc-conf[-local] and add nvidia-modeset instead, and configure xorg to pick it (by default for nvidia GPUs, xorg looks for open source nouveau driver, which FreeBSD is not supported, so manual configuration is mandatory).
See chapter 5.3. Graphic card drivers and chapter 5.4. Xorg Configuration (especially 5.4.3 Video Cards Example 3 with following Tip) of the FreeBSD Handbook.
 
If the GT1030 is the only GPU you have in the computer and you're using xorg (not Wayland), consider switching to configuration without nvidia-drm-[510|515|61]-kmod. It should be more stable in KBI, as it does not require LinuxKPI.

Current x11/nvidia-driver (should be installed in your computer, as it is required by all of nvidia-drm-[510|515|61]-kmod.

You need to delete drm stuff from kld_list variable in /etc/rc-conf[-local] and add nvidia-modeset instead, and configure xorg to pick it (by default for nvidia GPUs, xorg looks for open source nouveau driver, which FreeBSD is not supported, so manual configuration is mandatory).
See chapter 5.3. Graphic card drivers and chapter 5.4. Xorg Configuration (especially 5.4.3 Video Cards Example 3 with following Tip) of the FreeBSD Handbook.
Thanks!! I added the x11-driver (xf86-video-nv) then carried out the kld_list syntax in rc.conf and entered the nvidia-driver.conf file /usr/local/etc/X11/xorg.conf.d and through the graphics port installed drm-515-kmod. All is back to working.
 
Back
Top