Solved pkg upgrade does not upgrade kernel modules

I upgraded FreeBSD from version 14.2 to 14.3. After the upgrade, I made changes to file /usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest"
}
FreeBSD-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}"
}

Upgrading packages with pkg upgrade leaves the kernel modules at version 14.2. The pkg search command lists both versions, 14.2 and 14.3. Why does pkg upgrade not upgrade modules to the new version 14.3?
 
It works. Is it necessary to always specify the repository? I thought pkg would automatically select the latest version of the package.
 
I tried pkg and found that pkg install selects the latest version of kernel module, unlike pkg upgrade. So it seems that pkg can handle multiple repositories.

BTW, the x11/nvidia-driver is only for version 14.2. Does anyone know why?
 
pkg upgrade after update FreeBSD from 14.2 to 14.3 it pull drm-61-kmod for 14.3
I suspect that the drivers containing the graphics kernel modules were already from the FreeBSD-kmods repository on your computer; that means with your 14.2-RELEASE you had the correct set-up for the FreeBSD-kmods repository working.

I tried pkg and found that pkg install selects the latest version of kernel module, unlike pkg upgrade. So it seems that pkg can handle multiple repositories.
"So it seems that pkg can handle multiple repositories.", no it cannot do that correctly under all circumstances. I also advise:
Instead of using only pkg upgrade, use:
pkg upgrade -r FreeBSD
pkg upgrade -r FreeBSD-kmods

From past experiences (when 14.1-RELEASE just had gone EoL and I was using 14.2-RELEASE with a FreeBSD-kmods set-up), when 14.2-RELEASE goes EoL and 14.3-RELEASE is the only supported release version of the 14-branch, the FreeBSD-kmods repository set-up will still be active, (unless you disable it), however, newer package versions for 14.3-RELEASE, such as for graphics]/drm-61-kmod will be released in the FreeBSD repository and no longer in the FreeBSD-kmods repository: then pkg upgrade -r FreeBSD becomes necessary; unless by that time pkg(8) has been remied to work with multiple repositories under all circumstances of course.
 
I suspect that the drivers containing the graphics kernel modules were already from the FreeBSD-kmods repository on your computer; that means with your 14.2-RELEASE you had the correct set-up for the FreeBSD-kmods repository working.

pkg upgrade -r FreeBSD-kmods

From past experiences (when 14.1-RELEASE just had gone EoL and I ws using 14.2-RELEASE with a FreeBSD-kmods setup), when 14.2-RELEASE goes EoL and 14.3-RELEASE is the only supported release version of the 14-branch, the FreeBSD-kmods repository set-up will still be active, (unless you disable it), however, newer package versions for 14.3-RELEASE, such as for graphics]/drm-61-kmod will be released in the FreeBSD repository and no longer in the FreeBSD-kmods repository: then pkg upgrade -r FreeBSD becomes necessary; nless by that time pkg(8) has been remied to work with multiple repositories under all circumstances of course.
In /usr/local/etc/pkg/repos/FreeBSD.conf I have:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-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
}
I thought If I have kernel related pkg that pull what is the last one.
 
On my freebsd 14.3-release and the passage to PKGBASIFY
/usr/local/etc/pkg/repos/
: 3 files
FreeBSD-base.conf
FreeBSD-kmods-latest.conf
FreeBSD.conf
Code:
root@HP-BSD > pkg repos
FreeBSD: { 
    url             : "http://pkg0.nyi.freebsd.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    priority        : 0,
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-base: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/base_release_3",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-kmods: { 
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_latest_3",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
Code:
root@HP-BSD > pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Updating FreeBSD-kmods repository catalogue...
pkg: Repository FreeBSD-kmods has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%    179 B   0.2kB/s    00:01   
Fetching data.pkg: 100%   29 KiB  30.1kB/s    00:01   
Processing entries: 100%
FreeBSD-kmods repository update completed. 208 packages processed.
All repositories are up to date.
and
Code:
root@HP-BSD > pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
 
In /usr/local/etc/pkg/repos/FreeBSD-kmods-latest.conf I have:
Code:
FreeBSD-kmods: {
  url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}",
  priority: 1
}
From pkg.conf():
The priority option in FreeBSD.conf file affects pkg install, not pkg upgrade in my case.

It is confusing, as the command pkg search nvidia-driver only shows the versions for 14.2, but the web page https://ports.freebsd.org/cgi/ports.cgi lists versions for 14.3.
 
It is confusing, as the command pkg search nvidia-driver only shows the versions for 14.2, but the web page https://ports.freebsd.org/cgi/ports.cgi lists versions for 14.3.
This link is the entry point for that search page without any search term specified. I can't get results where it references 14.3 for nvidia-driver; it's unclear to me what you mean.

Can you clarify what exact search term you are using that gives a result with a reference to a 14.3 version?
 
BTW, the x11/nvidia-driver is only for version 14.2. Does anyone know why?
Because builder for kmod repo does NOT build it.
So as graphics/nvidia-drm-[510|515|61|66]-kmod[-devel].

