Nvidia, TwinView, and xorg.conf
by Juliet Kemp
Getting dual-head monitors going with an nvidia card on Debian is largely a pleasingly straightforward business.
/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
lsmodto 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:
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 (
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
lspcioutput - look for the line corresponding to your card.
However, if your monitors don't support the same resolution, you'll need to change this line:
(you may also need to try swapping the two entries around - e.g.
Option "MetaModes" "1024x768,1280x1024"
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.
|What other resources did you use for setting this up? I may have to do this in the future and would like to prepare. =)|
|Assuming that you have the appropriate hardware (Nvidia card - I think pretty much all the modern ones support TwinView; this particular card came with a two-monitor splitter cable from the DVI in - and 2 monitors), the process as above should Just Work. The Debian nvidia packages are pretty good, especially if used as above with module-assistant to do all the hard work for you.|
|I used your xorg.conf setup on my Dell M90 Precision that I use at home and work. Your setup worked great for the different resolutions of my two monitors (1920x1200 and 1280x1024). The restricted driver manager automatically setup the Nvidia card for me - Thanks.|
|I tried this on my sony vaio. Didn't work out, I'm using a samsung Syncaster 206bw to take some stuff of my tiny 15.4" screen, but it didn't work out like this.|
|Brilliant! Thank you for this it really helped me!|