How can I get multiple video cards to work on linux?

I installed fedora 12.

I have 2 ATI cards that I used to use on windows to run 4 monitors. A recurring problem has been to get them detected in linux. Only my secondary card is picked up linux. When I manage the displays it detects the 2 monitors connected that card.

What are the specific steps I should take to get the second card detected? Supposedly there is a tool system-config-xfree. I don't have it, yum can't find it.

Also I heard it has something to do with editing some xorg.conf file or something to that effect. I have absolutely no idea how to find the "bus id" of my card, or lookup the horizontal refresh rates, etc..

I would probably have no problem following the documentation & editing the file if I knew a good way to find these values.

Someone also suggested installing linux twice and saving the xorg.conf it generates each time (with different card each time) and then merging the two by hand. That is like killing a fly with a hammer though, when I do this again and again in the future It'd be nice to not have to take twice as long.

Thanks


Finding the "bus id" of your cards is easy, just run:

lspci | grep VGA

the result would be something like:

01:08.0 VGA compatible controller: Number 9 Computer Company Revolution 4 (rev 02)

Then "01:08.0" is your bus id. If you have two cards, you will have two lines like that.

Then open your /etc/X11/xorg.conf file with a text editor as root. Edit it to contain two Device sections. An example of a device section:

Section "Device"
        Identifier  "My video card 1"
        Driver      "ati"
        BusID       "PCI:1:8:0"
EndSection

Identifier is any text you like to identify your video card with - you will need it in later sections of the xorg.conf file. Driver is one of:

apm, ati, chips, cirrus, cyrix, fbdev, glide, glint, i128, i740, imstt, intel, mga, neomagic, nv, openchrome, r128, radeon, rendition, savage,  s3virge,  siliconmotion, sis, sisusb, sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo, suntcx, tdfx, trident, tseng, vesa, vmware, voodoo, wsfb, xgi, xgixp

Choose one of them which seems to look like the type of chipset which is in your video card (the string from lspci | grep VGA will be helpful). And the BusID you already know. Create two such Sections.

I'll explain how to configure two monitors with two video cards, you should be able to extend that to four monitors once you understand how the config file works.

Then create two "Monitor" sections. Some like this should be enough:

Section "Monitor"
   Identifier  "My monitor 1"
   HorizSync   30-94
   VertRefresh 48-85
EndSection

The Identifier is again anything you choose, you should check the horizontal sync and vertical refresh rates in your monitor instruction manual to find out the two other required parameters.

Then create two "Screen" sections like this:

Section "Screen"
   Identifier  "My screen 1"
   Device      "My video card 1"
   Monitor     "My monitor 1"
   DefaultDepth    24
   SubSection "Display"
       Depth       24
       Modes       "1600x1200"
   EndSubSection
EndSection

Where you use the identifiers you made up in the previous sections, and 24 is the color-depth you want, and in Modes you put the resolution you want on that monitor.

The last thing you want is to edit your ServerLayout section to look like this:

Section "ServerLayout"
    Identifier  "Default Layout"
    Screen  0   "My screen 1"
    Screen  1   "My screen 2" RightOf "My screen 1"
    InputDevice "My keyboard"
    InputDevice "Configured Mouse"
EndSection

Most of it will already be there, the thing you need to add is this line:

Screen  1   "My screen 2" RightOf "My screen 1"

Where you put the Identifiers of the screens you defined earlier.

Then restart your X server and it should work. If it doesn't look in /var/log/Xorg.0.log or similar log file for errors. If you want to read how to create such files, it should be in the manual:

man xorg.conf

If you don't have one on your system, a Google search for "man xorg.conf" will show many resources.

This should also be interesting for you to read: http://www.ghacks.net/2009/02/04/get-to-know-linux-understanding-xorgconf/

This is for Gentoo, but shows lots of useful examples of how to write an xorg.conf file: http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors/ATI