-
Taming the Two Headed Beast: Dual Monitors in X 4.x
Props to WattsMD and Dual Monitor HOWTO 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 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:
Code:
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:
Code:
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:
Code:
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:
Code:
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:
and change it to
Code:
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!
Registered Linux user #230403! Since March 2001! YAY.
Try doing a forum search or a google search before asking a question. And please don't use HELP! in the topic of your post... it's so lame... Please don't PM me for help-- post a question in the forum instead.
-
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.
-
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
Marge: Well I think we should spend the money on something the whole town can be proud of.
Homer: Like a giant billboard that says "No Fat Chicks"?
The Simpsons - 9F10 - S04E12
Marge vs. the Monorail
-
Interesting...
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?
Registered Linux user #230403! Since March 2001! YAY.
Try doing a forum search or a google search before asking a question. And please don't use HELP! in the topic of your post... it's so lame... Please don't PM me for help-- post a question in the forum instead.
-
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.
Marge: Well I think we should spend the money on something the whole town can be proud of.
Homer: Like a giant billboard that says "No Fat Chicks"?
The Simpsons - 9F10 - S04E12
Marge vs. the Monorail
-
Addendum
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
It appears that this file is included with the RPM that the NVIDIA driver is packaged in, too.
Registered Linux user #230403! Since March 2001! YAY.
Try doing a forum search or a google search before asking a question. And please don't use HELP! in the topic of your post... it's so lame... Please don't PM me for help-- post a question in the forum instead.
-
< search keywords >
Twinview
Multihead Multi Head
Dual
Xinerama
Registered Linux user #230403! Since March 2001! YAY.
Try doing a forum search or a google search before asking a question. And please don't use HELP! in the topic of your post... it's so lame... Please don't PM me for help-- post a question in the forum instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|