Defindit Docs and Howto Home

This page last modified: Jan 20 2010
keywords:dual,monitor,head,screen,x,x-windows,window,linux,display,nvidia,driver,xorg,x11,Acer,AL2216W,1680,1050
description:Fedora 8 working dual-head TwinView X Windows nVidia with different size monitors.
title:Dual-head X Windows nVidia configuration

Table of contents
-----------------
Introduction
Update 2
Update 1
Howto
Working xorg.conf
Notes about reading Xorg.0.log
Rant
Non working xorg.conf using nv


(Some names below such as nVidia are (TM) their respective owners.)


Introduction
------------

The Nvidia Quadro FX 500 / FX 600 is not supported with recent nvidia
drivers. You have to use the old "legacy" 173xx drivers. yum will
install the legacy drivers from rpmfusion.

Below are notes about X windows xorg.conf file and the nv and nvidia
drivers. Searching with Google for solutions was not very helpful,
although one of these searches revealed that nVidia has closed source
drivers which work better in some situations than the open source nv
drivers for nVidia cards. 

The nVidia documentation was invaluable. I didn't find it on the
internet, but instead it was on my hard drive (as part of the nVidia
driver install I assume). Such things are often found in
/usr/share/doc. 

Apparently options are not case sensitive. See my "metamodes" below. 

From the docs the device names are "<type>-<number>", for example:
"CRT-0", "CRT-1", "DFP-0", or "TV-0". However, if you only have one of
each type of device as I do since I only have one card, then you can
leave off the -<number> and simply use CRT and DFP.

You might see notations such as DFP0 (without the hyphen). This is not
correct for the nvidia driver. It might work with the nv driver. 



Update 2
--------

I have a fully working twinhead (dual monitor) configuration with two
LCD monitors which are not identical in size. I was able to get it
working with help from the good documentation provided with the closed
source nvidia drivers which I installed from the fantastic Livna
repository. The config below also includes a work-around for max
resolution with the Acer AL2216W. The key issue of the work around was
getting X and nvidia to ignore the (apparently) incorrect info from
probing the monitor. This is what I did:

Section "Screen"
...
    Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1680x1050 +1280+0"
    Option         "ModeValidation" "DFP-0: NoDFPNativeResolutionCheck,NoMaxPClkCheck"
...
EndSection

Using "NoDFPNativeResolutionCheck" alone did not work. The driver also
incorrectly detected the pixel clock for the Acer monitor. (I assume
the pixel clock is much higher than detected because the Acer is newer
and presumably better than my 3 or 4 year old Dell. I don't know if
the clock detection error is a bug with the Acer monitor or the nvidia
driver, or some other X software.) Note below that the Dell monitor
(older) has a much higher pixel clock, as detected by the
driver/X. This is from /var/log/Xorg.0.log:

(--) NVIDIA(0): DELL 1901FP (CRT-0): 350.0 MHz maximum pixel clock
(--) NVIDIA(0): Acer AL2216W (DFP-0): 135.0 MHz maximum pixel clock

By telling the nvidia driver to ignore the DFP native resolution
check, and to not check the maximum pixel clock, the 1680x1050 mode
was used. I manually edited the "metamodes" for DFP to be 1680x1050.

I also added a Virtual setting to the Display subsection because
nvidia and X incorrectly calculated the virtual screen size.

Section "Screen"
...
    SubSection     "Display"
        Depth       24
        Virtual     2960 1050
    EndSubSection
EndSection


The Dell monitor is only 1280x1024, however it is physically  the same
height as the Acer. Side-by-side this is slightly odd as there is an
offset towards the bottom of the screens. I do not consider this a
problem.

Note that you cannot use nvidia-settings after manually modifying
xorg.conf. The Options and Virtual settings I've used above are lost
when running nvidia-settgings. Always backup your xorg.conf file
before making any changes or running any configuration tools.

My display setup is: nVidia NV34GL
Quadro FX 500/600 PCI card, 
Dell 1280x1024 LCD connected to the VGA (analog) port, Acer 1680x1050
LCD connected to the DVI port. The Dell is on the left and the Acer is
on the right.

Below is the final xorg.conf file:


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder3)  Thu Feb 14 18:21:33 PST 2008

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath         "/usr/X11R6/lib/X11/rgb"
#    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "pc105"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL 1901FP"
    HorizSync       30.0 - 80.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 500/FX 600"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1680x1050 +1280+0"
    Option         "ModeValidation" "DFP-0: NoDFPNativeResolutionCheck,NoMaxPClkCheck"
    SubSection     "Display"
        Depth       24
        Virtual     2960 1050
    EndSubSection
