Ryon Sherman’s Blog

Multiple Monitor Setup Using Both nVidia and ATI Video Cards In Linux

Posted in Linux by Ryon Sherman on 02/10/2009

I recently received the ‘go ahead’ to install Ubuntu on my work computer. After locating alternatives to my frequently used development applications (most of them already supported under Linux) and testing my productivity under VirtualBox, I downloaded Intrepid, fired up Wubi and took my lunch break.

Once returned, I noticed two of my three monitors were in stand-by mode. I wasn’t too surprised. Ubuntu automatically configured my dual monitor setup at home, but I suspected hiccups with three.

I quickly threw up the Linux user’s “three finger salute” (ctrl+alt+backspace) to kill X and went to check out my xorg.conf. Of course Ubuntu creates the most basic of file defaulted with “configured device” and “configured monitor”. I had manually configured X in Gentoo plenty of times and decided to start from scratch.

After creating my custom device/monitor/screen entries, I enabled Xinerama and restarted GDM. Failure… This time all three screens had lost signal. I had compared my config against countless multihead setups and validated my syntax…what could be the problem?

lspci reports two video controllers. Ahh yes, my mistake. With an ATI AGP card and a nVidia PCI, I apt-get Envy-NG and begin to install proprietary drivers. I’m sure I’m not the only person to try and install both ATI and nVidia binaries, but you’ll soon find out this is not possible. Turns out both nvidia-glx and xorg-driver-fglrx divert libGL.so [source]. That’s OK! I can always use the open source drivers included in the kernel can’t I? Yes, unless I want to use Xinerama… Apparently the ‘nv‘ drivers are incompatible [source].

TwinView supports only nVidia drivers while MergedFB and BigDesktop only support ATI drivers…so we HAVE to use Xinerama…guess which card get’s the proprietary drivers? After using Envy-NG to install the nVidia binaries, I proceeded to tweak my xorg.conf to include the second device.

It was a long and difficult process that required far more research than estimated, but I now have three fully functional monitors using rival video cards and share with you the fruit of my labor.

Here is an exerpt of my xorg.conf file (only relevant entries displayed):

Section "Device"
	Identifier	"nVidia GeForce (Primary)"
	Driver		"nvidia"
	BusID		"PCI:1:5:0"
	Screen	0
EndSection

Section "Device"
	Identifier	"nVidia GeForce (Secondary)"
	Driver		"nvidia"
	BusID		"PCI:1:5:0"
	Screen	1
EndSection

Section "Device"
	Identifier	"ATI Radeon"
	Driver		"ati"
	BusID		"PCI:2:0:0"
EndSection

Section "Monitor"
	Identifier	"Acer Monitor"
	Option	"DPMS"
EndSection

Section "Screen"
	Identifier		"Left Screen"
	Device		"ATI Radeon"
	Monitor		"Acer Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes	"1280x1024"
		Virtual	1024 768
	EndSubSection
EndSection

Section "Screen"
	Identifier		"Center Screen"
	Device		"nVidia GeForce (Primary)"
	Monitor		"Acer Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes	"1440x900"
	EndSubSection
EndSection

Section "Screen"
	Identifier		"Right Screen"
	Device		"nVidia GeForce (Secondary)"
	Monitor		"Acer Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes	"1024x768"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier		"Multihead Layout"
	InputDevice		"Configured Keyboard"			"CoreKeyboard"
	InputDevice		"Configured Mouse"			"CorePointer"
	Screen		"Left Screen" 		0 		0
	Screen		"Center Screen" 		RightOf	"LeftScreen"
	Screen		"Right Screen"		RightOf	"CenterScreen"
	Option		"Xinerama"
EndSection

Note: I have since since uninstalled Ubuntu due to complaints about the amount of time I spent “fixing” things like this. So, the above config file is purely from memory. Comment on errors and I’ll be sure to correct them.

*BusID value can be found by issuing the lspci | grep VGA commands.

*Virtual is the virtual desktop size required to prevent desktop scrolling.

Aside from the lack of hardware acceleration with the open source ATI drivers which is supposedly supported if available [source], I have encountered only one bug that prevents mouse clicking. Moving a window using alt+space seems to fix it [source].

Tagged with: ,

2 Responses

Subscribe to comments with RSS.

  1. Tomasz Nazar said, on 03/25/2009 at 12:35

    Hi there. I had similar wishes to install both ati + nvidia at once. My needs are bit different: originaly I had only Ati and I use it with their proprietary drivers. That’s fine.
    I wanted to put nvidia card to start another xserver instance and connect to one of my monitors to use hardware h264 decoding for HD movies (8600 gs has such). It requires nvidia proprietary driver also.

    Obviously I hit the wall with both drivers overriding the same file (I don’t remember the name… libglx?..)

    So, do you think I can try again to have dual cards setup with both hardware accelerated with 2 different xservers, or will it be the same as for you – meaning I have to use oss ati (if I understand correctly)?
    for Ati: xserver1 using 2 monitors
    for Nvidia: xserver2 using 1 monitor

  2. Ryon Sherman said, on 03/25/2009 at 13:45

    Tomasz Nazar:

    Due to the conflict with libglx, only one proprietary driver can be installed at any given time. So unfortunately, the chances you’ll end with the same problem I encountered are quite high.

    Since you’re wanting to use hardware decoding on the nVidia card we’ll say it’s the obvious choice of the two in this situation.

    As far as using separate xservers for your screens, you may be able to utilize hardware acceleration of both cards using the proprietary nVidia drivers in one xserver while using the open source ATI drivers in the other.

    I myself was unable to have hardware acceleration on the ATI card, though it is apparently supported. I think this was because I was using Xinerama to create one large desktop because, to my knowledge, separate xservers means windows cannot pass between screens freely.

    If you have any success using multiple xservers please let me know. I’m interested in seeing if the OSS ATI drivers will in fact provide hardware acceleration along side proprietary nVidia drivers.


Leave a Reply