3 Monitors, Ubuntu 12.04, Gnome 3, 2 nvidia cards, WITH xrandr or xinerama?

Ok. I have been banging my head against the wall for over a week now trying to get 3 monitors to work.

I have:

  • Nvidia 8600 GT 512MB PCIEx16

  • Nvidia GT 240 1GB PCIEx16

They are not running in SLI (obviously). I have tried to use everything from tutorials to a few templates, all the way up to nvidia-settings, etc etc etc.. From what I hear, Xinerama doesnt like gnome 3 because of the compositing, although I have read a lot about using Xrandr instead, and getting the compositing working, but alas, I cannot. It always either crashes X and I have to replace the xorg.conf with my backup, or it defaults to the gnome-classic desktop, and on top of that, when it does default, it keeps adding more and more panels.

Basically, I want to be able to use all 3 monitors (yes, just like in windows) to drag and drop from different windows.

I have xorg-edit, but I am still not too sure on how to set this up? Is there any way to:

A> Get compositing working with 3 monitors, 2 nvidia cards, xinerama, and gnome 3?

or

B>Use twinview with 3 monitors (I have heard it can be done by manually editing xorg.conf)

or

C>Set up Xrandr to draw all 3 monitors with compositing.

or

D>Use separate X for each monitor, and be able to use gnome with compositing, as well as drag between all 3

or

E>ANYTHING. lol. I just want this to work.

Any help you can provide would be greatly appreciated. BTW, I am running an ubuntu mini install with gnome. Everything works great but this. I can run it fine with 2 monitors and compositing, but not with 3.

Also, what is the best GUI tool for editing xorg.conf? Im not finding anything that is up to date at all, and also is understandable by humans. haha. Im actually an engineer by trade, and have been working with computers a LONG time, but this xorg.conf stuff is really confusing the crap out of me. lol

Thanks!


Solution 1:

lol I love the multi-monitor questions :) If I recall correctly, TwinView is, as the name implies, for 2 monitors. The issue with XRandR is 2 fold in multi-monitor setups. It creates a large virtual display and each monitor gets a piece of it. If the total resolution is too high (2048 X 2048) it might not work... Framebuffer issues and such. You should be able to increase the fb size in xorg.conf but it comes at a performance loss iirc. Also, if the monitors are of different resolutions, there could potentially be areas that are either black, or windows fall off of your displays.

Xinerama is capable of multi-monitor setups. Let's try a mix of xinerama and TwinView first. If that fails, just comment out the TwinView lines with #. Here is an example /etc/X11/xorg.conf file. Use it as a skeleton and replace the appropriate info. Try it first with the TwinView settings as in the example.

Section "ServerLayout"
    Identifier     "TriHead"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen1" RightOf "Screen1"
    Option         "Xinerama" "1"                # Enable xinerama on the whole
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Nvidia GT 240"
    BusID          "PCI:1:0:0"                   # Use lscpi | grep VGA to get the BusID
    Screen          0                            # Note the Screen numbers
EndSection

Section "Device"
    Identifier     "Device1"                     # A device for each screen
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Nvidia GT 240"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Nvidia 8600 GT"
    BusID          "PCI:2:0:0"
    Screen          2
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Gateway HX2000"
    HorizSync       31.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL 1907FPV"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "DELL 1907FPV"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "Coolbits" "5"
#    Option         "DoubleBuffer" "True"
    Option         "TripleBuffer" "True"
    Option         "TwinView" "1"                # Enable TwinView for the shared card
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

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

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "Coolbits" "5"
#    Option         "DoubleBuffer" "True"
    Option         "TripleBuffer" "True"
    Option         "TwinView" "0"                # No TwinView on this screen
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I should also mention that the additional Options such as "Coolsbits" are not recommended as it enables overclocking and adjusting fan speed. "TrippleBuffer" is helpful when using VBlank sync.

Solution 2:

Well, I got this kind of working. All 3 monitors are up and working, but I still cannot get composting to work.

Here is my xorg.conf. Any suggestions?

#
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
EndSection

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

Section "Files"
EndSection

Section "Module"
    Load "glx"
EndSection

Section "Extensions"
    Option "Composite" "Disable"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Acer"
    ModelName      "20 Inch"
    HorizSync       24.0 - 82.0
    VertRefresh     48.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "HP"
    ModelName      "MidPuta"
    HorizSync       24.0 - 82.0
    VertRefresh     48.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Samsung"
    ModelName      "10 Inch"
    HorizSync       24.0 - 82.0
    VertRefresh     48.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GT 240"
    BusID          "PCI:3:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GT 240"
    BusID          "PCI:3:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "8600 GT"
    BusID          "PCI:6:0:0"
    Screen          0
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "CRT-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
#

Solution 3:

Xinerama breaks randr and compiz

I have almost the same problem (3x gpu, 6x screen)

The best you can do is use nvidia drivers, align the screens, enable xinerama, save to xorg.conf and restart (do not apply settings)

You will be able to move windows from one screen to another, and maximize windows per screen.

No hardware acceleration No compiz.

Maybe some day mir or wayland will have better support, but I would not hold my breath. Somehow everyone in the linux community seems to think multi-monitor means two monitors and nothing more.

I recently heard that the latest Randr now supports multiple gpu/screen setups, but after several hours of cursing and much frustration I gave up and went back to the broken Xinerama setup