View Single Post
Old 05-31-09, 08:39 AM   #2
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: Options for adding a third monitor

Hi!

The setup you described is possible on linux but depending on your
needs may not work good enough. For details, please refer to the
attached the draft multi-head howto i'm currently working on:


Linux (Nvidia and Matrox TripleHead2Go) Multi-Head Howto


Introduction

There are serveral ways to operate a number of displays from the same PC with
Linux. Which solutions is the best for you is strongly depending on your
application, working habits and budget.


TwinView

For two displays, the user can easily make use of the nvidia's twinview
operation mode that allows to apply a single framebuffer for both displays
(see Figure 1).

Code:
 Videocard                        Displays
  ________
          |
    DVI-D +-----------------------> LCD #1 
          |
          |
          |
    DVI-D +-----------------------> LCD #2
  ________|

Fig. 1: TwinView - the classical dual head setup with one video card
There's basically nothing wrong about TwinView, but obviously, this setup is
limited to two displays.


SLI Multiview

If more than two displays are needed, then the easiest way is to add one or
more graphics cards. For example, for a triple head setup, you could attach
two displays to the two outputs of the first video card (operated in twinview
mode forming one X screen) and another displays to one of the outputs on the
second video card forming another screen. Both screens are then merged together
to form a single desktop using Xinerama [] (See Figure 2). Nvidia
documentation names this variant "SLI Multiview".

Code:
 Videocards                       Displays
  ________
          |                                   _
    DVI-D +-----------------------> LCD #1     |
          |                                    |
  Card #1 |                                     > Screen #1 (with Twinview)
          |                                    |
    DVI-D +-----------------------> LCD #2    _|
  ________|
  
  ________
          |
    DVI-D +-----------------------> LCD #3        Screen #2
          |
  Card #2 |
          |
    DVI-D +--- N.C.
  ________|


Fig. 2: SLI Multiview - the classical triple head setup with two video cards and Xinerama
However, this approach has a number of drawbacks:

* Most prominently, re-draw events are caused inside moving windows
while crossing screen boundaries. Practically, this means that moving
a window from the second to the third display (as in the setup as described
above) will cause annoying tearing for complex contents such as rendered
by Firefox or OpenOffice. Depending on your applications and working habits,
this may or may not be an issue for you.

* The X Server needs to split the graphic operations among the video cards.
This typically causes a 20% lower frame rate for most games.

* The "faking" nvidia TwinView Xinerama extension (which takes care about
correct window maximization for a two LCD twinview setup) is automatically
disabled when "true" Xinerama is enabled. Since windows always maximise to
screen boundaries, this means that a window on one of the first two displays
will always maximise to both displays rather than to the display it is
currently located at.

There are solutions that overcome this issue, but they come at a price:

o Define separate screens for the two displays connected to the first video
card. This will provide three screens (combinded with Xinerama) and
maximizing works as expected, but the annoying re-draw event situation
will just become worse.

o There do exist patches for the X server and libXinerama that will fake
the xinerama information on a higher level []. However, patching and
recompiling the X server is typically not a simple task, even for
experienced software developers, and with every software updated, this
task has to be re-done and the patches may easily not apply any more
with newer releases of Xorg.

* Xinerama doesn't interact well with the compositing extension of Xorg.
The exact reasons are yet unclear [] and a cure doesn't seem to be
available in a foreseable future. So in turn, that means that compositing
window managers such as Compiz will not work with a multi-card xinerama
setup. In Theory, you could use XGL as an overlay to the existing X server
in order to overcome this issue [six head demo on utube] [instr],
but XGL is depricate and has been reported to not inter-operate with
recent Linux distributions []

* Last but not least, multi-card solutions are always a hugh source of
problems:

o For some games, the mouse pointer may not work as expected []

o The distribution of the graphic command stream amongst GPUs
may not always work correctly. []

o Two or more video cards placed into a single PC are causing
higher requirements on the power supply unit and the cooling.

o With an increasing number of video cards in a system, potentially
existing hardware and BIOS incompatibilities may have an increasing
negative influence on the system stabilty. [AMD X2] [7800vs8800]

To summarize it, depending on your applications, working habits and
components choosen, an SLI Multiview triple head setup with two video
cards, twinview and Xinerama may or may not work convenient for you.


SLI Mosaic

All the problems as described for SLI Multiview can be avoided when purchasing
an nvidia Quadro Plex visualization system and using the "SLI Mosaic" technique
that combines the GPUs on driver level rather than with Xinerama. Please note
that SLI Mosaic is currently not supported for nvidia Quadro cards and/or for
the GeForce series.

While SLI Mosaic with nvidia Quadro Plex looks like the ideal solution,
technical wise, the high price tag of about $10.000 (and more) requires a realy
good business case and is most typically far out of budget for private use.


Splitting video outputs with Matrox TripleHead2Go

In order to overcome the limitations of the classical multi head variants, a
pretty simple solution is to split the video output(s) of a video card into
two or three outputs with an external hardware box called TripleHead2Go [],
manufactured by Matrox [].

The Matrox TripleHead2Go Digital Edition has one DVI input, a VGA input and
three DVI outputs. There is also a USB connector which is mainly used as a
power supply (on windows, it is possible to re-program the TH2G using the
Matrox PowerdeskSE tool, but this is not necessary for operating the TH2G
with Linux).

An incomming signal with a resolution of 3840x1024 will i.e. be split into
3x 1280x1024 for three LCDs that are attached to the three outputs of the box.
When the box receives an appropriate 3200x1600 video signal and only two
displays are attached, then the TH2G will split the signal to 2x 1600x1200.
The TH2G support quite a number of modes [].

The Maximum resolution in triple head mode is 5040x1050 (3x 1680x1050) and in
dual head mode it is 3840x1200 (2x 1920x1200). Please note that the 5040x1050
will only work at 57Hz refresh frequency. Some displays may not work correctly
with the default timing settings that are provided by matrox for this mode.
It may be possible to correct that by manually tweaking the appropriate
modeline. I.e. for an Acer V223Wbd, it helped to increase the vertical
blanking from 1066 to 1073 (for details on this topic please refere to []).

So now with two DVI outputs on a single video card and with the option to
split each of these outputs to feed two or three LCDs, there is a number of
possible display setup combinations. The most typical variants are triple
head setups (see Figure 3) and quad head setups (see Figures 4 and 5). If you
want to place four 1680x1050 displays in a row, then you can connect one LCD
directly to the first DVI output of the video card and operate the other three
LCDs via the TH2G through the second DVI output (see figure 4). If you need a
higher resolution (i.e 4x 1920x1200) or like to have the four LCDs setup in
a two rows by two columns setup (2x2 1920x1200), then you need two TH2Gs
(see figure 5). Last but not least, you can attach three 1680x1050 to each
of the two TH2Gs connected to the two DVI outputs of a single video card
in order to form a hugh 5040x2100 desktop (2x3 1680x1050, see figure 6).


Code:
 Videocard                         Displays
  ________
          |
    DVI-D +-----------------------> LCD #1
          |            ____
    Out   |           |    |
    put   |           |    +------> LCD #2
          |           |    |
    DVI-D +---------->|    +- (N.C)
  ________|           |    |
                      |    +------> LCD #3
                      |____|
                       TH2G

Fig. 3: 5760x1200 (3x 1920x1200) setup
Code:
Videocard                         Displays
  ________
          |
    DVI-D +-----------------------> LCD #1
          |            ____
    Out   |           |    |
    put   |           |    +------> LCD #2
          |           |    |
    DVI-D +---------->|    +------> LCD #3
  ________|           |    |
                      |    +------> LCD #4
                      |____|
                       TH2G

Fig. 4: 6720x1050 (4x 1680x1050) setup
Code:
Videocard                         Displays
                       ____
                      |    |
  ________            |    +------> LCD #1
          |           |    |
    DVI-D +---------->|    +- (N.C)
          |           |    |
          |           |    +------> LCD #2
          |           |____|
    Out   |            TH2G
    put   |
          |            ____
          |           |    |
          |           |    +------> LCD #3
          |           |    |
    DVI-D +---------->|    +- (N.C)
  ________|           |    |
                      |    +------> LCD #4
                      |____|
                       TH2G

Fig. 5: 7680x1200 (4x 1920x1200) or 3840x2400 (2x2 1920x1200) setup
Code:
Videocard                         Displays
                       ____
                      |    |
  ________            |    +------> LCD #1
          |           |    |
    DVI-D +---------->|    +------> LCD #2
          |           |    |
          |           |    +------> LCD #3
          |           |____|
    Out   |            TH2G
    put   |
          |            ____
          |           |    |
          |           |    +------> LCD #4
          |           |    |
    DVI-D +---------->|    +------> LCD #5
  ________|           |    |
                      |    +------> LCD #6
                      |____|
                       TH2G

Fig. 6: 5040x2100 (2x3 1680x1050) setup

Configuration

There are two ways to setup the TH2G for a Linux system:


a) Re-configure the TH2G on Windows (<4096)

Providing the over-all resolution of all displays connected to the TH2G
doesn't exceed 4095 pixel, it's recommended to re-program the EDID tag
that the TH2G will report to the X-Server. Means: if you have two 1600x1200
displays, then you should one-time configure the TH2G using PowerDeskSE
on a window box for this setup. The TH2G will then report to the X-Server
that a 3200x1200 display is connected to the video card and also supplies
the appropriate timing that the X-Server needs to generate so that the
TH2G actually knows how to split the video output.

When using this variant, then you don't need to do any special actions
under Linux: the X-Server will query the EDID information from the TH2G
and will treat it just as a display with high resolution capabilities.


b) Supply modelines in xorg.conf

In case you intend to use a combined resolution that is bigger than 4095
pixels, then you need to setup your system in a different way, because the
vertical blanking timing field in the EDID has only 12 bits and thus cannot
store information for such a big resolution.

So in this case, you need to add special modelines to the "Monitor"
section of your xorg.conf file. You also need to add appropriate
values for "HorizSync" and "VertRefresh". For the later two, just
use values as specified for the LCDs you intend to use using.

If you don't have a windows box on hand for reprogramming the TH2G as
described in b), above, then you can also use this configuration
method, of course.

Here's a list of Modelines for the most commonly used display resolutions
for TripleHead2Go:

Code:
Dual Head Modes
2x 1680x1050:  ModeLine "3360x1050" 238.00 3360 3424 3488 3680 1050 1053 1061 1080 +HSync +VSync
2x 1600x1200:  ModeLine "3200x1200" 281.40 3200 3264 3456 3752 1200 1201 1206 1250 +HSync +VSync
2x 1920x1080:  ModeLine "3840x1080" 277.00 3840 3904 3968 4160 1080 1083 1092 1111 +HSync +VSync
2x 1920x1200:  ModeLine "3840x1200" 308.00 3840 3904 3968 4160 1200 1203 1213 1235 +HSync +VSync
Code:
Triple Head Modes
3x 1280x1024:  ModeLine "3840x1024" 254.31 3840 3856 3872 3976 1024 1025 1032 1066 +HSync +VSync
3x 1360x768:   ModeLine "4080x768"  200.38 4080 4104 4136 4200  768  771  779  795 +HSync +VSync
3x 1440x900:   ModeLine "4320x900"  320.10 4320 4400 4688 5712  900  903  915  934 +HSync +VSync
3x 1680x1050:  ModeLine "5040x1050" 326.66 5040 5104 5168 5376 1050 1053 1057 1066 +HSync +VSync
To make the timing settings effective, you need to add the following
line to the "Screen" section of your xorg.conf file:

Option "UseEDID" "False"
Option "ExactModeTimingsDVI" "True"


Feedback is highly welcome

regards

Bernhard
JaXXoN is offline   Reply With Quote