EndSection



Update 1
--------

If you have tried all the usual things, it may be time to look at the
documentation. For Fedora and the Livna nvidia distro, my docs are in:

/usr/share/doc/xorg-x11-drv-nvidia-169.12

I tried to get my Acer AL2216W working as a single display at the
native 1680x1050 resolution. This works with the open source nv
driver. However, due to a known bug, it does not work with the nvidia
driver and/or the associated configuration tools. I found a web page
that suggests adding this option to the monitor section:

Option "ModeValidation" "NoDFPNativeResolutionCheck"

It didn't work. The driver acknowledges this option, then proceeds to
say that 1680x1050 is not a supported mode. (I've got a mode line
too.) I have not yet given up, but once again, I've wasted 1.5 hours.




Howto
-----

The working solution uses the nvidia package (drivers and utilities)
which you can get from the livna repository.

You'll have to login as root for most of these commands.

Before starting a big configuration of X windows, I suggest you edit
/etc/inittab and change your default runlevel to 3. Use the command
"startx" to start X windows. When you close your X session, X will
shutdown leaving you back at the console prompt. Only on rare
occasions is a reboot necessary.

I keep a list of yum packages in a file because it takes a looong time
for yum to list things. When I need a package, I grep the list for
package names. One of the first things I do after an install is add
livna to my package repo. Livna has an rpm for the repo, so you can do
something like

rpm -i http://whatever-the-livna-rpm-url-is/

This I run a yum command such as:

yum list all > yum_list.txt

Here is a partial listing, the the pertinent info:
grep nvidia yum_list.txt  
...
kmod-nvidia-legacy-2.6.23.9-85.fc8.i686  71.86.01-18.lvn8       livna
kmod-nvidia-legacy-2.6.23.9-85.fc8.i586  71.86.01-18.lvn8       livna
kmod-nvidia-legacy-2.6.23.9-85.fc8PAE.i6 71.86.01-18.lvn8       livna
kmod-nvidia-legacy-PAE.i686              71.86.01-18.lvn8       livna
xorg-x11-drv-nvidia.i386                 169.07-4.lvn8          livna
xorg-x11-drv-nvidia-96xx.i386            96.43.01-3.lvn8.1      livna
xorg-x11-drv-nvidia-96xx-devel.i386      96.43.01-3.lvn8.1      livna
xorg-x11-drv-nvidia-devel.i386           169.07-4.lvn8          livna
xorg-x11-drv-nvidia-legacy.i386          71.86.01-4.lvn8.1      livna
xorg-x11-drv-nvidia-legacy-devel.i386    71.86.01-4.lvn8.1      livna
...

Just guessing, I figured the xorg-x11-drv-nvidia package was right for me.

yum -y install xorg-x11-drv-nvidia


Next run nvidia-xconfig. This will get one of your monitors
working. I've got a Dell workstation and my card is an nVidia NV34GL
Quadro FX 500/600 PCI. I've got a Dell 1280x1024 resolution LCD on the VGA video
output, and an Acer 1680x1550 pixel plugged into the DVI port.

The nvidia-xconfig script made the smaller (shorter, as in a smaller
value for the vertical resolution, i.e. 1024) Dell the default. It might
be better that your taller monitor is the default, and the taller
monitor might need to be on the left. 

Next run nvidia-settings. Choose the display settings. Add a second
display, and enable "twin head". In the upper right of the config
dialog box, you can click on the right hand monitor to choose its
settings. Even though my Acer has a vertical resolution of 1050, but
nvidia-settings did not allow me to choose a value above 1024, perhaps
limited by the vertical resolution of the Dell. (In earlier attempts,
I could choose a *smaller* value for the vertical resolution of the
right hand monitor, therefore I conclude that the shorter monitor
should be on the right. I have not tested this theory.)

Save the config file and startx. In my case X would not start and the
error was something about a missing font. Under Fedora 8 there is no
separate xfs (x font server), so that wasn't the problem. In the
/etc/X11/xorg.conf there is a FontPath setting. The file referenced
does not exist on my system. I commented out this line, and everything
worked.

My good xorg.conf file is below



Working xorg.conf
-----------------


---- xorg.conf below --------

# This file is known to work.
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder3)  Thu Feb 14 18:21:33 PST 2008

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath         "/usr/X11R6/lib/X11/rgb"
#    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "pc105"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL 1901FP"
    HorizSync       30.0 - 80.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 500/FX 600"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1600x1024 +1280+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

