Getting dual-head monitors going with an nvidia card on Debian is largely a pleasingly straightforward business.

Edit your /etc/apt/sources.list to include the contrib and non-free repositories, and run apt-get update. Install the driver as follows:

apt-get install nvidia-kernel-common module-assistant
m-a -i prepare
m-a a-i -i -t -f nvidia-kernel
depmod -a
apt-get install nvidia-glx nvidia-glx-dev
Use lsmod to check that the nvidia module is loaded.

The final task is to edit your xserver config, which is the bit where I encountered a slight gotcha this time around; hence this post.

If both monitors can handle the same resolution, editing the Device section of your /etc/X11/XF86Config-4 (sarge) or /etc/X11/xorg.conf (etch) as follows should work:


Section "Device"
        Identifier      "NVIDIA Corporation NV44 [Quadro NVS 285]"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option          "TwinView" "true"
        #Option         "ConnectedMonitor" "FPD,FPD"
        Option          "MetaModes" "1600x1200,1600x1200; 1280x1024,1280x1024"
        Option          "SecondMonitorHorizSync" "31-80"
        Option          "SecondMonitorVertRefresh" "56-76"
        Option          "TwinViewOrientation" "RightOf"
EndSection
Make sure you use appropriate sync and refresh values (these work for HP 1702 flat panel & a standard Transtec 19″ flat panel), and that the BusID is correct (lspci output - look for the line corresponding to your card. 01:00.0 translates to PCI:1:0:0 as above; 05:09.0 or 0000:05:09.0 to PCI:5:9:0, etc).

However, if your monitors don’t support the same resolution, you’ll need to change this line:


        Option          "MetaModes" "1024x768,1280x1024"
(you may also need to try swapping the two entries around - e.g. 1280x1024,1024x768 - depending on which one is being seen first). If you don’t get this right, you’ll have one screen coming up OK, and the other one coming up blank. I spent some time battling with this before the solution occurred to me; I hope therefore that this information is useful to someone else!

FWIW I’d also note that different resolution monitors is suboptimal for a TwinView setup; sometimes one has to make do with what one has, though.