Dual monitors with separate video cards in Linux

I previously used a pair of Dell 20" monitors on my desktop. I have now upgraded to a combination of one Dell 30" monitor and one of the old 20"s (turned sideways to portrait mode). It looks like this:

It is accomplished as follows:

  • Dell 30" 3007WFP monitor, currently $1274 at Dell. Native resolution 2560x1600.
  • Dell 2001FP, native resolution 1600x1200.
  • PNY 7300 GT 256MB PCIe. $100 at Fry's last month, already $80 at the PNY site but also "unavailable". Other cards can be substituted; the key elements are "Dual Link DVI" and Nvidia. I can say from experience that Nvidia's support for Linux has risen in the last few years to barely acceptable, and that only if you are willing to use closed binary drivers, which many free software purists refuse to do. However, that still appears to be much better than ATI's support.
  • NVIDIA binary driver version 1.0-9742. This is tricky because I had to root around different ubuntu repositories to get it, and I'm still not sure how I did it.
  • Kubuntu desktop. Built on top of debian, which I was previously using, Ubuntu adds more polish. Normal Ubuntu uses Gnome; Kubuntu uses KDE.
  • A second video card. I'm using the "GeForce 6150" built into the new motherboard (ASUS M2NPV-VM) that I had to get to support the PNY 7300 GT, which is a PCI Express card.
  • Two features in xorg.conf to make it all work: Xinerama, which is a function inside the X layer that merges two different screens (as opposed to NVIDIA's TwinView, which merges them in the driver and makes X think there is only one srceen), and xrandr, which lets me rotate just one of the two monitors. The relevant bits of xorg.conf, with tricky bits marked in bold:

    Section "Monitor"
        Identifier     "DELL 3007WFP"
        ModelName      "DELL 3007WFP"
        Gamma           1.21
        ModeLine       "2560x1600@60" 348.2 2560 2752 3032 3504 1600 1601 1604 1656 -hsync +vsync
    EndSection
    

    Section “Monitor” Identifier “DELL 2001FP” ModelName “DELL 2001FP” Gamma 1 HorizSync 31.0-80.0 VertRefresh 56.0-76.0 Modeline “1600x1200@60” 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync EndSection

    Section “Device” Identifier “PNY” Driver “nvidia” BoardName “nv” BusID “PCI:03:00:0” EndSection

    Section “Device” Identifier “Onboard” Driver “nvidia” BoardName “nv” BusID “PCI:00:05:0” EndSection

    Section “Screen” Identifier “Main” Device “PNY” Monitor “DELL 3007WFP” DefaultDepth 24 Option “RenderAccel” “true” Option “AllowGLXWithComposite” “true” Option “AddARGBGLXVisuals” “true” SubSection “Display” Virtual 2560 1600 Depth 24 Modes “2560x1600@60” “1920x1200@60” “1680x1050@60” “1600x1024@60” EndSubSection EndSection

    Section “Screen” Identifier “Second” Device “Onboard” Monitor “DELL 2001FP” DefaultDepth 24 Option “RenderAccel” “true” Option “AllowGLXWithComposite” “true” Option “AddARGBGLXVisuals” “true” Option “Rotate” “left" SubSection “Display” Depth 24 Modes “1600x1200@60” EndSubSection EndSection

    Section “ServerLayout” Identifier “Default Layout” Screen 0 “Main" Screen 1 “Second” LeftOf “Main" InputDevice “Generic Keyboard” InputDevice “Configured Mouse” Option “Xinerama” “true" EndSection