Solved How to install driver for NVIDIA GTX 960?

Tried
  • nvidia-driver-340 in ports
  • the driver from nvidia official site, can't compile because of "stdarg.h", FreeBSD kernel src is installed, in the doc it says that the newset driver support FreeBSD 12 RC3
 
Tried
nvidia-driver-340 in ports

If you're using ports I recommend building it with ports-mgmt/portmaster because it will pull in all the dependencies needed at the start the build. Mine takes Linux emulation for the build and it enabled in /etc/rc.conf:

Code:
linux_enable="YES"

Then you'll need something in /boot/loader.conf depending on your card.
 
solved, kernel module nvidia-modeset is needed, for /boot/loader.conf:
Code:
nvidia_load="YES"
nvidia-modeset_load="YES"
 
Last edited by a moderator:
Add this to /etc/rc.conf instead of using loader.conf:
Code:
kld_list="nvidia-modeset"
 
It's the preferred way of loading kernel modules. The DRM modules are loaded the same way, this just keeps everything nicely organized.

Can nvidia.ko be loaded by rc.conf?
Works the same way,
Code:
kld_load="nvidia"
Note that you don't need to load both, nvidia-modeset will automatically load nvidia too.
 
I don't kld load at boot graphics components.... for debugging reasons.
I start my systems under console with a maximum compatibility and stability in mind... so I stay by default in the VGA text mode.
In vga text mode, no need of nvidia.ko and nvidia-modeset, this is the maximum compatibility mode.

If I run Xorg, launching xorg should automatically launch graphic kernel modules dependencies.
if I decide to switch the VT console in high resolution, so I kld load manually radeonkms.ko, i915kms.ko or nvidia-modset according to the hardware.

The advantage is.... if you install an update of nvidia-driver and this new update causes issues like kernel panic, the system will systematically crash at restart, you need to go to single user mode to edit rc.conf and/or loader.conf to deactivate temporarily theses modules.
 
Back
Top