View Single Post
  #1   (View Single Post)  
Old 27th March 2009
tangram's Avatar
tangram tangram is offline
Real Name: Ricardo Jesus
Port Guard
 
Join Date: May 2008
Location: Portugal
Posts: 36
Default HOWTO: Install and configure NVIDIA drivers on FreeBSD

FreeBSD's Ports collection contains the official NVIDIA binary drivers for hardware OpenGL rendering in X, using the GLX extensions.The x11/nvidia-driver points to NVIDIA's latest stable driver set.

If you are using a legacy card check NVIDIA's site to see which driver set supports your card and browse the Ports tree for the suitable driver version and install that instead.

Bellow are the steps needed to install NVIDIA drivers on i386 FreeBSD:

Code:
% su
# portsnap fetch update
# cd /usr/ports/x11/nvidia-drivers
# make config
# make install clean
# echo 'nvidia_load="YES"' >> /boot/loader.conf
# echo 'linux_enable="YES"' >> /etc/rc.conf
# echo 'hint.agp.0.disabled="1"' >> /boot/device.hints
Basically start by updating your ports tree, installing the driver and preparing FreeBSD to load the NVIDIA kernel module it at boot time. Consider selecting ACPI (enable support for ACPI Power Management) and LINUX (build with support for Linux compatibility) port options.

Now let's proceed by editing /etc/X11/xorg.conf to have it use the NVIDIA driver and add some options to increase performance.

Edit /etc/X11/xorg.conf and change the driver value from "nv" to "nvidia":

Code:
Driver "nvidia"
Under the Device section of xorg.conf add the following options:

Code:
Option "RenderAccel" "True"
Option "NoRenderExtension" "False"
Option "NoFlip" "False"
Option "UseEdid" "True"
Option "NvAGP" "1"
Additional performance options can be enabled, however these might affect stability. To enable Side Band Addressing and Fast Writes add the following sysctls to /etc/sysctl.conf:

Code:
# echo "hw.nvidia.registry.EnableAGPSBA=1" >> /etc/sysctl.conf
# echo "hw.nvidia.registry.EnableAGPFW=1" >> /etc/sysctl.conf
Finally:

Code:
# reboot
Additional ports of interest when configuring X with NVIDIA:

Code:
x11/nvidia-settings
x11/nvidia-xconfig
Further reading material can be found under:
http://www.freebsd.org/doc/en/books/handbook/x11.html
/usr/local/share/doc/NVDIA_GLX-1.0/
__________________
BSD and Linux tips and tutorials: Blog Linux/BSD: sharing experiences
Reply With Quote