Dual Monitors w/ Dual Video Cards in Fedora 10 & Ubuntu 8.10
Friday, January 2nd, 2009There’s more than one way to skin a cat, and there are at least four ways to set up dual monitors in GNU/Linux.
- Xinerama (the right way)
- nVidia TwinView (the way that supports companies that want to control how you use your computer)
- Matrox MergedFG (another good way)
- BigDesktop (ATI’s analog of option 2)
I don’t believe options 2 and 4 are really options for me since I do not like the idea of paying for a video card and not being able to use it freely. I will describe my setup and include my xorg.conf as well, for Fedora 10. I’m hoping that it will also work for Ubuntu, and I’ll post on that ASAP.
First, my hardware. I have a cheap ATI Rage 128 and an nVidia GeForce4 MX 4000. The nVidia has two outputs, so I was able to get dual monitors working with TwinView, but I only did that to make sure it would support it. I don’t think that it supports dual monitors with Xinerama, unless I use the nVidia card. So, that’s why I have my $20 ATI card. I will also report on whether I can get it working with the nVidia card only, but later..
I followed the guide for Xinerama, pretty much exactly. When I was done I made sure that the r128 driver was loaded by doing
modprobe r128
I had made a back up copy of my xorg.conf, of course. You only forget this step one time. Or twice, but no more
I restarted X after following the guide above, thinking that there would probably be a few glitches. Well, there was one glitch, and it was the line that said
Fatal server error:
Caught signal 11. Server aborting
But I looked back through the file “/var/log/Xorg.0.log” and noticed the following:
(EE) Screen 1 deleted because of no matching config section.
It turns out that in my xorg.conf file, I had labeled the screen for the ATI card, which is not what I wanted to do. It turns out that in the “Device” section (for the ATI card) the meaning of “Screen” is not related to displays, but which output of the card. For my nVidia card there are two outputs, so I needed to label the Screen there as the first screen. In the ATI section, I don’t want to label the screen since there is only one output. Weird. Here’s what it looks like now:
Section "Device" Identifier "Device0" Driver "nv" VendorName "NVIDIA Corporation" BoardName "GeForce4 MX 4000" BusID "PCI:2:0:0" Screen 0 Option "DDCMode" "true" EndSection Section "Device" Identifier "Device1" Driver "r128" VendorName "ATI Technologies Inc" BoardName "Rage 128 PP/PRO TMDS" BusID "PCI:1:6:0" Option "DDCMode" "true" EndSection
This fixed my errors, and I was able to restart X with this new and improved xorg.conf.
I also had to edit /etc/gdm/custom.conf (in Fedora 10) or /etc/gdm/gdm.conf-custom (in Ubuntu 8.10) to add this line under the [xdmcp] section:
DisplaysPerHost=2
I still have issues when X stops (either by restarting X by CTL+ALT+BKSP or logging out from within Gnome). This issue is related to X and possibly also gdm, because I can exit from within a non-gdm X Gnome session and it will turn the shell screen into fuzzy gibberish. I can still type startx (and then it locks up with a blinking cursor on the top left of the primary screen — the other one is blank). I have to soft reset to get out of it.
Section “ServerLayout”
Identifier “Default Layout”
Screen 0 “Screen0″
Screen 1 “Screen1″ RightOf “Screen0″
InputDevice “Keyboard0″ “CoreKeyboard”
InputDevice “Mouse0″ “CorePointer”
Option “Xinerama” “true”
EndSectionSection “Files”
EndSectionSection “Module”
Load “dbe”
Load “extmod”
Load “type1″
Load “freetype”
Load “glx”
EndSectionSection “ServerFlags”
Option “Xinerama” “0″
EndSectionSection “InputDevice”
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/psaux”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5″
EndSectionSection “InputDevice”
Identifier “Keyboard0″
Driver “kbd”
EndSectionSection “Monitor”
Identifier “Monitor0″
VendorName “Aopen”
ModelName “AOP F90JS”
HorizSync 30.0 – 80.0
VertRefresh 55.0 – 75.0
Option “DPMS”
EndSectionSection “Monitor”
Identifier “Monitor1″
VendorName “Unknown”
ModelName “ViewSonic Q9-2 Series”
HorizSync 30.0 – 80.0
VertRefresh 55.0 – 75.0
Option “DPMS”
EndSectionSection “Device”
Identifier “Device0″
Driver “nv”
VendorName “NVIDIA Corporation”
BoardName “GeForce4 MX 4000″
BusID “PCI:2:0:0″
Screen 0
Option “DDCMode” “true”
EndSectionSection “Device”
Identifier “Device1″
Driver “r128″
VendorName “ATI Technologies Inc”
BoardName “Rage 128 PP/PRO TMDS”
BusID “PCI:1:6:0″
Option “DDCMode” “true”
EndSectionSection “Screen”
Identifier “Screen0″
Device “Device0″
Monitor “Monitor0″
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1280×1024″
EndSubSection
EndSectionSection “Screen”
Identifier “Screen1″
Device “Device1″
Monitor “Monitor1″
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1280×1024″
EndSubSection
EndSection
I hope this may be of use to someone down the road. Please ask questions, but don’t expect me to know much other than what I did to get my setup working.
Edit: I noticed that as of the latest Ubuntu kernel (and Fedora as well) the glitch is lessened. I can log out and log back in, but when I do the second (ATI) card displays some glitches in the screen about 60% over from the left, a vertical line about 1/4 an inch thick… it’s minor, and I can happily live with it.
Edit: I have now switched over to gNewSense and this setup still works fine. I’m using the latest Kernel Libre so that I can take advantage of the drivers for the Atheros cards that are not in the latest gNewSense liveCD kernel.