------- end xorg.conf working ----------



Notes about reading Xorg.0.log
------------------------------

I found that searching /var/log/Xorg.0.log for "(EE)" and "(WW)" and
"unable" often took me right to the part of the log file hinting at
the problem. If X says a device can't be used, then the config file is
wrong. If X says an option is ignored then (I guess) the option may
have a somewhat wrong format, or may require some other setting to be
active. 

Syntax errors often prevent X from running at all, so you will usually
be looking for subtle errors that prevent a feature (like your right
hand monitor) from working.  For example, during experimentation, I
never could get MetaModes right. X would read it, try to use it, then
say something like "mode not supported, reverting to
nvidia-auto-config" and would then run my 1680x1550 monitor at
1440x900. Why 1440x900? Who knows. No hints about that. 

During debugging, I kept this command in my bash history:

emacs /etc/X11/xorg.conf /var/log/Xorg.0.log

I'd runt startx, see that things weren't working. Exit, do a ^P or up
arrow to the command above, and search Xorg.0.log for errors. 

Also, if you start your KDE desktop and the menus are off the screen,
or otherwise invisible, do this:

Alt-F1
uparrow
enter

Those three keystrokes will open the start menu, select "log out" and
hit the default "end session". 

Sadly, I was never able to create a working xorg.conf. The
nvidia-config software did that, so I can't take any credit. 



Rant
----

I love Linux. I use it at home and at work. However, several aspects
of Linux are still very difficult for many users. We need
documentation and working examples.

The open source nv driver was a disaster. I can't tell if it is
possible to get dual head working with nv. The nv driver documentation
in /usr/share/doc consists of two small files containing no actual
documentation. After Googleing for on the topic of dual head monitors
for literally 6 hours I was unable to find a definitive, working
xorg.conf file. A search for documentation turned up some docs on the
internet from 2002, but then I realized that many Linux packages
install documentation locally (on the hard drive). Sure enough, there
are extensive docs on my machine for the closed source nvidia
driver. What little nv information I found generally did not include
examples.

Open source is good, but in this case, the closed source nvidia
drivers are superior to the open source nv drivers. The nvidia package
has better configuration software and it has extensive, well written,
documentation with some examples. While not perfect, it does work.

Along with all the misleading information I found, I also discovered
at least a dozen unanswered questions just like mine in Linux support
forums. Community support is well and good, and often works. Lots of
people are using Linux and that's good. The dark side is that lots of
people are running into problems. The forum moderators are so busy
that they don't go back and delete questions that no one ever
answered.

I would like to thank the many people who have answered questions
about X and twinview. Some of the answers were useful. I saw some
interesting xorg.conf files. However, none of them worked for me, even
after much fussing and testing. This was easily one of the most
frustrating chapters of my fairly long career with Linux.





Non-working xorg.conf using nv
-------------------------------

This file didn't work. It is interesting. Maybe it could work. Who
knows? If you have a working solution, contact me and I will happily
post your solution or link to it. As I recollect the file below
brought up one monitor, but not both. 

--------- non-working xorg.conf ----------------

Section "ServerLayout"
        Identifier     "Multihead layout"
        Screen      0  "Screen0" LeftOf "Screen1"
        Screen      1  "Screen1" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        Option      "Xinerama" "on"
        Option      "Clone" "off"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us+inet"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "ACR ada1"
        ModelName    "LCD Panel 1680x1050"
        HorizSync    31.5 - 65.5
        VertRefresh  56.0 - 65.0
        Option      "dpms"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "DELL 1901FP"
        ModelName    "LCD Panel 1280x1024"
        HorizSync    31.5 - 65.5
        VertRefresh  56.0 - 65.0
        Option      "dpms"
EndSection


Section "Device"
        Identifier  "Videocard1"
        Driver      "nv"
        VendorName  "Videocard Vendor"
        BoardName   "nVidia Corporation NV34GL [Quadro FX 500/600
        PCI]"
        BusID       "PCI:1:0:0"
        Screen      0
EndSection

Section "Device"
        Identifier  "Videocard1"
        Driver      "nv"
        VendorName  "Videocard Vendor"
        BoardName   "nVidia Corporation NV34GL [Quadro FX 500/600
        PCI]"
        BusID       "PCI:1:0:0"
        Screen      1
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes     "1680x1050"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Videocard1"
        Monitor    "Monitor1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1280x1024"
        EndSubSection
EndSection