I'm proposing restructuring with my WIP patch with the hope that kmod parts are built on kmod repo builder on PR 288314. But unfortunately still no responses. (Also pinged on ML.) If the concept is accepted by admins of kmod repo builders, I'll restart the work.
 
Thanks for your response. However, then I just have no idea what you ment to say.

As is reflected in the response from T-Aoki as well, I cannot see any specific version of anything pertaining to an Nvidia driver that at the moment has been specifically build as a package for a 14.3-RELEASE version, that is: matching a 14.3-RELEASE kernel version specifically; because there just isn't such an Nvidia driver.

Rich (BB code):
# uname -a
FreeBSD tm1 14.3-RELEASE FreeBSD 14.3-RELEASE releng/14.3-n271432-8c9ce319fef7 GENERIC amd64
# pkg rquery -x  '[%R] %n %v' '^drm(-|-510-|-515-|-61-)kmod|nvidia' | column -t
[FreeBSD]        drm-515-kmod                    5.15.160.1402000_6
[FreeBSD]        drm-61-kmod                     6.1.128.1402000_5
[FreeBSD]        drm-kmod                        20250428
[FreeBSD]        libva-nvidia-driver             0.0.14_2
[FreeBSD]        linux-nvidia-libs               570.172.08
[FreeBSD]        linux-nvidia-libs-304           304.137
[FreeBSD]        linux-nvidia-libs-340           340.108
[FreeBSD]        linux-nvidia-libs-390           390.157
[FreeBSD]        linux-nvidia-libs-470           470.256.02
[FreeBSD]        linux-nvidia-libs-devel         575.64.05
[FreeBSD]        nvidia-driver                   570.172.08.1402000
[FreeBSD]        nvidia-driver-304               304.137.1402000_10
[FreeBSD]        nvidia-driver-340               340.108.1402000_4
[FreeBSD]        nvidia-driver-390               390.157.1402000
[FreeBSD]        nvidia-driver-470               470.256.02.1402000_1
[FreeBSD]        nvidia-driver-devel             575.64.05.1402000
[FreeBSD]        nvidia-drm-515-kmod             570.172.08.1402000_3
[FreeBSD]        nvidia-drm-515-kmod-devel       575.64.05.1402000_3
[FreeBSD]        nvidia-drm-61-kmod              570.172.08.1402000_2
[FreeBSD]        nvidia-drm-61-kmod-devel        575.64.05.1402000_2
[FreeBSD]        nvidia-drm-kmod                 570.172.08
[FreeBSD]        nvidia-drm-kmod-devel           575.64.05
[FreeBSD]        nvidia-settings                 570.169
[FreeBSD]        nvidia-texture-tools            2.1.2
[FreeBSD]        nvidia-xconfig                  570.169
[FreeBSD]        nvidia_gpu_prometheus_exporter  g20181028_28
[FreeBSD-kmods]  drm-515-kmod                    5.15.160.1403000_6
[FreeBSD-kmods]  drm-61-kmod                     6.1.128.1403000_5

The last two lines, containing the packages drm-515-kmod and drm-61-kmod in the FreeBSD-kmods repository, are the only two wrt to the "drm*kmod"-type packages and any packages having 'nvidia' in their package name, that are specifically build to 14.3-RELEASE: Nvidia graphics drivers are not in the FreeBSD-kmods repository. Nvidia drivers, however, are only in the FreeBSD repository, which, as is shown by their version number in the third output column containing 1402000, have been build against 14.2-RELEASE.
 
The last two lines, containing packages drm-515-kmod and drm-61-kmod in the FreeBSD-kmods repository, are the only two wrt to the "drm*kmod"-type packages and any packages having 'nvidia' in their package name, that are specifically build to 14.3-RELEASE: Nvidia graphics drivers are not in the FreeBSD-kmods repository. Nvidia drivers, however, are only in the FreeBSD repository, which, as is shown by their version number in the third output column containing 1402000, have been build against 14.2-RELEASE.
drm-*-kmod are for non-nvidia (say, Intel and AMD) GPUs.

drm-66-kmod is only for main (aka 15-Current), as 14.* and prior versions does not have required codes in LinuxKPI MFC'ed.

And if I recall correctly, 14.3 dropped support for drm-510-kmod, thus, not being built. So would be for corresponding nvidia variants even if my proposal is accepted, as nvidia-drm-[510|515|61|66]-kmod[-devel] requires sources from corresponding drm-[510|515|61|66]-kmod in conjunction with sources from corresponding nvidia-driver[-devel], thus, has the same limitations.

If I understand correctly with the quoted parts of mail archive I've linked on Comment #14, resources / build methods of kmod repo is NOT the same as normal pkg repo, thus, having additional strict limitations, making x11/nvidia-driver* ports not to be built at least in current in-tree form, thus, nvidia-drm-*-kmod* which depends on it cannot be built, too.

My proposed (Work In Progress, though) patch tends NOT to hit the limitations for kmods. nvidia-driver* packages should remain in regular repo only, but kmod parts are splitted into brand-new nvidia-kmod*, and nvidia-drm-*-kmod* would decoupled from nvidia-driver*, depending on nvidia-kmod* instead.
 
Back
Top