Here goes:
I wanted to get a dual head (two screen) setup happening in Ubuntu. To date, there is no setup facility to get it going, so it was a matter of setting up xorg.conf to do it for me, which as it turned out was a reasonably simple process. I will relate my process to you, and I hope that if people have managed to do it differently/easier, that they post in this thread. 
My Setup:
1 x AGP Video Card (NVIDIA GeForce)
1 x PCI Video Card (NVIDIA Riva TNT2)
1 x Samsung SyncMaster 17" monitor (attached to AGP card)
1 x DELL M770 17" monitor (attached to PCI card)
Nothing to lose.
Now if you have the time, you can put each video card in seperately, boot up the machine and when everything loads (probably not running the xserver properly) type the following to setup your X-system.
Code:
sudo dpkg-reconfigure xserver-xorg
This will run through the process of setting up your video card and monitor and more importantly, create an xorg.conf with info particular to your setup. Backup this file to something appropriate ie if you tried the agp card 1st:
Code:
sudo cp xorg.conf xorg.conf.agp_samsung
Put in the other card and do the same thing, creating something like xorg.conf.pci_dell
For the next bit, I will show my completed xorg.conf file:
Code:
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands:
#
# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
# sudo sh -c 'md5sum /etc/X11/xorg.conf >/var/lib/xfree86/xorg.conf.md5sum'
# sudo dpkg-reconfigure xserver-xorg
Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
# paths to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection
Section "Module"
Load "GLcore"
Load "bitmap"
Load "dbe"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "record"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
Section "Device"
Identifier "NVIDIA Riva PCI"
Driver "nv"
BusID "PCI:0:8:0"
EndSection
Section "Monitor"
Identifier "DELL"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection
Section "Screen"
Identifier "RIGHT SCREEN"
Device "NVIDIA Riva PCI"
Monitor "DELL"
DefaultDepth 16
SubSection "Display"
Depth 1
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
# Attempt to get the AGP card working
Section "Device"
Identifier "NVIDIA GeForce AGP"
Driver "nv"
BusID "PCI:1:0:0"
EndSection
Section "Monitor"
Identifier "SAMSUNG"
Option "DPMS"
HorizSync 30-65
VertRefresh 50-120
EndSection
Section "Screen"
Identifier "LEFT SCREEN"
Device "NVIDIA GeForce AGP"
Monitor "SAMSUNG"
DefaultDepth 16
SubSection "Display"
Depth 1
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Dual Screen"
Screen 0 "LEFT SCREEN" 0 0
Screen 1 "RIGHT SCREEN" RightOf "LEFT SCREEN"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
Section "DRI"
Mode 0666
EndSection
Section "ServerFlags"
Option "Xinerama" "true"
EndSection
Ok so everything from the start to the InputDevice section should be common to both files you generated, so you could just copy and paste that into a new file, or just use the last xorg.conf you generated and add the other card/monitor/screen info to that.
The next part of the file gives information about the card, the monitor and the screen.
Code:
Section "Device"
Identifier "NVIDIA Riva PCI"
Driver "nv"
BusID "PCI:0:8:0"
EndSection
Section "Monitor"
Identifier "DELL"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection
Section "Screen"
Identifier "RIGHT SCREEN"
Device "NVIDIA Riva PCI"
Monitor "DELL"
DefaultDepth 16
SubSection "Display"
Depth 1
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
The only thing to check here is the busid, which you can find for yourself by typing
This is the relevant output:
Code:
0000:00:08.0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT2 Model 64/Model 64 Pro] (rev 15)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)
This tells me that the BusID for my Riva is PCI:0:8:0 and the GeForce is PCI:1:0:0 (Yer even though its AGP
)
Also, with the screen setup, I have chosen the Samsung monitor to be the Left screen. I named the screens with this in mind because I am easily confused. You can can call your screens whatever you wish.
Copy and paste the Device, Monitor and Screen information from your other xorg.conf file for the other card/monitor combo.
Then we come to the ServerLayout end of the file.
Code:
Section "ServerLayout"
Identifier "Dual Screen"
Screen 0 "LEFT SCREEN" 0 0
Screen 1 "RIGHT SCREEN" RightOf "LEFT SCREEN"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
Ok so "Idenfitier" is just giving it a name. The "Screen" section indicates the geometry of the screens. You can apparently use "RightOf","LeftOf" and there are probably others. Don't forget the 0 0. The "InputDevice" part should be the same in both of your generated xorg.conf files so keep that there too.
This setup "should" set you up with two independant screens on reboot, but you won't be able to drag windows from one screen to the other. To have the two screens act like two halves of one big screen, you need to enable "Xinerama" support.
Code:
Section "ServerFlags"
Option "Xinerama" "true"
EndSection
This goes at the end of xorg.conf. Keep in mind that Xinerama kicks up a stink if the different screens are running at different colour depths, so make sure they are both 16 or 24 or whatever
Anyway I hope this helps you out! Please feel free to add comments/better ways of doing it/etc
- Spleenie
Bookmarks