Previous Section  < Day Day Up >  Next Section

Recipe 15.7. Configuring a Multihead Display

15.7.1 Problem

You would like to connect two monitors to a single system. You might want to have a single desktop span both monitors, or have two separate desktops, and maybe run different screen resolutions on each monitor.

15.7.2 Solution

XFree86 does it all. You'll need to have either two video cards or a single dual-head card installed and working. You'll also need two monitors, and XFree86 Version 4.x. Then edit XF86Config to create your desired multihead configuration.

To check your X version, use:

$ X -version

XFree86 Version 4.3.0...

You should configure your system to boot to a text console, so you can start X in whatever mode you want. You'll have four modes to choose from:


Traditional

Two different desktops, which can have different resolutions and color depths


Xinerama

A single desktop spanning across all screens, which must have the same resolutions and color depths


Clone

Two displays, mirrored


Single

Use only one monitor

First, back up your current XF86Config, then open it for editing. The PCI bus ID must be added to the Device entries:

Section "Device"

    Identifier  "3dfx"

    Driver      "tdfx"

    BusID       "PCI:1:0:0"

EndSection

...

Section "Device"

    Identifier  "nVidia"

    Driver      "nv"

    BusID       "PCI:0:12:0"

EndSection

This information comes from lspci:

$ /sbin/lspci

...

0000:00:12:0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT Model 64/Model

 64 Pro](rev 15)

0000:01:00.0 VGA compatible controller: 3Dfx Interactive, Inc. Voodoo 3 (rev 01)

Next, create a ServerLayout section. This example activates Xinerama at startup:

Section "ServerLayout"

  Identifier     "Xinerama"

  InputDevice    "Default Keyboard0"      "CoreKeyboard"

  InputDevice    "Default Mouse0"         "CorePointer"

  Option         "Clone"         "off"

  Option         "Xinerama"      "on"

# Other screen position options are Below, Above, and LeftOf

  Screen         "Screen0" RightOf "Screen1"

  Screen         "Screen1"

EndSection

To start X, boot to a text console and run:

$ startx

It will start up in full-color Xinerama.

15.7.3 Discussion

To start up in Traditional mode, set both Clone and Xinerama to "off," and change the Identifier to "Traditional."

To set Clone mode, turn off Xinerama, turn on Clone, and change the Identifier to "Clone."

Many video adapters are not capable of handling 3D acceleration in multihead mode. Check your documentation to find out if yours can.

PCI bus numbers that start with 0 are PCI cards. AGP cards start with 1.

Sometimes two video cards conflict and simply won't work together. If you think you have a problem, first run each card individually, to verify that they work. Then try moving the PCI card to a different slot. If that does not cure the conflict, you'll have to try different cards.

15.7.4 See Also

  • XF86Config(5x), for a complete description of all the available configuration options

  • Recipe 7.4, to learn how to configure your system to boot to either X or a text console

    Previous Section  < Day Day Up >  Next Section