[SOLVED] how to install the NVIDIA proprietary driver

Hello FreeBSD community !
I just start to use FreeBSD and really love it, but, working on a 27' monitor, (webdesigner) i'd prefer to use my 1660ti nvidia card instead of internal intel card...
I tried a lot of tutos and tested it, whole the last night, always awake 🤓 ... tried more than 10 times with xorg and xfce4 and slim, without success... I followed this https://docs.freebsd.org/doc/7.3-RELEASE/usr/share/doc/en/articles/compiz-fusion/nvidia-setup.html
and few others founded on the web but nothing worked, i probably did'nt saw the good one :(
I used the nvidia-driver pkg but it stuck on the bootloader as explain on the docs.freebsd.org... is there a good full tuto to correctly do this please ?

thanks in advance for your help !
(and sorry for my bad english, its not my native language)
 
Thanks doc, are you sure there is a xorg problem ?
I already instaled it, i followd thé Riba linux freebsd installation on YouTube, Step by step... and it works fine, except when try to install this nvidia driver
 
What version of FreeBSD? Are you using a "RELEASE" channel? (Like FreeBSD-13 RELEASE)? Reason for asking is the link you have talks about 7.3 which has been end of life, put out to pasture for a long time.
I'm assuming that everything worked fine with the internal Intel device? If so that gives us a baseline (like your user is already part of the video group)

If so should be something like this (as root):

If you have anything in /boot/loader.conf relating to nvidia remove the lines. You may need to do some stuff at the loader prompt to unload modules and boot to single user mode.

pkg install nvidia-driver
sysrc -f /etc/rc.conf kld_list+=" nvidia-modeset.ko nvidia.ko" NOTE the space after the opening quote
Create /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf with the following contents:
Section "Device" Identifier "NVIDIA Card" VendorName "NVIDIA Corporation" Driver "nvidia" EndSection

That should be enough to get it going. To test, I would boot to a console instead of a graphical login, verify the modules are loaded with
kldstat | grep nvidia

then type in "startx".
 
Yes Mer its à fresh install of v13 release, gona try it now many thanks !
Good, that's what I was hoping. The steps I listed above is all that I needed to do. The keys are getting kld_list in /etc/rc.conf correct and the added file over in /usr/local/etc/X11/xorg.conf.d. The first part says to actually load the modules on boot, the second tells X to load the nvidia driver.

You may also want to add the following to /boot/loader.conf:
hw.vga.textmode="1"

The nvidia drivers have (had?) issues if you switched from X to a different virtual console, they would just have different colored blocks on the screen. That line prevents that and lets you actually use the virtual console.
 
i just installed the whole xorg xfce4 slim etc pkg's, sets the sysrc...enable=YES etc, and always on root, after all, installed the nvidia-driver, but got stuck after this part ;) I'm reinstalling all now ;)
 
Just reinstall the whole system, log in on root user, install and set xorg xfce4 slim nvidia-driver etc pkg's, sets the sysrc...enable=YES etc,
kg install nvidia-driver
sysrc -f /etc/rc.conf kld_list+=" nvidia-modeset.ko nvidia.ko" NOTE the space after the opening quote
Create /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf with the following contents:

Section "Device"
Identifier "NVIDIA Card"
VendorName "NVIDIA Corporation"
Driver "nvidia"
EndSection

done and before reboot, just tested "startx" and got
"fatal server error :
(EE) no screens found (EE)"

i dont still reboot cause i set a exec startxfce4 on my .xinitrc
 

If more than one video card is present, the BusID identifier can be uncommented and set to select the desired card. A list of video card bus IDs can be displayed with pciconf -lv | grep -B3 display.
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
    BusID    "PCI:1:0:0"  <--- may need to be set to what the previous command reports
EndSection

Perhaps this will hopefully help? I have never used a multi-card setup before admittedly.
 
The no screens. Hmm.
Did you go into the BIOS and actually disable the Intel device and set it to use the Nvidia as default? That may help.
Just for grins, rename your .xinitrc so you have a little more control.
startx should then give you the good old TWM.

You may need to add a "BusID" line to the file you created. You should be able to get the value from pciconf command.
I see I was too slow, thanks kpedersen
 
is there a way to break the reboot loop or i again need to reinstall all ?
Are you rebooting the machine?

You should be able to use ctrl-alt-f1 to go back to the terminal (and change some things). I would also recommend avoiding desktop environments and display managers until Xorg is working correctly first. Just use startx to test.
 
will reinstall again, without sets xinitrc... i just disable the internal CPU graphic card on my bios, only have this nvidia card and i5 internal graphic chipset
 
just redo and the xorg log file tell me : no device specified for screen "Screen0"
i really start thinking coming back to archlinux...
 
It show me
 

Attachments

  • 20210821_181531.jpg
    20210821_181531.jpg
    1.8 MB · Views: 127
Back
Top