DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #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
Thanked 2 Times in 2 Posts
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
  #2   (View Single Post)  
Old 28th March 2009
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,080
Thanked 198 Times in 156 Posts
Default

I checked what your configuration tweaks do, and they don't seem to be very useful:

Quote:
Originally Posted by tangram
Option "RenderAccel" "True"
According to the nVidia documentation:

Code:
Option "RenderAccel" "boolean"

    Enable or disable hardware acceleration of the RENDER extension. Default:
    hardware acceleration of the RENDER extension is enabled.

Quote:
Originally Posted by tangram
Option "NoRenderExtension" "boolean"
As I understand it, this option is not needed, and is useful mostly for disableing the RENDER extension, not for explicitly enabling it (It is always enabled if the X server supports it), from the nVidia documentation:

Code:
Option "NoRenderExtension" "boolean"
    Disable the RENDER extension. Other than recompiling it, the X server does
    not seem to have another way of disabling this. Fortunately, we can
    control this from the driver so we export this option. This is useful in
    depth 8 where RENDER would normally steal most of the default colormap.
    Default: RENDER is offered when possible.

Quote:
Originally Posted by tangram
Option "NoFlip" "False"
Again, as I understand it this option is always enabled if supported, from the nVidia documentation:

Code:
Option "NoFlip" "boolean"

    Disable OpenGL flipping; see Chapter 17 for a description. Default: OpenGL
    will swap by flipping when possible.

[...]

   o Flipping: When OpenGL flipping is enabled, OpenGL can perform buffer
     swaps by changing which buffer the DAC scans out rather than copying the
     back buffer contents to the front buffer; this is generally a much higher
     performance mechanism and allows tearless swapping during the vertical
     retrace (when __GL_SYNC_TO_VBLANK is set). The conditions under which
     OpenGL can flip are slightly complicated, but in general: on GeForce or
     newer hardware, OpenGL can flip when a single full screen unobscured
     OpenGL application is running, and __GL_SYNC_TO_VBLANK is enabled.
     Additionally, OpenGL can flip on Quadro hardware even when an OpenGL
     window is partially obscured or not full screen or __GL_SYNC_TO_VBLANK is
     not enabled.

Quote:
Originally Posted by tangram
Option "UseEdid" "True"
Enabled by default, no reason to set it, from the nVidia documentation:

Code:
Option "UseEDID" "boolean"

    By default, the NVIDIA X driver makes use of a display device's EDID, when
    available, during construction of its mode pool. The EDID is used as a
    source for possible modes, for valid frequency ranges, and for collecting
    data on the physical dimensions of the display device for computing the
    DPI (see Appendix I). However, if you wish to disable the driver's use of
    the EDID, you can set this option to False:
    
        Option "UseEDID" "FALSE"
    
    Note that, rather than globally disable all uses of the EDID, you can
    individually disable each particular use of the EDID; e.g.,
    
        Option "UseEDIDFreqs" "FALSE"
        Option "UseEDIDDpi" "FALSE"
        Option "ModeValidation" "NoEdidModes"
    
    Default: True (use EDID).

Quote:
Originally Posted by tangram
Option "NvAGP" "1"
Again, this is the default, nVidia documentation:

Code:
When built with support for the FreeBSD AGP driver, 'nvidia.ko' will fall back
to using NvAGP when it doesn't detect 'agp.ko' (this will be the case when
'agp.ko' does not support your AGP chipset or was explicitly disabled with
device hints).
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 29th March 2009
tangram's Avatar
tangram tangram is offline
Real Name: Ricardo Jesus
Port Guard
 
Join Date: May 2008
Location: Portugal
Posts: 36
Thanked 2 Times in 2 Posts
Default

Thanks for the inputCarpetsmoker.

Yeah those are default settings. I just figured they were important enough to have on xorg.conf as remainder not to change them.
__________________
BSD and Linux tips and tutorials: Blog Linux/BSD: sharing experiences
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Install and setup MLDonkey on FreeBSD tangram Guides 0 7th January 2009 05:13 PM
FreeBSD NVidia driver installation maxrussell FreeBSD Ports and Packages 44 15th July 2008 10:39 PM
HOWTO: Always install an up-to-date port chris Guides 8 28th May 2008 11:53 AM
PAE and official Nvidia drivers rubenerd FreeBSD General 2 20th May 2008 10:53 PM
Strange FreeBSD Issues (USB/Nvidia Drivers) bjstick FreeBSD Installation and Upgrading 7 13th May 2008 10:20 AM


All times are GMT. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick