Click to See Complete Forum and Search --> : Taming the Two Headed Beast: Dual Monitors in X 4.x [Archived]


Alex Cavnar, aka alc6379
05-20-2002, 12:58 AM
Props to WattsMD and Dual Monitor HOWTO (http://www.tldp.org/HOWTO/Xinerama-HOWTO.html#toc1) for helping me get this going.

Recently, a friend in my local LUG gave me about 7 monitors, just to get them out of his place. Ever since then, running dual monitors has intrigued me...

Some newer video cards have the option of dual monitors, but I chose to use two video cards, as going that route is often less expensive. First, make sure both of your cards work in X. That step is covered in numerous HOWTOs at other sites.

Next, in text mode, type XFree86 -scanpci

That will show all of the PCI BusIDs of your system. The ones to focus on are those of your video cards.

Next, you'll need to make an XF86Config file containing the configurations to both of your video cards and the monitors attached to those cards. Be sure to add an the BusID entry for the Graphics cards:

Section "Device"
Identifier "Card1"
Driver "ati"
VendorName "ATI"
BoardName "Radeon QD"
BusID "PCI:0:11:0"
EndSection



Notice the entry for BusID for the graphics device. This entry is especially important if the two video cards you use are the same type.

Next, you'll need to make screens for each of your cards. You need to give each screen a unique identifier for use later:

Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubSection
EndSection




I only use 24 bit color depth and 1024x768 resolution, but if you use other resolutions/depths, you can add them in as well.
Now, all you need is to tell X how you want the monitors situated. This is done in the ServerLayout section:

Section "ServerLayout"
Identifier "Layout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection



X allows you to specify how the screens are layed out. Notice I have two entries for Screen. The first one specifies which screen will be the primary display, or :0.0 . The Second entry tells where the other screen will be. You can tell it relatively, using RightOf, LeftOf, Above, or Below, or you can use absolute resolutions. The HOWTO I mentioned above has some good examples on using absolute resolutions.

Note that I'm only covering the video hardware; you still have to configure the keyboard, mouse, font paths, etc. I used an already working XF86Config file and kept all of that information, only adding my cards' configs.

Certain Windowmanagers allow you to run multiple desktops on multiple displays, i.e., Each screen acts like an independant desktop. I had varied experiences using this, but this is the default behaviour when not using xinerama.

Xinerama allows X to use two displays as one desktop. This desktop is usually the combined size of the two screens, unless you use the above mentioned absolute resolutions and make the screens overlap or something.

In order to use Xinerama, you must enable it when starting X. You can just do it from a command line using:
startx -- +xinerama

But if you always want it to start that way, you can edit the /usr/X11R6/bin/startx script. In Slackware 8, and I assume it's similar in other distros, the startx script is fairly detailed. It allows you to input server options in a variable, which will be passed to xinit as options.

In /usr/X11R6/bin/startx, find the line that says:
serverargs=""

and change it to
serverargs="+xinerama"

Now, X will start by default with xinerama enabled.

If all goes well, you should have a multiheaded display with a desktop spread across two screens.

I don't know if anything needs to be edited to work with xdm/kdm/gdm login screens, but if I find anything out, I will be sure to add it into either this thread or the article for the Grasshopper Journal I plan to write.

I hope somebody benefits from this! Dual monitors ownz j00!

:D

mdwatts
05-20-2002, 01:45 AM
That was quick Alex.

I shall print it out and keep for future use.

Thanks

Alex Cavnar, aka alc6379
05-20-2002, 10:03 PM
I hope you can use it, WattsMD. Or anybody else that might have thought of running dual monitors.

If anybody has anything to add to this, please do, and I'll be sure to include it (along with a nod to you) in the GHJ article I'm going to write!

evulish
05-20-2002, 10:29 PM
How much does a standard PCI video card run ya? I've got a piddly 15" monitor collecting dust in my garage that would be great to use for a second desktop.

Have any PCI cards to recommend?

Alex Cavnar, aka alc6379
05-20-2002, 10:48 PM
The second one I used was an S3 Savage4 16MB AGP. It ran me $27.50US, tax included, used.

I remember seeing on ebay some Matrox cards for 5 bucks or something, but they were 8MB, and I'm not sure to the extent of their quality.

If you could find an S3, they've been good. ATI Mach64 (Rage Pro) are decent cards, too, but I don't think you could get higher than 800x600 on it.

Basically, if you can find an S3, NVidia, or an ATI with about 16MB RAM, you should be good to go.

jesperht
06-19-2002, 03:56 AM
Thanks for the great tutorial... (one thing worth mentioning though...not all pci cards are on '0:x:0'...mine was on 2:x:0)...

One problem though....Once I got it running I get a bunch of funky red dots on my new desktop extension... (other monitor). Any idea why? (just small ones)

edit: Also, when i try to play a movie (xine), then it goes black on the extension....very annoying.
THANKS!

[ 19 June 2002: Message edited by: jesperht ]

mdwatts
06-19-2002, 08:48 AM
Originally posted by jesperht:
<STRONG>Thanks for the great tutorial... (one thing worth mentioning though...not all pci cards are on '0:x:0'...mine was on 2:x:0)...

One problem though....Once I got it running I get a bunch of funky red dots on my new desktop extension... (other monitor). Any idea why? (just small ones)

edit: Also, when i try to play a movie (xine), then it goes black on the extension....very annoying.
THANKS!

[ 19 June 2002: Message edited by: jesperht ]</STRONG>

You may want to post this question in another forum such as Technical or Window/Desktop Managers since this is the 'How I did it' forum and really not meant for questions.

Just a suggestion so you get more exposure for your question.

jesperht
06-21-2002, 08:09 PM
Originally posted by The original mdwatts:
<STRONG>You may want to post this question in another forum such as Technical or Window/Desktop Managers since this is the 'How I did it' forum and really not meant for questions.

Just a suggestion so you get more exposure for your question.</STRONG>


Hehe, thanks for the advice...turns out that the card was just sitting loose (weird...)...Anyways, the only problem I seem to be having now is some strange audio feedback (bleeping) on the pci cards desktop....Im thinking its some interferance from the sound card or something....

:D :D :D :D

Disc0stoo
06-30-2002, 11:14 PM
This is awesome, I've been meaning to try this...

Alex Cavnar, aka alc6379
07-02-2002, 02:11 AM
You think two monitors are cool? I just got word that at a recent local LUG meeting, they pulled out everything but the video cards, and managed to get 5 MONITORS RUNNING!!!

The guy that did it still has it running-- he set up some cool wire racks to hold it all, too-- I just wish I had pictures...

Bobo the Red
08-04-2002, 10:53 AM
an article in pc magazine talked about a fella who was using 5 monitors in a custom built box ... i think it was about two or three issues back. Gave a pretty good how-to on how he did it. If i find it again ... I'll post it.

Vectorman
08-08-2002, 11:42 PM
I have had Dual Monitors on my machine since I First installed Linux.

I made sure that I had Both video Cards in the Machine when I Installed the OS and choose XIMERA Extensions. It's totally Kewl. :D There are two things I don't like. One is that When using KDE and you Maximize the window it spanns the window to the width of the Two Monitors.. Gnome doesn't do that. Two, When logging on to X all Splash screens come up right in the Middle of the Two Monitors. As well as all the Password Prompts.

Maybe someone can tell me how to get all dialog boxes to come up on the PRIMARY monitor instead of in between the two.

AMD 1.0GHZ
256MB RAM
10GB HDD
USB Cd/RW
Built-in 32 MB Trident video Card
32MB Nvidia PCI card.
Running Mandrake 8.2

Now is I can only get XIMIAN running on this Thing I'ld be Set.

rpcyan
08-10-2002, 10:19 PM
Now if anybody could tell me how to setup my Radeon 7500 card (2 ports, one VGA, one DVI) to dual monitor in Linux. Works great in XP, but then again, nothing else does. :-) That's why I use linux. But then my poor second monitor just sits there...

