Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

TUTORIAL: Multi-head Configuration

by Hoyt Duff

Fedora Core does not offer the ability to configure a multi-head display. Mike Harris of Red Hat told me last year that it was not a priority for Red Hat because it was not a typical configuration. Hopefully the Fedora crew can address this shortcoming, but until then, here's how to cope, realizing that you can never again use the redhat-config-xfree86 tool because of its incompatibility with a multi-head configuration. (See UPDATE below.)


Fortunately, Xfree86 provides us with a tool. As root,


# XFree86 -configure


and you'll see:


XFree86 has configured a multi-head system, please check your config.

Your XF86Config file is /root/XF86Config.new

To test the server, run 'XFree86 -xf86config /root/XF86Config.new'


Now, to test the configuration,


# XFree86 -xf86config /root/XF86Config.new


and you should be rewarded with a blank graphical display sporting the famous X cursor.


If this works, simply


# cp /root/XF86Config.new /etc/X11/XF86Config


You might run into problems. Look at any error messages you may get to see if they can point the way. Let's leave the pristine file in /root/XF86Config.new and make any changes to /etc/X11/XF86Config.


I use two monitors configured as independent displays as opposed to the more common xinerama display where one desktop is shown across all available monitors (I've done that with as many as four monitors before – very cool).

Here is what the original configuration file looked like. My comments are in red and italics.


This first section describes the physical layout of your displays. The identifiers (Screen 0, for example) are described in subsequent sections. Screen 0 will be on the left; Screen 1 on the right. Both will use the mouse and keyboard devices.


Section "ServerLayout"

Identifier "XFree86 Configured"

Screen 0 "Screen0" 0 0

Screen 1 "Screen1" RightOf "Screen0"

InputDevice "Mouse0" "CorePointer"

InputDevice "Keyboard0" "CoreKeyboard"

EndSection


This section tells Xfree86 where to find fonts. Since Fedora uses a font server, you should delete all references to “Font Path” and add the following single line for the font server:


FontPath "unix/:7100"


Section "Files"

RgbPath "/usr/X11R6/lib/X11/rgb"

ModulePath "/usr/X11R6/lib/modules"

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

FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"

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

FontPath "/usr/X11R6/lib/X11/fonts/CID/"

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

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

EndSection


This section dynamically loads modules that add functionality to XFree86. Your list may be different. The list created when redhat-config-xf86config was run is:


Section "Module"

Load "dbe"

Load "extmod"

Load "fbdevhw"

Load "glx"

Load "record"

Load "freetype"

Load "type1"

Load "dri"

EndSection


Why they are different and why they were chosen as they were is unknown to me.

The glx and dri modules are used for the Direct Rendering Infrastructure which is related to the Section "DRI" at the end.


Section "Module"

Load "glx"

Load "vnc"

Load "dbe"

Load "dri"

Load "extmod"

Load "record"

Load "xtrap"

Load "speedo"

Load "type1"

EndSection


The next two sections define the keyboard and mouse, respectively.


Section "InputDevice"

Identifier "Keyboard0"

Driver "keyboard"

EndSection

Section "InputDevice"

Identifier "Mouse0"

Driver "mouse"

Option "Protocol" "auto"

Option "Device" "/dev/mouse"

EndSection


Since my mouse was not detected correctly, I ran redhat-config-mouse, which produced the following (and automatically modified /etc/X11/XF86Config):


Section "InputDevice"

Identifier "Mouse1"

Driver "mouse"

Option "Protocol" "IMPS/2"

Option "Device" "/dev/psaux"

Option "ZAxisMapping" "4 5"

EndSection


The following sections describe the two monitors. If they were properly detected, the next sections would not be blank. You would have as many monitor sections as there were physical screens.


Section "Monitor"

Identifier "Monitor0"

VendorName "Monitor Vendor"

ModelName "Monitor Model"

EndSection

Section "Monitor"

Identifier "Monitor1"

VendorName "Monitor Vendor"

ModelName "Monitor Model"

EndSection


Since my monitors are not in the Fedora database, I need to add them manually:


Section "Monitor"

Identifier "Monitor0"

VendorName "Viewsonic"

ModelName "VP171b"

HorizSync 30.0 - 82.0

VertRefresh 50.0 - 85.0

Option "DPMS"

EndSection

Section "Monitor"

Identifier "Monitor1"

VendorName "Viewsonic"

ModelName "VP171b"

HorizSync 30.0 - 82.0

VertRefresh 50.0 - 85.0

Option "DPMS"

EndSection


This next section describes the video cards. Note that I have already installed the Nvidia drivers (and have tainted the kernel in the process – bad me) so the listing includes all the options available to me for that video driver. Even if you don't want to manually configure you file, this exercise may help you discover what options the driver you are using may offer. The documentation for your driver should explain the choices.


Note that I'm using a AGP card as well as a PCI video card. The nVidia AGP card has an analog and digital output, so I could also use its Twinview feature to have a dual head display with only one card; their documentation provides an explanation of how this is accomplished. I use two cards because I have them and it's easier to configure.


The BusID value is important. You can see what your actually is with the lspci command. Check it against the value your file shows; change it if necessary.


The identifier value for each card is used in the first section above. If they aren't in the correct order for you, change them here OR above, but not in both places.


Section "Device"

### Available Driver options are:-

### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

### [arg]: arg optional

#Option "DigitalVibrance" # <i>

#Option "NoFlip" # [<bool>]

#Option "Dac8Bit" # [<bool>]

#Option "NoLogo" # [<bool>]

#Option "UBB" # [<bool>]

#Option "Stereo" # <i>

#Option "SWcursor" # [<bool>]

#Option "HWcursor" # [<bool>]

#Option "VideoKey" # <i>

#Option "NvAGP" # <i>

#Option "IgnoreEDID" # [<bool>]

#Option "NoDDC" # [<bool>]

#Option "ConnectedMonitor" # <str>

#Option "ConnectedMonitors" # <str>

#Option "TVStandard" # <str>

#Option "TVOutFormat" # <str>

#Option "RenderAccel" # [<bool>]

#Option "CursorShadow" # [<bool>]

#Option "CursorShadowAlpha" # <i>

#Option "CursorShadowXOffset" # <i>

#Option "CursorShadowYOffset" # <i>

#Option "UseEdidFreqs" # [<bool>]

#Option "FlatPanelProperties" # <str>

#Option "TwinView" # [<bool>]

#Option "TwinViewOrientation" # <str>

#Option "SecondMonitorHorizSync" # <str>

#Option "SecondMonitorVertRefresh" # <str>

#Option "MetaModes" # <str>

#Option "UseInt10Module" # [<bool>]

#Option "NoTwinViewXineramaInfo" # [<bool>]

#Option "NoRenderExtension" # [<bool>]

#Option "Overlay" # [<bool>]

#Option "CIOverlay" # [<bool>]

#Option "ForceEmulatedOverlay" # [<bool>]

#Option "TransparentIndex" # <i>

#Option "OverlayDefaultVisual" # [<bool>]

#Option "NvEmulate" # <i>

#Option "NoBandWidthTest" # [<bool>]

#Option "CustomEDID-CRT-0" # <str>

#Option "CustomEDID-CRT-1" # <str>

#Option "CustomEDID-DFP-0" # <str>

#Option "CustomEDID-DFP-1" # <str>

#Option "CustomEDID-TV-0" # <str>

#Option "CustomEDID-TV-1" # <str>

#Option "TVOverScan" # <f>

#Option "IgnoreDisplayDevices" # <str>

#Option "MultisampleCompatibility" # [<bool>]

#Option "RegistryDwords" # <str>

#Option "NoPowerConnectorCheck" # [<bool>]

Identifier "Card0"

Driver "nvidia"

VendorName "nVidia Corporation"

BoardName "NV25 [GeForce4 Ti 4600]"

BusID "PCI:1:5:0"

EndSection


Section "Device"

### Available Driver options are:-

### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

### [arg]: arg optional

#Option "DigitalVibrance" # <i>

#Option "NoFlip" # [<bool>]

#Option "Dac8Bit" # [<bool>]

#Option "NoLogo" # [<bool>]

#Option "UBB" # [<bool>]

#Option "Stereo" # <i>

#Option "SWcursor" # [<bool>]

#Option "HWcursor" # [<bool>]

#Option "VideoKey" # <i>

#Option "NvAGP" # <i>

#Option "IgnoreEDID" # [<bool>]

#Option "NoDDC" # [<bool>]

#Option "ConnectedMonitor" # <str>

#Option "ConnectedMonitors" # <str>

#Option "TVStandard" # <str>

#Option "TVOutFormat" # <str>

#Option "RenderAccel" # [<bool>]

#Option "CursorShadow" # [<bool>]

#Option "CursorShadowAlpha" # <i>

#Option "CursorShadowXOffset" # <i>

#Option "CursorShadowYOffset" # <i>

#Option "UseEdidFreqs" # [<bool>]

#Option "FlatPanelProperties" # <str>

#Option "TwinView" # [<bool>]

#Option "TwinViewOrientation" # <str>

#Option "SecondMonitorHorizSync" # <str>

#Option "SecondMonitorVertRefresh" # <str>

#Option "MetaModes" # <str>

#Option "UseInt10Module" # [<bool>]

#Option "NoTwinViewXineramaInfo" # [<bool>]

#Option "NoRenderExtension" # [<bool>]

#Option "Overlay" # [<bool>]

#Option "CIOverlay" # [<bool>]

#Option "ForceEmulatedOverlay" # [<bool>]

#Option "TransparentIndex" # <i>

#Option "OverlayDefaultVisual" # [<bool>]

#Option "NvEmulate" # <i>

#Option "NoBandWidthTest" # [<bool>]

#Option "CustomEDID-CRT-0" # <str>

#Option "CustomEDID-CRT-1" # <str>

#Option "CustomEDID-DFP-0" # <str>

#Option "CustomEDID-DFP-1" # <str>

#Option "CustomEDID-TV-0" # <str>

#Option "CustomEDID-TV-1" # <str>

#Option "TVOverScan" # <f>

#Option "IgnoreDisplayDevices" # <str>

#Option "MultisampleCompatibility" # [<bool>]

#Option "RegistryDwords" # <str>

#Option "NoPowerConnectorCheck" # [<bool>]

Identifier "Card1"

Driver "nvidia"

VendorName "nVidia Corporation"

BoardName "NV17 [GeForce4 MX 420]"

BusID "PCI:2:5:0"

EndSection


The following section is used to described the video modes that will be used. Everything is supposed to be automatic, so these are usually blank, but you can specify modes. Such a description would be placed in each Depth as appropriate, for example:


Depth 24

Modes “1280x1024” "1024x768" "800x600" "640x480"


The first mode will be the default.


The color depth can be specified at the beginning of the section like this:


Identifier "screen1"

Device "device1"

Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"


Remember that only modes and depths supported by your driver can be used.


Section "Screen"

Identifier "Screen0"

Device "Card1"

Monitor "Monitor0"

SubSection "Display"

Depth 1

EndSubSection

SubSection "Display"

Depth 4

EndSubSection

SubSection "Display"

Depth 8

EndSubSection

SubSection "Display"

Depth 15

EndSubSection

SubSection "Display"

Depth 16

EndSubSection

SubSection "Display"

Depth 24

EndSubSection

EndSection


Section "Screen"

Identifier "Screen1"

Device "Card1"

Monitor "Monitor1"

SubSection "Display"

Depth 1

EndSubSection

SubSection "Display"

Depth 4

EndSubSection

SubSection "Display"

Depth 8

EndSubSection

SubSection "Display"

Depth 15

EndSubSection

SubSection "Display"

Depth 16

EndSubSection

SubSection "Display"

Depth 24

EndSubSection

EndSection


The following section was NOT produced by Xfree86, but would need to be included if you are using DRI and wish for users other than root to use it as well.


Section "DRI"

Mode 0666

EndSection


UPDATE 2004-01-25

Noah Silver writes that dual-head configuration is available in redhat-config-xfree86, and it is! He reports that it works satisfactorily with his ATI Radeon RV100 QY [Radeon 7000/VE]. For me, it still doesn't work (and it only supports two heads, not three or more). The problem is two-fold: 1) the XFree86 nv driver for nVidia cards does not support dual head operation (the nvidia driver from nVidia does) and the redhat-config-xfree86 tool will only use the nv driver, and 2) my monitor, a Viewsonic VP171b, is not in the monitor database. Let's fix both problems.

The driver that is to be used by the video card is specified in the file /usr/share/hwdata/Cards. A short perl script (thanks to my friend John Whitten) will fix that: perl -i -p -e 's/nv(idia)?/nvidia/ig' /usr/share/hwdata/Cards. This will replace every instance of 'nv' or of 'nvidia' with 'nvidia' -- just what we want (now my kernel feels so tainted!).

Adding my monitor to the database is just as easy. That information is kept in the file /usr/hwdata/MonitorsDB and all the entries are in the form: Manufacturer; Monitor name; EISA ID (if any); horiz sync in Khz; verc sync in Hz; DPMS support. I don't yet know how to determine the EISA ID number, and I understand that some LCD monitors return a bogus number so autodetection is not possible. I'll just leave a blank for that and use my favorite text editor to add the following line to the Viewsonic section: ViewSonic; ViewSonic VP171b; ; 30-82; 50-85; 1 .

Now, everything works. Of course, I plan to Bugilla the Viewsonic info so that FC will support my monitor in the future. There's nothing I can do about the nv/nvidia issue, however, except keep the perl script handy.

RESOURCES


If you want a graphical configuration too for the nVidia card, try YanC from http://yanc.sourceforge.net/index-en.html.

An overclocking tool for nVidia cards is available from NVClock at http://www.linuxhardware.org/nvclock/.


Don't forget that www.google.com/linux is your best friend. It's likely that someone else has struggled with an XF86Config problem similar to your and has published an example on the Internet.


The documentation at www.xfree86.org has, for me, been difficult to use since it is incomplete and partially obsolete. It's also written by people who make too many unfounded assumptions about what I'm supposed to already know.


While this document focuses on nVidia (because that's what I use), write to me at hoyt@maximumhoyt.com if you have useful information related to other cards.

Copyright © 2004 Hoyt Duff. Permission granted for use on FedoraNEWS.ORG. All rights reserved.