Solved nividia-driver in to Freebsd-15.0 bug ?

Hi

#> freebsd-version -kru

15.0-RELEASE
15.0-RELEASE
15.0-RELEASE-p1
During the last upgrade, the driver:
nvidia-driver: 580.105.08 -> 580.119.02 [FreeBSD-ports]
causes the graphics session to fail.
If I choose a FreeBSD installation without this upgrade, the graphics system runs without problems.
Is this a bug affecting other users?


pciconf -vl


.......
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1f82 subvendor=0x10de subdevice=0x1f82
vendor = 'NVIDIA Corporation'
device = 'TU117 [GeForce GTX 1650]'
class = display
subclass = VGA
......


#> pkg repos


FreeBSD-ports: {
url : "http://pkg0.sjb.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 : "http://pkg0.sjb.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"
}
Thks
 
hi, Looks like we will live with this issue for a long time.
It appears to happend every time there is an updated FreeBSD-base Repo or updated KMOD Repo. The two REPOs are not kept in sync.
not even when you select the latest REPO for both the REPOs

Basically we need a CZAR that will enforce update both REPOs at the same time !

The remedy is to build nvidia drivers from ports or build using poudriere.
 
hi, Looks like we will live with this issue for a long time.
It appears to happend every time there is an updated FreeBSD-base Repo or updated KMOD Repo. The two REPOs are not kept in sync.
not even when you select the latest REPO for both the REPOs

Basically we need a CZAR that will enforce update both REPOs at the same time !

The remedy is to build nvidia drivers from ports or build using poudriere.
Yes, that's right. For now, I've locked the Nvidia package.
I'll try compiling it later.
Thanks
 
I think other threads have pointed out the problem is having a FreeBsd-kmods and FreeBsd-ports repo; the -kmods is older and if you are on 15.0 not needed. Solution was to edit the pkg conf to say that -kmods was "not enabled".
 
I think other threads have pointed out the problem is having a FreeBsd-kmods and FreeBsd-ports repo; the -kmods is older and if you are on 15.0 not needed. Solution was to edit the pkg conf to say that -kmods was "not enabled".
I try (new BE):)
 
Okay, since my first post this morning I've:
Upgraded FreeBSD 15.0 to pkgbasify
The GUI problem was still present

Now, first I booted into a fresh build, removed the Nvidia lock*
Disabled

FreeBSD-ports-kmods → disabled
and
FreeBSD-ports → enabled
FreeBSD-base → enabled

I performed a pkg upgrade
And the problem disappeared
I have a normal Xorg session
Confirmed: the issue is caused by having FreeBSD-ports-kmods enabled on FreeBSD 15.0 pkgbase or "normal"
After disabling FreeBSD-ports-kmods and upgrading NVIDIA again, the graphical environment works normally.
On 15.0 pkgbase, ports-kmods is not needed and causes ABI mismatches with the NVIDIA driver.
thks
 
When I joined the FreeBSD community some time ago I had suggested dependency resolvers. These are implemented in other communities I am a part of. I sourced a draft from the Google bots. Full transparency it is AI-generated but I polished the doc to FreeBSD format and read over the results.

uv and pixi package resolvers have been production-grade tested and resolve dependencies fairly fast. Maybe not to FreeBSD standard fast but fast.

I'll attach the doc for further discussions in the community
 

Attachments

The remedy is to build nvidia drivers from ports or build using poudriere.
It is "a remedy".

In general, almost all "package" problems can be solved by not using the available packages from the ports tree from the remote repositories and instead building them all individually or, en masse by, for example, using poudriere(8). These massive builds is not what I think of what is generally advisable to most users, unless there is a specifc motivation or specific and special reasons to do so.

Confirmed: the issue is caused by having FreeBSD-ports-kmods enabled on FreeBSD 15.0 pkgbase or "normal"
After disabling FreeBSD-ports-kmods and upgrading NVIDIA again, the graphical environment works normally.
On 15.0 pkgbase, ports-kmods is not needed and causes ABI mismatches with the NVIDIA driver.
thks
It is not "caused" by having the FreeBSD-ports-kmods enabled; this is an (mostly incorrect and) overly simplified view of what has happened.

There is no relevant distinction between having FreeBSD-ports-kmods not enabled
  • on a packaged base 15.0-RELEASE
  • on a non-packaged base 15.0-RELEASE; that is a 15.0-RELEASE based on traditional distribution sets.
Packages from the ports tree (from the FreeBSD-ports & FreeBSD-ports-kmods repositories) and base packages (from the FreeBSD-base repository) are two seperate and distinct items.

Frankly, when relying and using remote packages from the ports tree, I consider the "solution" of disabling the "kmods" as one of the clearly less preferred options; where the "kmods" refer to:
  • the FreeBSD-kmods repository on FreeBSD 14
  • the FreeBSD-ports-kmods repository on FreeBSD 15 and later

The kmods were set up to aid the faster introduction of newly developed (driver) code that is kernel sensitive; that is: suitable only to run on a specific kernel; in practice that means mostly a minor version specific kernel. That driver code is contained in so called kernel modules in packages from the ports tree. Currently that applies mostly to drivers as part of the graphics and wireles stack: Wifi drivers and graphics drivers contained in packages from the ports tree.

When there are two supported minor versions of the same major version, you are going to need those particular packages from a kmods repository: these will no longer show up in the main repository for packages from the ports tree; that is FreeBSD on a supported FreeBSD 14, or FreeBSD-ports on FreeBSD 15.

The upcoming overlap periods of three months are:
15.1-RELEASE may seem to be some time away. However, 14.4-RELEASE (and even the relevant stable/14 and pre-release cycle versions, the ALPHAx, BETAy and RCz ones before that) are not.

Disabling the "kmods", for example FreeBSD-kmods of 14.3-RELEASE (or 14.4-RELEASE) will get package users into problems when the relevant packages containing those kernel modules are available only from either:
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3",
or
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_4",
when these will still be disabled.



When confronted with a versions mismatch with the Nvidia drivers as mentioned here, I suggest, choose one of the following:
  1. build it from source
  2. use pkg upgrade -f -r <repository name> <package_of _the_right_version>: see here
  3. delete all Nvidia packages completely and install the normal way, see:
ad #3: for complete fresh installers, the "Nvidia" mismatch should no longer occur!
 
  • Like
Reactions: mer
It is "a remedy".

In general, almost all "package" problems can be solved by not using the available packages from the ports tree from the remote repositories and instead building them all individually or, en masse by, for example, using poudriere(8). These massive builds is not what I think of what is generally advisable to most users, unless there is a specifc motivation or specific and special reasons to do so.


It is not "caused" by having the FreeBSD-ports-kmods enabled; this is an (mostly incorrect and) overly simplified view of what has happened.

There is no relevant distiction between having FreeBSD-ports-kmods not enabled
  • on a packaged base 15.0-RELEASE
  • on a non-packaged base 15.0-RELEASE; that is a 15.0-RELEASE based on traditional distribution sets.
Packages from the ports tree (from the FreeBSD-ports & FreeBSD-ports-kmods repositories) and base packages (from the FreeBSD-base repository) are two seperate and distinct items.

Frankly, when relying and using remote packages from the ports tree, I consider the "solution" of disabling the "kmods" as one of the clearly less preferred options; where the "kmods" refer to:
  • the FreeBSD-kmods repository on FreeBSD 14
  • the FreeBSD-ports-kmods repository on FreeBSD 15 and later

The kmods were set up to aid the faster introduction of newly developed (driver) code that is kernel sensitive; that is: suitable only to run on a specific kernel; in practice that means mostly a minor version specific kernel. That driver code is contained in so called kernel modules in packages from the ports tree. Currently that applies mostly to drivers as part of the graphics and wireles stack: Wifi drivers and graphics drivers contained in packages fro the ports tree.

When there are two supported minor versions of the same major version, you are going to need those particular packages from a kmods repository: these will no longer show up in the main repository for packages from the ports tree; that is FreeBSD on a supported FreeBSD 14, or FreeBSD-ports on FreeBSD 15.

The upcoming overlap periods of three months are:
15.1-RELEASE may seem to be some time away. However, 14.4-RELEASE (and even the relevant stable/14 and pre-release cycle versions, the ALPHAx, BETAy and RCz ones before that) are not.

Disabling the "kmods", for example FreeBSD-kmods of 14.3-RELEASE (or 14.4-RELEASE) will get package users into problems when the relevant packages containing those kernel modules are available only from either:
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3",
or
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_4",
when these will still be disabled.



When confronted with a versions mismatch with the Nvidia drivers as mentioned here, I suggest, choose one of the following:
  1. build it from source
  2. use pkg upgrade -f -r <repository name> <package_of _the_right_version>: see here
  3. delete all Nvidia packages completely and install the normal way, see:
ad #3: for complete fresh installers, the "Nvidia" mismatch should no longer occur!
Yes very well, but the novice user does not have the requiered knowledge to solve it the described way, and will walk away.
 
It is "a remedy".

In general, almost all "package" problems can be solved by not using the available packages from the ports tree from the remote repositories and instead building them all individually or, en masse by, for example, using poudriere(8). These massive builds is not what I think of what is generally advisable to most users, unless there is a specifc motivation or specific and special reasons to do so.


It is not "caused" by having the FreeBSD-ports-kmods enabled; this is an (mostly incorrect and) overly simplified view of what has happened.

There is no relevant distiction between having FreeBSD-ports-kmods not enabled
  • on a packaged base 15.0-RELEASE
  • on a non-packaged base 15.0-RELEASE; that is a 15.0-RELEASE based on traditional distribution sets.
Packages from the ports tree (from the FreeBSD-ports & FreeBSD-ports-kmods repositories) and base packages (from the FreeBSD-base repository) are two seperate and distinct items.

Frankly, when relying and using remote packages from the ports tree, I consider the "solution" of disabling the "kmods" as one of the clearly less preferred options; where the "kmods" refer to:
  • the FreeBSD-kmods repository on FreeBSD 14
  • the FreeBSD-ports-kmods repository on FreeBSD 15 and later

The kmods were set up to aid the faster introduction of newly developed (driver) code that is kernel sensitive; that is: suitable only to run on a specific kernel; in practice that means mostly a minor version specific kernel. That driver code is contained in so called kernel modules in packages from the ports tree. Currently that applies mostly to drivers as part of the graphics and wireles stack: Wifi drivers and graphics drivers contained in packages fro the ports tree.

When there are two supported minor versions of the same major version, you are going to need those particular packages from a kmods repository: these will no longer show up in the main repository for packages from the ports tree; that is FreeBSD on a supported FreeBSD 14, or FreeBSD-ports on FreeBSD 15.

The upcoming overlap periods of three months are:
15.1-RELEASE may seem to be some time away. However, 14.4-RELEASE (and even the relevant stable/14 and pre-release cycle versions, the ALPHAx, BETAy and RCz ones before that) are not.

Disabling the "kmods", for example FreeBSD-kmods of 14.3-RELEASE (or 14.4-RELEASE) will get package users into problems when the relevant packages containing those kernel modules are available only from either:
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3",
or
Code:
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_4",
when these will still be disabled.



When confronted with a versions mismatch with the Nvidia drivers as mentioned here, I suggest, choose one of the following:
  1. build it from source
  2. use pkg upgrade -f -r <repository name> <package_of _the_right_version>: see here
  3. delete all Nvidia packages completely and install the normal way, see:
ad #3: for complete fresh installers, the "Nvidia" mismatch should no longer occur!
My goal was to get my system up and running quickly.
I'm using package binaries.
I no longer compile anything; I changed this since I stopped using Gentoo Linux.
Currently, my graphical system is working with FreeBSD-ports-kmods disabled.
All the hardware Wi-Fi, sound, Ethernet is also working.
Why should I enable FreeBSD-ports-kmods?
I don't quite understand.
Thanks
 
Yes very well, but the novice user does not have the requiered knowledge to solve it the described way, and will walk away.
"the novice user does not have the requiered knowledge to solve it the described way"
I quite agree.

