Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HOWTO: Dual Screen in Ubuntu - Two Video Cards

  1. #1
    Join Date
    Apr 2005
    Beans
    96
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Talking HOWTO: Dual Screen in Ubuntu - Two Video Cards

    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
    Code:
    lspci
    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
    Last edited by Spleenie; August 3rd, 2005 at 10:10 PM.

  2. #2
    Join Date
    May 2005
    Location
    Texas
    Beans
    298
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Cool HOWTO not that I would try it but its nice info to know...
    In a world without walls who needs Windows??

  3. #3
    Join Date
    Nov 2004
    Beans
    303

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Hmm, so you can't do this one video card? I've been misled for a while now then. XD

  4. #4
    Join Date
    Apr 2005
    Beans
    96
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Quote Originally Posted by Quest-Master
    Hmm, so you can't do this one video card? I've been misled for a while now then. XD
    I am certain you can, however I don't have a two-output video card and as such am little qualified to instruct on ones use

  5. #5
    Join Date
    May 2005
    Location
    tx
    Beans
    42
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Quote Originally Posted by Quest-Master
    Hmm, so you can't do this one video card? I've been misled for a while now then. XD

    Many newer cards that have both DVi and VGA outputs can be utilized for a dual monitor setup, but I must admit I dont know how well if works with Ubuntu since I have never tried it.

  6. #6
    Join Date
    Apr 2005
    Beans
    14

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    I'm currently using TwinView with my nVidia GeForceFX 5500, and it works very well. I had tried using both Xinerama & MergedFB with my old ATI card, and it just didn't work (no acceptable dual head + DRI acceleration).

  7. #7
    Join Date
    May 2005
    Location
    tx
    Beans
    42
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    ive had mixed results as well, depends on the card....just try and see, worst case scenario it doesnt work

  8. #8
    Join Date
    Mar 2006
    Location
    Seattle
    Beans
    26
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Hey thanks so much for the HOW-TO! I got it sort of working, haha. My second screen still looks pretty hosed but I think im almost there. Its showing up as a bunch of black and tan (ubuntu background) colored lines. It shouldn't matter if they are two very different cards right? As long as they work individually okay? One is a Nvidia GeForce (AGP) and the other is some super old Matrox P.O.S. (PCI).

    I know this is a super old thread but if anybody has any ideas on what i should try checking first, let me know.

    Thanks!

    Maria

  9. #9
    Join Date
    Dec 2006
    Beans
    Hidden!
    Distro
    Ubuntu 6.06 Dapper

    Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    Quote Originally Posted by Spleenie View Post

    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.

    - Spleenie
    That's a good idea. [slaps self]

    I am trying to get three monitors working off 2 cards. (8600GT running 2x19in@1280x1024 plus a 8500GT running a single 24in@1920x1200)

    I have however found since 7.04 that dpkg-reconfigure xserver-xorg doesnt do all that it used to.

    I now find disabling and re-enabling the nvidia driver using the:
    System >Administration> hardware drivers
    tool does help to reset me to a working xorg state after I have killed it mucking around.

    I will try your idea tomorrow, I already have the 8600GT running both 19in monitors. I will try removing that card and set up to run just the 24inch and then I will use the 2 xorg.conf files to make a single file to run both cards (i hope)

  10. #10
    Join Date
    Oct 2010
    Beans
    3
    Distro
    Ubuntu

    Talking Re: HOWTO: Dual Screen in Ubuntu - Two Video Cards

    I'm going to try this, i have a flatscreen i like, however it goes out now and then, but i have it mounted above me on the wall, my normal monitor on the desk, and also have output to the TV as well, I think it would be nice to use the onboard video card with the flatscreen for every now and then use, as it occasionally works for about half an hour or so, and i could use it for full screen terminal output, my tv for movies, and my regular monitor for w/e, might make some nice pics for the bedroom
    I just need to get a new flatscreen now, damnit!

    Anyway, the setup when I do myself, wouldn't be bad to paste to the guides section on my website LinuxFire.Net, I'll be sure to give the poster credit if/when I write this down in more detail.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •