Solved Nvidia driver is outdated on FreeBSD 12.3

AMD cards might be better in this area because I think drm-kmod works on all AMD GPUs. Then you may never encounter a similar situation.
Nope. Newer cards require a newer version of the DRM code. Which may or may not be available for your version of FreeBSD. There are different versions of the driver there too.

so why isn't nvidia making one driver for all their GPUs?
They do. They only stop supporting the bottom end of the chain at certain intervals. Which is way I need to use the 390 version for my GT520. The later versions of the driver stopped supporting it.
 
It's always a difficult choice "what do we support". How long did it take for Windows to drop all the Win3.3 support? Long time if I recall correctly.
Autodetect the correct package, there are some distributions that do that pretty well GhostBSD I think is one.
In theory, it's not a "hard" job to do:
pciconf look for nvidia, get the GPU, then look it up in a table to figure out what package to install.

The big task is actually creating that look table that matches GPU to version. Here a link to a search I did for my GT740 and the Supported Products:

Look at that format and try and translate it to a table. Maybe there's something easier to parse in the source tarball, I haven't looked. Well I just looked there is a doc/supported-gpus/supported-gpus.json that looks like it has PCI IDs in it, so in theory you download all the tarballs, pull out the pciids and use that for lookups to figure out what to install.
It's possible that a gpu may be supported by more than one version, so you'd have to decide to I start with the newest driver or the oldest?

In theory that could be extended to include Intel and AMD checks and install drm-kmod.

Not saying it can't be done, more just saying "I'm not going to do it".
 
Just go here: https://www.nvidia.com/download/index.aspx?lang=en-us

Enter your card, pick FreeBSD x64 and see which version it suggests. In my case (for the GT520) it tells me to use 390.x. This then translates to x11/nvidia-driver-390. For the GT740 it suggests 470.x, which translates to x11/nvidia-driver-470. If that page suggests using the latest version then use x11/nvidia-driver.

If it suggests using 304, x11/nvidia-driver-304, then you're out of luck. That driver was broken after an Xorg-server update. And that's never going to get fixed. But we're talking about 15-20 year old cards here.
 
  • Like
Reactions: mer
Nope. Newer cards require a newer version of the DRM code. Which may or may not be available for your version of FreeBSD. There are different versions of the driver there too.
The amdgpu module is for post-HD7000 or Tahiti GPUs and the radeonkms module is for older GPUs (pre-HD7000 or pre-Tahiti). But it seems that both modules are integrated in the same package (drm-kmod). And it even seems that Intel Integrated Graphics also uses this same drm-kmod package. How it seems is that you just need to do pkg install drm-kmod, and then you have a driver that will work with any AMD/Intel GPU. I can be missing something. But that's how it seems to me.
Look at that format and try and translate it to a table. Maybe there's something easier to parse in the source tarball, I haven't looked. Well I just looked there is a doc/supported-gpus/supported-gpus.json that looks like it has PCI IDs in it, so in theory you download all the tarballs, pull out the pciids and use that for lookups to figure out what to install.
It's possible that a gpu may be supported by more than one version, so you'd have to decide to I start with the newest driver or the oldest?
In theory that could be extended to include Intel and AMD checks and install drm-kmod.
Not saying it can't be done, more just saying "I'm not going to do it".

Yes. It is something that takes time and dedication from a person. But it would be nice. More people would use FreeBSD if their graphics and X11 server worked right away. Now you either have people who simply find the current steps too much work that they want to avoid. Or you have people who simply don't have the technical skills to configure the graphics drivers and their move to FreeBSD usually comes to an end quickly: https://forums.freebsd.org/threads/graphics-driver-problem.57491/

On the one hand, you can say that those people don't have enough technical knowledge for FreeBSD. On the other hand, it often takes a while to learn how to work with a system, and if you get frustrated from the start or get a really bad impression, you might lose people who actually have the skills to work with the system.
 
Back
Top