Click to See Complete Forum and Search --> : HOWTO:nVidia SLI under Linux, howto, plus tweaks.


Piko
04-21-2007, 03:04 PM
Well, for about half a year I've had an SLI ready motherboard, the DFI Lanparty UT nF4 SLI-D, and a single SLI ready nVidia XFX 7600 GT XXX edtion. On Thursday this week I recieved my 2nd nVidia XFX 7600 GT XXX edition graphics card, and I was ready to rock.

First off, I'd like to dodge some responsibility. I give no guarantees, nor am I responsible if you damage your system after using my HOWTO.

Well the first thing you need to know when you get ready to buy another card to SLI with your current one is, you must get a card with the same chip set, and same amount of video memory, and preferably from the same manufacturer as the first graphics card. Though I heard the later isn't necessary, but it's recommended. Here is my example, I have two XFX 7600 GTs, the first is version 4.2, and the 2nd was a version 5.1 of the brand from XFX, but that's fine because they both have the 7600 GT cores, and they both have 256 MB of video memory, even though there BIOS versions are slightly off it doesn't matter.

Don't be afraid if the versions of the cards are slightly off. I received a slightly newer version of XFX's 7600GT XXX were they put a larger heat sink on it, improved the boards layout, and updated the BIOS, but it's not a problem. You just have to make sure that the slower of the two cards is in the first slot, so that the faster card is force to clock down to sync with the slower one. If you put the faster one in the first slot, then the slower one is going to clock up, and it might over heat the card, and damage it.

Now attach the SLI bridge that came with your SLI ready mother board on the two SLI prongs on both the cards. It doesn't matter what way the bridge is facing.

Now you need to check your motherboard's instructions on how to turn on SLI on. Most of the time it's an option in the BIOS, in my case I had to move 8 8 by 3 jumper blocks around on the mother board.

Now go to your boot system, LILO, or GRUB, and tell it to boot the system into run level 3, or any other run level that won't start an Xorg/X11 system. Sometimes if set incorrectly it will crash the system.

Now if you haven't installed the nVidia drivers, do so now by going into root, and running the installer "sh NVIDIA-Linux-<ARC>-<VERSION>.run"

If you can configure your xorg.conf your self, then just skip to turning SLI on.

The next part is for SuSE users who want to configure with Sax2, because this is a trick.

########SAX2 Configuration###########

log into root if you already are not.

Run the command sax2 -r -c 0 -m 0=nvidia the "-c 0" is telling sax2 we want the setup dialog on the first video card, not the second.

Now configure your card the way you like, and test it.

Exit sax2.

Now SLI isn't on yet, we've just configure X to use the first card alone.

Read ahead to Turing SLI On.

########END OF USING SAX2##########

Now I'll explain how other distro that don't use Sax2 can set up their card

#######USING NVIDIA X-Config#########

Simply run nvidia-xconfig in your /etc/X11 directory.

If you want to activate things like composite, or render acceleration for you fancy beryl desktop, just "man nvidia-xconfig", or read nVidia's readme on their website.

####### END OF USING X-Config#######

Now you want to turn on SLI to use that bad boy for alll your "n00b pwning" needs.

########TURNING ON SLI###########

Open your /etc/X11/xorg.conf in your favorite text editor!

Now find
Section "Screen"

add the line
Option "SLi" "true"

It might look like this.

Section "Screen"
Identifier "Screen[0]"
Device "Device[0]"
Monitor "Monitor[0]"
DefaultDepth 24
Option "RenderAccel"
Option "SLi" "true"
SubSection "Display"
Depth 15
Modes "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
EndSection


You can change the "true" value of the SLI option to other things to change how the SLI works. I like the option "SFR" this is Split Frame Render, it does what you might think, one card draw one half of the frame, and the other draws the other half. Read nVidia's appendix of Xconfig values to see the other options.

Note you shouldn't make a device node for the second graphics card! You only need one device node for the first! like this.


Section "Device"
Identifier "Device[0]"
Driver "nvidia"
VendorName "NVidia"
BoardName "GeForce 7600 GT"
EndSection



########END TURNING ON SLI###########

Edit: After some tinkering I've now got a good idea on the
three types of SLI methods.

############SLI Options#############

Under your xorg.conf you can change the line under display

Option "SLi" "true"

to something a little more specific. There are three major SLI render methods for Linux, and based on what your doing, and your setup will decide the one you should use.

"AFR" is Alternating Frame Render. This means that when one card is rendering a frame the 2nd card is already working on the next one. This is the defualt setting, and for the most part the most stable. It will give you the highest average frames per second, but this doesn't mean it's the best.

"SFR" is Split Frame Render. This will have one card render the top have of a frame, and the other will render the bottom half. It will adjust how much of the frame each card will render, based on the complexity of both halves. You can see what this means by turning the SLI Heads Up Display on in your nvidia control panel. This will give you the smoothest frame rate, but it does come at a cost. If your cards have even the slightest difference between them you will see corruptions on occasion. If your VBIOS version are not exact you will most likely see problems with this mode, although they may be minor.

"AA" is Anti Aliasing render mode. The first card will render the base frame, and the second will apply the anti aliasing to the scene. Though if you got the 2nd card because you were low on FPS running with only one, the this isn't the setting for you. It won't improve your FPS, it'll only improve the render quality with Anti Aliasing.

#########End of SLI Options###########

I hope this helps some people who are planning on getting ready to build an SLI system. I know first hand how worthless the slizone.com's information for Linux users can be. If anyone has any extra information to aad, or any extra tweaking ideas I'd love to know.

edit: Yeah, it doesn't double the amount of video memory, because both cards need to have the same information stored twice. My Voodoo 2x2 had 2x8 MB video memory. :rolleyes:

cybertron
04-23-2007, 12:26 PM
Just a quick comment: Even in SLI you can't use both cards' memory as if it were 512 meg. Almost all of the data has to be duplicated between both cards so you can still only use a total of 256 uniquely. The reason you can get away with setting it higher in Doom and Quake is that the card swaps data from its internal memory to the system memory, but at some point that can cause hitching because the system memory is a lot slower to access than the on-card memory.