• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

dual or tri monitor setup w/ linux

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

ookabooka

Member
Joined
Sep 22, 2002
Location
[email protected] localhost.localdomain
I am just bored of this single monitor setup I have. I scrounged around for a couple of video cards that I planned to put in my box. However, I don't know if X supports it that well or not, I have never used multiple monitor setups on linux. I know windows could do it, but I am trying to move away from windows. Anyone know if it'll work, and if so is there any configs that I need to do?

edit: RH8 btw, though I wouldn't mind upgrading some packages if its necesary.
 

snowmobile74

Member
Joined
Oct 25, 2001
Location
Iowa
oh yea its really easy actualy ok first off make a backup of your /etc/X11/XF86Config file

after that find the line that says > Section "Device"
Identifier "gfgood" < this is simply the unique identifier for this video card
Driver "nvidia" < The driver :p
BusID "PCI:1:0:0" < and the BUSID
Note: EACH card MUST have its own special section like above

To find the driver: type "xf86config" this is a text based prgram that does _not_ require X go through it and take a look at the card database from this find your card and its respective driver this goes in the secion above labled DRIVER

after you have put in all of the video cards you would like to configure
type cat "cat /proc/pci"
then it will output a lot of information about all your pci devices look for something like "VGA compatible controller" this is most likely a video card about 2-3 lines below that should be the bus ID that is the information you need to put into the busID line above


allright Next we configure the monitor find the secion labled
Section "Screen"
coy the entire secion 1 secion 1 monitor etc . . .
Identifier "Screen 1" < Unique ID for this monitor usualy its easty just to say "screen 2" for the next one to keep things straight
Device "gfgood" < video card you will be using for this monitor
Monitor "mac" < unique ID for this monitor
DefaultDepth 24 < this is the color depth you will be runing in for this monitor 24 is usualy the best because not much supports 32 bit

moving allong oh I missed one monitor secion
Section "Monitor"

Identifier "mac" < unique ID for this monitor
HorizSync 30-110 <Horizonal sync range that this monitor can do "refer to you manual!!!"
VertRefresh 50-180 < vert refresh "please refer to your manual"

EndSection

allright now down to the layout of the monitors

the layout goes in Section "ServerLayout"

the format for it is
Screen "Screen 1" Relationship "Screen 2"

Screen "Screen 2" Relative "Screen 1" 0 0 makes them output the same thing
Screen "Screen 2" Relative "Screen 1" 0 1024 puts screen 2 1024 pixles BELOW screen 2
Screen "Screen 3" RightOf "Screen 1" puts screen 3 right of screen 1

you can set up as many monitors as you like your only limitation is the amount of video cards you can put in it :) one of the disadvantages of this is that you cant really drag windows over to a diffrent screen unless you enable xinerama you can do that by doing "startx -- +xinerama" at the console this has its own disatvantages and strengths which I will let you figure out yourself if you have any trouble with this guide just ask . . .
Good Luck
 

nil_esh

Member
Joined
Nov 7, 2001
Location
Tampa, FL
I've got dual monitors in Linux and it is awesome; I'll go tri monitor when I get the chance. Its especially nice for doing any kind of work, where you have something open on one monitor for reference, and the other monitor you are doing something. Good stuff.

Anyways, I did have an issue with one combination of video cards. I was using a PCI Geforce2 card (Visiontek MX200) and an AGP ATI All-In-Wonder 128. I got it working in X, but when I exit X, the ATI card would display some text in the screen, but would be totally unresponsive after that. If I restarted X it would only use the Geforce2. I was unable to fix this or find a workaround and the only solution was to reboot. This was unacceptable, so I replaced the ATI card with another PCI Geforce2 (Asylum MX100 I believe), and its been working perfectly since then.

Also, look into what window manager you plan to use and how it supports Xinerama. I'm using KDE 3.1 and it seems to handle most of the issues that come from using multiple monitors. At worst, a splash screen will be split between the two screens, but windows always open up where I want them. If you use KDE, look for the Xinerama options, they are hidden in there somewhere and are pretty useful.
 

kaltag

Senior Member
Joined
Jul 28, 2002
Location
Boise Idaho
I have yet to get this working with a dual head TI4200. When I load X it works fine with one screen and then When I exit X I see the error "Could not find Screen1" blah blah blah. Here's my XF86Config file to look over and see if I missed something.
# XFree86 4 configuration created by redhat-config-xfree86

Section "ServerLayout"
Identifier "DualHead"
Screen "Screen0" LeftOf "Screen1"
#option "Xinerama"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "DevInputMice" "AlwaysCore"
EndSection

Section "Files"

# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection

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

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "InputDevice"

# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
Identifier "DevInputMice"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Generic Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz"
DisplaySize 279 203
HorizSync 31.5 - 48.5
VertRefresh 50.0 - 70.0
Option "dpms"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Generic Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72Hz"
DisplaySize 279 203
HorizSync 31.5 - 48.5
VertRefresh 50.0 - 70.0
Option "dpms"

EndSection

Section "Device"
Identifier "Videocard-0"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 65536
Screen 0

EndSection

Section "Device"
Identifier "Videocard-1"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 65536
Screen 1

EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard-0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection

EndSection

Section "Screen"
Identifier "Screen1"
Device "Videocard-1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480
EndSubSection
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

Thanks to anoyone who can help :) I'm using RH9 btw.
 

nil_esh

Member
Joined
Nov 7, 2001
Location
Tampa, FL
kaltag- Since both heads are the same driver, you may need to specify something for BusID. This is what my video card config looks like:


Section "Device"
Identifier "nVidia Corporation NV11 [GeForce 2 MX]"
Driver "nv"
BusID "PCI:0:13:0"
#VideoRam 32768
EndSection

Section "Device"
Identifier "nVidia Corporation NV11DDR [GeForce2 MX 100 DDR/200 DDR]"
Driver "nv"
BusID "PCI:0:16:0"
#VideoRam 32768
EndSection


Here's how to scan the PCI bus to find out what you need for BusID:

http://www.ibiblio.org/pub/Linux/do...html_single/Xinerama-HOWTO.html#PCIBUSSECTION

Basically, shut down X and type "XFree86 -scanpci"

Good luck.
 

snowmobile74

Member
Joined
Oct 25, 2001
Location
Iowa
well actualy the busID for the cards will have to be the same card

heres the NVIDIA offical comments on it . . .

(app-r) APPENDIX R: CONFIGURING MULTIPLE X SCREENS ON ONE CARD
__________________________________________________________________________

Graphics chips that support TwinView (see (app-i) APPENDIX I: CONFIGURING
TWINVIEW) can also be configured to treat each connected display device
as a separate X screen.

While there are several disadvantages to this approach as compared to
TwinView (eg: windows cannot be dragged between X screens, hardware
accelerated OpenGL cannot span the two X screens), it does offer several
advantages over TwinView:

o If each display device is a separate X screen, then properties
that may vary between X screens may vary between displays (eg:
depth, root window size, etc).

o Hardware that can only be used on one display at a time (eg:
video overlays, hardware accelerated RGB overlays), and which
consequently cannot be used at all when in TwinView, can be
exposed on the first X screen when each display is a separate
X screen.

o The 1-to-1 association of display devices to X screens is
more historically in line with X.

To configure two separate X screens to share one graphics chip, here is
what you will need to do:

First, create two separate Device sections, each listing the BusID of
the graphics card to be shared, each listing the driver as "nvidia",
and assign each a separate screen:


Section "Device"
Identifier "nvidia0"
Driver "nvidia"
# Edit the BusID with the location of your graphics card
BusID "PCI:2:0:0"
Screen 0
EndSection

Section "Device"
Identifier "nvidia1"
Driver "nvidia"
# Edit the BusID with the location of your graphics card
BusId "PCI:2:0:0"
Screen 1
EndSection


Then, create two Screen sections, each using one of the Device sections:


Section "Screen"
Identifier "Screen0"
Device "nvidia0"
Monitor "Monitor0"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1600x1200" "1024x768" "800x600" "640x480"
EndSubsection
EndSection

Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "Monitor1"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1600x1200" "1024x768" "800x600" "640x480"
EndSubsection
EndSection


(note: you'll also need to create a second Monitor section)

Finally, update the ServerLayout section to use and position both Screen
sections:


Section "ServerLayout"
...
Screen 0 "Screen0"
Screen 1 "Screen1" leftOf "Screen0"
...
EndSection


For further details, please refer to the XF86Config manpage.
that doc can be located here > ftp://download.nvidia.com/XFree86/Linux-x86/1.0-4363/README.txt

allso they show you how to configure it using twinview which might work a little better
 
OP
ookabooka

ookabooka

Member
Joined
Sep 22, 2002
Location
[email protected] localhost.localdomain
ok, I got it up and running. A big problem though. There is some sort of distortion on the second screen, I have seen it before in linux on my other box, but ignored it since I didn't know how to make it go away (it was a router, didn't use screen much). Anywho, it looks like there are lines that flash rapidly that are off center. For instance, if there was an appple on screen, it would have lines basically sliced off of it and placed a couple centimeters to the right. I think this is a refresh problem. . . but its wierd because the mouse isn't affected at all. In anycase, I got linux to recognise the second card before windows did, Windows 2k doesn't like really old cards.


edit: I ahve a geforce 4 as my main card. Apparently this card is dual-display capable all by itself. Is there a howto on how to get the card to do this? What kinda adapter do I need for the DVI output. . . thnx for your help.
 
Last edited: