# Xorg + Triple Head + Nvidia Twin View



## Phydeaux (Oct 5, 2011)

My current workstation is FreeBSD 8.1, with a GeForce 9500 GT and two screens. I'm running with TwinView. It's flawless, and this workstation is a beast. I'm about to create a new workstation for myself. Naturally, now I want to go to three screens, instead.



Should I expect problems? Do I require SLI, or is it enough to simply have two graphics cards (preferably the same ones)? Will I lose the ability to use TwinView to treat the three monitors as one enormous monitor? I'd like to know what I'm getting into before I start telling my employer what to purchase. I've included my current configuration for posterity:




```
Section "ServerLayout"

    Identifier     "X.org Configured"

    Screen      0  "Screen0" 0 0

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection



#Section "ServerFlags"

#    Option          "Xinerama" "True"

#EndSection



Section "Files"

    ModulePath      "/usr/local/lib/xorg/modules"

    FontPath        "/usr/local/lib/X11/fonts/misc/"

    FontPath        "/usr/local/lib/X11/fonts/TTF/"

    FontPath        "/usr/local/lib/X11/fonts/OTF"

    FontPath        "/usr/local/lib/X11/fonts/Type1/"

    FontPath        "/usr/local/lib/X11/fonts/100dpi/"

    FontPath        "/usr/local/lib/X11/fonts/75dpi/"

    FontPath        "/usr/local/lib/X11/fonts/URW/"

    FontPath        "/usr/local/lib/X11/fonts/freefont/"

    FontPath        "/usr/local/lib/X11/fonts/terminus-font/"

    FontPath        "/usr/local/lib/X11/fonts/jmk/"

    FontPath        "/usr/local/lib/X11/fonts/TrueType/"

EndSection



Section "Module"



    Load           "freetype"

    Load           "record"

    Load           "dbe"

    Load           "glx"

    Load           "extmod"

EndSection



Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection



Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol" "auto"

    Option         "Device" "/dev/sysmouse"

    Option         "ZAxisMapping" "4 5 6 7"

EndSection



Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Monitor Vendor"

    ModelName      "Monitor Model"

EndSection



Section "Device"

    Identifier     "NV AGP"

    Driver         "nvidia"

    VendorName     "nvidia"

    BoardName      "GeForce 9500 GT"

#    Option         "RenderAccel" "0"

    Option         "CursorShadow" "1"

    Option         "Coolbits" "1"

#   Option         "ConnectedMonitor" "dfp,dfp"

#

EndSection



Section "Screen"

    Identifier     "Screen0"

    Device         "NV AGP"

    Monitor        "Monitor0"

    Option         "TwinView" "True"

 #  Option         "MetaModes" "nvidia-auto-select, nvidia-auto-select"

    Option         "MetaModes" "1680x1050,1680x1050; 1440x900,1440x900; 1280x800,1280x800; 1024x640,1024x640; 1680x1050,NULL; 1440x900,NULL; 1280x800,NULL; 1024x640,NULL"

    Option         "NoTwinViewXineramaInfo" "True"

    SubSection     "Display"

        Viewport    0 0

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       4

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       8

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       15

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       16

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       24

    EndSubSection

EndSection
```


----------



## trepanne (May 21, 2012)

Hi, I'm just finishing installing something similar.

My workstation has a Quadro NVS-420, which is a dual-GPU card supporting four outputs, of which I'm currently using three (two identical 1920x1080 widescreens below, and a 1280x1024 up top).

You don't need SLI - that's for chaining processing, not displays.  Two similar nvidia cards should be enough.

Twinview, as the name implies, only links two displays, and those need to be dual outputs of the same GPU.  I was able to configure Twinview across my widescreens, and run a separate X screen for the 1280x1024 - no problem.  However, this is not an ideal setup for a tiling WM.

With some more work, I was also able to set up three independent X screens, and stitch them together with Xinerama.  The only problem was that there seems to be some sort of bug in Xorg (or maybe nvidia's driver)... the software configuration depends on the ordering of the hardware detection.  So I needed to write xorg.conf so that Screen0/1/2 were numbered proceeding DOWN and TO THE RIGHT, and I needed to unplug and replug the monitor cables so that the lower screen numbers were attached to X devices with lower BusID.  It really didn't work trying to rebind them at the <Screen> level in xorg; I had to physically reconnect the cables.  Not sure why that is, but it was not the case when I configured the exact same system under Linux, so I'm pretty sure it's a bug.  Anyway, that's how I worked around it.  If you don't do this, you'll get weird bugs related to the virtual desktop size; it'll either disable one monitor as being out of addressable range, or it'll clone the output of another monitor, or (in some configurations) the cursor will "wrap" around like a video game (think Asteroids or Pacman) that's gone off the screen.

If you're running a tiling WM, this setup is worth fiddling with it - much better than TwinView - because you don't get app windows breaking across monitor frames, and you can send apps from one screen to another easily.  Much nicer window management.

And, while I haven't tested it, I'm reassured by Nvidia's claim that GLX works under Xinerama across all nvidia GPUs:

http://us.download.nvidia.com/freebsd/180.44/README/chapter-11.html

Good luck!


----------



## SirDice (May 22, 2012)

One option that might work, though I haven't tried them on FreeBSD, are the Matrox Triplehead2Go or Dualhead2Go.

These little boxes basically trick your graphics card into thinking it's connected to a 5760x1080 monitor. The box then cuts that up into 3 seperate outputs. We've used them on MacBookPros for VJ'ing. They're not that expensive and, in theory at least, should work on pretty much any graphics card.

http://www.matrox.com/graphics/en/products/gxm/th2go/digital/


----------



## phoenix (May 22, 2012)

If you want fast, hardware-based 3D acceleration, then you have to use a single videocard with 3 monitor outputs.

Using multiple separate cards as a single X desktop requires the use of Xinerama, which uses software-based 3D acceleration, which means everything runs through the CPU.  Been there, done that, not worth the hassle (nv, nvidia, and nouveau drivers).    Maybe if you have a skookum 4 GHz, 6-core CPU with 16 GB of RAM it would be usable.


----------



## trepanne (May 22, 2012)

> Using multiple separate cards as a single X desktop requires the use of Xinerama, which uses software-based 3D acceleration, which means everything runs through the CPU



That's not what Nvidia claims in the link I provided above:



> The NVIDIA driver supports hardware accelerated OpenGL rendering across all NVIDIA GPUs when Xinerama is enabled.



If that were for some reason not working, you could just split the graphics cards into 2 separate desktops in order to get better performance on 3D acceleration.

But I haven't really tested, since I have no use for 3D acceleration on my workstation.


----------



## phoenix (May 22, 2012)

Hrm, that must be a new feature, as it's not supported on my cards (older 6000-series).


----------

