# Ubuntu – Can X.org Load Two Different Drivers? (Triple-Head Setup with Intel and NVidia Card)

intelmultiple-monitorsnvidiaxorg

We want to set up a 3 screens with an onboard intel graphics adapter and an nvidia card.

Both cards are recognized in lspci

01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
00:02.0 Display controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)


And bascially work: If I switch to the console, I see output on the Intel card,
X is only running on the Nvidia card.

But when I type xrandr | grep conn I get only one connected port:

DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
HDMI-0 disconnected (normal left inverted right x axis y axis)


I am on Ubuntu 12.10 (and XFCE) and installed the proprietary nvidia driver.

I was assuming that X maybe has a problem to autodetect both cards, so I thought the following xorg.conf could help:

Section "ServerLayout"
Identifier     "Layout0"
Screen      0  "Screen0"
Screen      1  "Screen1"
InputDevice    "Keyboard0" "CoreKeyboard"
InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
# generated from default
Identifier     "Mouse0"
Driver         "mouse"
Option         "Protocol" "auto"
Option         "Device" "/dev/psaux"
Option         "Emulate3Buttons" "no"
Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier     "Keyboard0"
Driver         "kbd"
EndSection

Section "Monitor"
Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "Unknown"
HorizSync       28.0 - 33.0
VertRefresh     43.0 - 72.0
Option         "DPMS"
EndSection

Section "Device"
Identifier     "Device0"
Driver         "nvidia"
VendorName     "NVIDIA Corporation"
BoardName      "GeForce 210"
EndSection

Section "Screen"
Identifier     "Screen0"
Device         "Device0"
Monitor        "Monitor0"
DefaultDepth    24
SubSection     "Display"
Depth       24
EndSubSection
EndSection

Section "Monitor"
Identifier     "Monitor1"
VendorName     "Unknown"
ModelName      "Unknown"
HorizSync       28.0 - 33.0
VertRefresh     43.0 - 72.0
Option         "DPMS"
EndSection

Section "Device"
Identifier     "Device1"
Driver         "intel"
VendorName     "Intel"
BoardName      "Internal Intel Graphics"
EndSection

Section "Screen"
Identifier     "Screen1"
Device         "Device1"
Monitor        "Monitor1"
DefaultDepth    24
SubSection     "Display"
Depth       24
EndSubSection
EndSection


But it is still not working.

• Is this generally possible to use two different drivers in X ?
• Is it necessary to create an xorg.conf manually then? (because Ubuntu 12.10 normally works without the xorg.conf)
• Are there any errors in my xorg.conf?

Yes, X can use multiple drivers. Yours is a very similar setup as what I have. I have an NVIDIA 9800 GT with two monitors connected and an 2nd generation intel card with a single monitor.

I don't see any problems with your xorg.conf. I suspect that you will need to create an xorg.conf if only to tell X to use both nvidia and intel drivers. My xorg.conf looks very much like yours; I have three monitor and screen sections because the nvidia card has two monitors, but I'm pretty sure that X is ignoring those sections.

First, you will want to make sure that xinerama is disabled in xorg.conf (maybe not necessary).

xorg.conf:

Section "ServerFlags"
Option  "xinerama"  "off"
EndSection


When you do a xrandr --listproviders you should see both cards.

cody@IRIS> xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x290 cap: 0x1, Source Output crtcs: 2 outputs: 5 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 6 associated providers: 1 name:Intel


If you don't see both cards, you probably are missing a driver. (But OP says console is using one and X is using the other, so they probably both work)

You should be able to use xrandr --setprovideroutputsource to add the Intel ports to the list shown by your xrandr | grep conn In my case I use the names given by --listproviders:

xrandr --setprovideroutputsource Intel NVIDIA-0


If that doesn't add the Intel ports, it may be already connected in a way you can't see it. Disconnect it with:

xrandr --setprovideroutputsource Intel 0x0


Then try to connect it again:

xrandr --setprovideroutputsource Intel NVIDIA-0


All of the output ports should be shown now. And you should be able to add a display with the gnome display settings or with xrandr.

So when I finally got my intel display working, the nvidia displays decided that they needed to pan when I tried to move the mouse to the third display. It would now show the third monitor's content both on the third and second monitor. And the second's original content slid over to the first monitor with the first's content off-screen. It would slide back to normal if I tried to move the cursor over to the first monitor again.

I finally fixed that with another xrandr call:

xrandr --output DVI-I-2 --panning 3840x1200+1680+0/1920x1200+1680+0/0/0/0/0


This call requires knowledge of the physical screen geometry and logical layout. I have a 1680x1050 monitor, a 1920x1200, and a 1920x1080. They are in that order from left-to-right. The right most is connected to the intel card.

This call is setting the panning region on the middle monitor. --output DVI-I-2 happens to be the port connected to my middle monitor.

The first four numbers set the panning region to the total of the middle and right screens. 3840x1200 as width and height and +1680+0 to offset the region to start at top-left on the middle monitor. (Apparently [0,0] is at the top-left of the left monitor)

The next 4 numbers are the cursor tracking region. I set this to only track the cursor on the middle screen. This way when the cursor leaves this screen, it doesn't try to shift the image to follow the cursor.

The last 4 numbers define a border around the panning region. I'm just using the default values here.

Versions of related software I was using:

xorg-server-1.17.4
gnome-3.18.0
xrandr-1.4.3