How to install NVIDIA Drivers from official site

How to install NVIDIA Drivers downloaded from official site.

I decided to write this tutorial because I did not find any documentation to install the Nvidia driver downloaded directly from the site. NVIDIA's instructions about this are not enough. The reason for this is that the official driver is more updated.

Download the nvidia driver:
Code:
$ cd ~/Downloads
$ fetch http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/361.28/NVIDIA-FreeBSD-x86_64-361.28.tar.gz
Download your current kernel source:
Code:
$ cd ~/Downloads
$ fetch ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r`/src.txz
Login with root user and execute this to decompress kernel source on the right place:
Code:
# tar -C / -xzvf src.txz
Decompress and install nvidia driver:
Code:
# tar -vxzf NVIDIA-FreeBSD-x86_64-361.28.tar.gz
# cd NVIDIA-FreeBSD-x86_64-361.28
# make install
In theory the installation script Nvidia make all configuration, but in my case, I use UEFI, so I had problems with nvidia modules load drivers at boot. If this is your case, before restart follow the steps below:

Install Nano, like root (It's more easy to use):
Code:
# pkg install nano
Open the file /boot/loader.conf
Code:
# nano /boot/loader.conf
Comment (recommend) or delete all entry from Nvidia to disable them:
Code:
#nvidia_load="YES"
#nvidia_name="nvidia"
#nvidia_modeset_load="YES
#nvidia_modeset_name="nvidia-modeset"
Save with CTRL + O and exit with CTRL + X.

Now open the file /etc/rc.conf
Code:
# nano /etc/rc.conf
And add these lines:
Code:
### Nvidia Boot Settings ###
kld_list="nvidia nvidia-modeset"
nvidia_name="nvidia"
nvidia_modeset_name="nvidia-modeset"
Save with CTRL + O and exit with CTRL + X.

I'm not sure if this file works by the order of entries, as I am new to FreeBSD, then I recommend that you put these entries before the lines that carry the GDM and Gnome, or any other X Manager installed. Correct me if I'm wrong.

At last, execute the command below to generate the file /etc/X11/xorg.conf with Nvidia config:
Code:
# nvidia-xconfig
Reboot the system and be happy.

Sorry about my bad English. :)
 
I sincerely appreciate the time you took to write this up but it's not a good idea to install the Nvidia driver from Nvidia's website. The Nvidia driver port (x11/nvidia-driver) has been patched by the port maintainer to install and update cleanly. When installing the driver from Nvidia's website, what will likely happen is the first time you attempt to update your system or Xorg, you will not longer be able to access the desktop. The reason being is the driver from Nvidia's website overwrites existing files from your installation and replaces them with Nvidia specific files. When you update, those files will then be replaced with the previous versions of the files and the Nvidia driver will cease to function preventing you from using X any longer.

It is much better to wait until the port is updated then to install the driver from the website.
 
It is much better to wait until the port is updated then to install the driver from the website.
If you want a quick solution, or if you're trying the new driver to see if it works, just edit the port's Makefile and change the version numbers. Then run make makesum. After that you can build the port as usual. If the adjusted port works you can use the info to submit a patch to get the main port updated.

That way you can keep the registrations for packages and can more easily keep track of the versions. It'll also help others who also would like to have an updated driver.
 
If you want a quick solution, or if you're trying the new driver to see if it works, just edit the port's Makefile and change the version numbers. Then run make makesum. After that you can build the port as usual. If the adjusted port works you can use the info to submit a patch to get the main port updated.

That way you can keep the registrations for packages and can more easily keep track of the versions. It'll also help others who also would like to have an updated driver.
Yes, this works, though not with the newest available Nvidia driver versions. :(

If you are really feeling adventurous, you could apply the patch for Nvidia driver version 355.11 from PR 201340, comment #21. I've been testing this driver version and it does work though there are still problems switching back to the console when using UEFI for me. Nvidia driver version 361.28 supposedly has some improvements for this but unfortunately the driver has issues according to the PR and I haven't tried it myself.
 
I sincerely appreciate the time you took to write this up but it's not a good idea to install the Nvidia driver from Nvidia's website. The Nvidia driver port (x11/nvidia-driver) has been patched by the port maintainer to install and update cleanly. When installing the driver from Nvidia's website, what will likely happen is the first time you attempt to update your system or Xorg, you will not longer be able to access the desktop. The reason being is the driver from Nvidia's website overwrites existing files from your installation and replaces them with Nvidia specific files. When you update, those files will then be replaced with the previous versions of the files and the Nvidia driver will cease to function preventing you from using X any longer.

It is much better to wait until the port is updated then to install the driver from the website.
I used the code from the NVidia website and built it and it works with no problems, just a heads up. I have FreeBSD-11 installed and I had to buy a PNY card with the NVidia chip set Gforce-710. FreeBSD would NOT see my Intel-Q35 graphics card, other than the standard VGA mode.
 
it's not a good idea to install the Nvidia driver from Nvidia's website. The Nvidia driver port (x11/nvidia-driver) has been patched by the port maintainer to install and update cleanly
If the driver from Nvidia website is already installed, is it a good idea to install one from the port? In other words: is it safe to do?
The reason I'm asking is that I have issues with mine.
 
If the driver from Nvidia website is already installed, is it a good idea to install one from the port?
No. I would suggest removing the NVidia driver and always use the port/package. That's the only way the system can keep track of installed files.

In other words: is it safe to do?
No, the system doesn't know you installed something outside of the ports/package system. So it simply assumes there's nothing installed and will overwrite the existing files without cleaning up.
 
the system doesn't know you installed something outside of the ports/package system
Do you mean that I should not install the driver from FreeBSD port without uninstalling the one from Nvidia web site? But if the later has already overwritten some files, wouldn't its uninstallation be more harmful?
 
And this is exactly the reason why you should always use the port or package. Because you will inevitably end up clobbering something.
 
I sincerely appreciate the time you took to write this up but it's not a good idea to install the Nvidia driver from Nvidia's website. The Nvidia driver port (x11/nvidia-driver) has been patched by the port maintainer to install and update cleanly. When installing the driver from Nvidia's website, what will likely happen is the first time you attempt to update your system or Xorg, you will not longer be able to access the desktop. The reason being is the driver from Nvidia's website overwrites existing files from your installation and replaces them with Nvidia specific files. When you update, those files will then be replaced with the previous versions of the files and the Nvidia driver will cease to function preventing you from using X any longer.

It is much better to wait until the port is updated then to install the driver from the website.
That may be true, but I have been using the website download now for about 6 months and have found NO problems !!!!
 
Cool stuff; prefer the "commercial" drivers as I bought the hardware for a reason. I do appreciate freeware and open source, but I do not accept license terms for other's ego issues. The newer NVidia cards have phenomenal drivers and when used offer pretty decent performance and visuals for systems besides Windows. Native drivers are another reason to migrate OSS tasks committing resources to a BSD distro.

Will be trying this stuff out very soon. Thanks for taking the time and shedding light on the matter.

CUDA developer libraries are floating around now too --awesome. Don't know if they're in ports or not, but imagine they'll be there soon enough.
 
The nVidia drivers page on nVidia's website say "supports X11 and xorg"

However i've downloaded them: they have hacked out X11 support and include ONLY xorg support
 
yes nVidia drivers hose your /usr/X11/lib/modules and etc

back them up first

but i disagree if you upgrade it may or may not be harm done. if you upgrade you may or may not be able to re-install the same nVidia driver. in then end if there's "a bad file" you'll find it. but doubtful since if you upgrade it'll be overwritten (we're freebsd here not debian!). and files not overwritten are likely not gonna be used by the upgrade system. what might *not* work is if nVidia's driver doesnt' like your libs - but they tell you if they will before you download and they're likely right

and i disagree that xorg drivers "are better than nVidia's original release but correct for your system". in the past xorg was infamous for bad drivers esp. intel ones. people who used drivers off nVidia site had far less problems AND BINARY BLOBS that "worked" (non-free of course).

that may be less true today of course, perhaps all xorg does today is copy off nVidia releases or perhaps the same bloke actually works both positions now :)
 
Does this still work? I keep getting errors concerning "stdarg.h". I need at least the 430 driver for my 16xx series card.
 
Wow. It's like I just said that and you're repeating it back to me for posterity! :rolleyes:
Ports and pkg only has 390.xx
 
Hmm. Patch works but install fails due to missing GL libraries in the work folder. Not sure if it has something to so with libglvnd which doesn't exist but there's a patch for it.🤔 Guess I'll wait for an official port.
 
Back
Top