MartinB
08-10-2002, 10:36 PM
I've had this set up in Mandrake 8.2 when I had it and it's pretty cool, but I ended up disabling it for a few reasons:

- No 3D Acceleration is supported while Xinerama extensions are being used.

- As someone already mentioned, message boxes, password prompts and other things appeared half 'n' half on each monitor

- My old monitor only supports up to 1024 x 768 and, being a newbie, I couldn't work out how to set seperate resolutions for each monitor.

If I could get these things working correctly, I'd love to use dual monitor capability.

godot
08-15-2002, 07:14 PM
I got xinerama to work with my Radeon 8500, here's my config file. It works pretty well although I just changed some setting I can't remember and it locks up my computer. Oh well. I'll fix it eventually. This should work (just change the PCI Bus and monitor refresh rates.

Section "Files"
FontPath "unix/:7100"
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection

Section "Module"
# Load "GLcore"
Load "bitmap"
Load "dbe"
Load "ddc"
# Load "dri"
Load "extmod"
Load "freetype"
# Load "glx"
Load "int10"
# Load "pex5"
Load "record"
Load "speedo"
Load "type1"
# Load "vbe"
# Load "xie"
EndSection


Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/psaux"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
Option "Resolution" "500"
EndSection

Section "Device"
Identifier "Ati1"
Driver "radeon"
Option "crt_screen"
BusID "PCI:2:0:0"
Screen 1
EndSection

Section "Device"
Identifier "Ati2"
Driver "radeon"
Option "crt_screen"
BusID "PCI:2:0:0"
EndSection

Section "Monitor"
Identifier "A90f"
HorizSync 30-100
VertRefresh 50-160
Option "DPMS"
EndSection

Section "Monitor"
Identifier "G790"
HorizSync 30-86
# VertRefresh 50-150
VertRefresh 60
Option "DPMS"
EndSection

Section "Screen"
Identifier "Screen1"
Device "Ati1"
Monitor "A90f"
DefaultDepth 24
DefaultFbBPP 32
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen2"
Device "Ati2"
Monitor "G790"
DefaultDepth 24
DefaultFbBPP 32
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Desktop"
# Screen "Screen2" RightOf "Screen1"
Screen "Screen1" 0 0
Screen "Screen2" LeftOf "Screen1"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
Option "Xinerama"
EndSection

Section "DRI"
Mode 0666
EndSection

Alex Cavnar, aka alc6379
08-19-2002, 10:17 AM
Section "Device"
Identifier "Ati1"
Driver "radeon"
Option "crt_screen"
BusID "PCI:2:0:0"
Screen 1
EndSection

Section "Device"
Identifier "Ati2"
Driver "radeon"
Option "crt_screen"
BusID "PCI:2:0:0"
EndSection


So you add two device entries for the same card on a Radeon? I've never thought about that...

What exactly does the "crt_screen" option do? Is that what X uses to tell which SVGA connector on the back to use?

godot
08-19-2002, 03:56 PM
The 8500 has one DVI connector and one CRT connector. I am of course using a DVI to CRT adapter to go to a CRT monitor so my guess is it tells it how to use the connection.

Also: I seem to only be able to get the DVI connection as screen 1 and the CRT as screen 2, I haven't been able to change it. Kind of strange.

Alex Cavnar, aka alc6379
04-11-2003, 10:02 PM
There's somebody in this forum who could use this...

Alex Cavnar, aka alc6379
05-21-2003, 10:56 PM
I just found a README that tells you exactly how to set up Twinview for an NVIDIA card after you've gotten it running:

Twinview README (http://lists.suse.com/archive/suse-linux-e/2001-Jun/att-0072/01-TWINVIEW_README)

It appears that this file is included with the RPM that the NVIDIA driver is packaged in, too.