June 20, 2003
This document covers how I got dual monitors to work on Gentoo Linux. The two monitors are side-by-side physically and it is as if I have one large 2560x1024 desktop. Both monitors are running the same resolution of 1280x1024.
I am going to assume you already have Gentoo installed and have XFree86 working with one monitor right now. If you don't have this, please follow the Gentoo installation documentation and XFree86 setup. Before compiling XFree86, see the section below regarding xinerama support.
Equipment: I am also going to assume you have the following equipment
or something similar. How you set this up may be dependent on the video card
you use. I got and use the nVidia card. I have no experience using any
other dual-card or two video cards setup.
- Two Identical Monitors (Dell 21" P1110)
- Dual VGA Output Video Card (nVidia Ge-Force FX-5200)
The "nv" driver that initial came with my XFree86 install did not work, I needed to use the "nvidia" one. So if you did not install the nVidia drivers following the XFree86 instructions about you will need to install the following.
# emerge nvidia-kernel
After installing the packages:
# modprobe nvidia
I am using the latest XFree86 ver 4.3.0 with xinerama support compiled in. I'm not sure if this is necessary or not, but it very well may be. To compile XFree86 with xinerama support. Edit /etc/make.conf and add xinerama to your USE variable. Recompile X using:
The only thing left is to configure XFree86. The nVidia card uses some
special options inside of the Screen section of your XF86Config.
The config file is found at Please carefully look over this file before making changes. If your X config is running
well then I would compare and hand copy the Screen and verify the Device. Be sure you use
the same identifiers in the different sections. I may have named mine differently than yours. Screen Section: View Complete Config File: XF86Config file After you have everything configured. Exit X (quick way: ctrl-alt-backspace) and restart.
Section "Screen"
Identifier "Screen0"
EndSection
Device "NVIDIA"
Monitor "My Monitor"
DefaultDepth 24
Option "NvAGP" "1"
Option "TwinView" "true"
Option "SecondMonitorHorizSync" "30.0-121.0"
Option "SecondMonitorVertRefresh" "48.0-160.0"
Option "MetaModes" "1280x1024, 1280x1024; 1280x1024, 1280x1024;"
Option "TwinViewOrientation" "RightOf"
Option "Xinerama" "on"
Subsection "Display"
Depth 24
EndSubsection
Modes "1280x1024"
ViewPort 0 0
Hopefully everything worked right and you should have one large desktop across two monitors.
If not, check all your error messages on screen and also look for any in /var/log/XFree86.0.log I won't be much help trouble shooting, this documents just about everything I know regarding this. You can try some of the links below for more information or use the University of Google, the best education around.
- Gentoo Linux Desktop Configuration Guide
- Gentoo nVidia Trouble Shooting Guide
- nVidia Linux TwinView Documentation
- Xinerama HOWTO
- LinuxQuestions.org Forum This forum topic helped steer me in the right direction.