On the same account, I think that the novice user is increasingly less inclined—and less knowledgeable— (and less encouraged) to build a port (here, the Nvidia port in question) locally from source (and to rebuild it when the source is upgraded), because:
  1. It requires that the correct sources (either the head of the ports tree or the appropriately labelled quarter) are installed *.
    - Fortunately this is documented in the Handbook.
  2. It requires the user to have the sources of the base system installed. This is not always the case; in fact, more often than not, that is my impression. These sources are necessary in order to build from the ports source code.
    - Unfortunately this is not documented in the Handbook last time I checked.
Ad #2:
When the source code of the base system is not installed, it is sometimes suggested that the user installs the source code via git(8). However, having the base system source code under Git control will almost inevitably result in a mismatch between that source code and the actually installed and updated/patched base system, as these two need to be kept in sync. This, in my view, is also something a novice user does not have the required knowledge to manage. See also: How to get sources installed and have these updated by freebsd-update(8) after a base-install

So, either way, the novice user may find themselves in a pickle. That is why this forum exists, I imagine. I also hope that this is the reason a novice user does not simply stop using FreeBSD “and walk away.”

___
* These need to be maintained, and additionally, note that when a user decides to switch from quarterly to latest, or vice versa, the git controlled sources of the ports tree have to be changed accordingly.
 
Why should I enable FreeBSD-ports-kmods?
I don't quite understand.
Currently, no reason.
But once upcoming 14.4 is released, its users thad do NOT want to build kernel module (kmod) ports by themselves should strongly want it until 14.3 reaches its EoL (about 3 months overlapping).

This is because:
  1. Official pre-built pkgs are built on each "oldest" supported minor release for each major releases.
  2. Not all, but at least some of kmod ports strongly depends on specific kernel internals that differs even between minor releases of same major release.
For 2., FreeBSD is far more aware of API/ABI/KPI compatibilities (source level compatibilities) compared with other non-BSD OS'es like Linux, but KBI cannot be assured to be.
For example, if struct A contained member foo and bar on x.y-RELEASE but new menber baz is added to support something (i.e., new device) on x.y+1-RELEASE, sources that doens't intend to support A->baz are NOT affected at all.
But in binary level, if any codes accessing any variable (regardless its type) allocated at next to struct A (say, variable B) does NOT know about member baz, thus, binaries built against x.y-RELEASE could erroneously access member baz as the variable next to it on x.y+1-RELEASE, as it does NOT know about baz and does NOT know the address of the variable B is moved by the increase in size of struct A.
FreeBSD "basically" assures ABI compatibilities by prohibiting this kind of things throuout single major releases as "POLA violation", but for KBI it's loosened to allow supporting newer hardwares.
 
Currently, no reason.
But once upcoming 14.4 is released, its users thad do NOT want to build kernel module (kmod) ports by themselves should strongly want it until 14.3 reaches its EoL (about 3 months overlapping).

This is because:
  1. Official pre-built pkgs are built on each "oldest" supported minor release for each major releases.
  2. Not all, but at least some of kmod ports strongly depends on specific kernel internals that differs even between minor releases of same major release.
For 2., FreeBSD is far more aware of API/ABI/KPI compatibilities (source level compatibilities) compared with other non-BSD OS'es like Linux, but KBI cannot be assured to be.
For example, if struct A contained member foo and bar on x.y-RELEASE but new menber baz is added to support something (i.e., new device) on x.y+1-RELEASE, sources that doens't intend to support A->baz are NOT affected at all.
But in binary level, if any codes accessing any variable (regardless its type) allocated at next to struct A (say, variable B) does NOT know about member baz, thus, binaries built against x.y-RELEASE could erroneously access member baz as the variable next to it on x.y+1-RELEASE, as it does NOT know about baz and does NOT know the address of the variable B is moved by the increase in size of struct A.
FreeBSD "basically" assures ABI compatibilities by prohibiting this kind of things throuout single major releases as "POLA violation", but for KBI it's loosened to allow supporting newer hardwares.
Okay, I understand.
Currently, I've upgraded to 15.0 and I'll follow the branch to then follow 16.0.
I've permanently switched to pkbasify and my hardware won't change.
If I add new hardware, I'll see if I activate the repository FreeBSD-ports-kmods
Thks
 
Back
Top