
LINUX uses XFree for the grafic display. You might have seen the file /etc/X11/XF86Config That's the file you need to edit to use multiple screens under LINUX.
Beware: Newer versions of XFree may use a configuration file called XF86Config-4 and the auto-configuration tools for these newer versions of XFree silently remove any existing versions of XF86Config . Make a backup copy of any existing XF86Config-4 file by renaming it -- we'll use the old format here, because the newer versions of XFree still understand the old-style configuration files.
which version are you running? Run xdpyinfo in a window. On the top it says what the XFree-version is and it also shows you the resolution and pixel depth of each display.
It's not working.. where can I see the errors?
The file /var/log/XFree86.0.log is created / overwritten every time X gets restarted. Check this file whenever X crashes, or doesn't start up the way you want it to. Make sure you read the top portion of the file, where it explains what (--),(**),(==),(++),(!!),(II),(WW),(EE),.. mean.
Here's an example of a XFree86.0.log file that I get when the server starts up correctly. Not sure if this is of help for anybody, but i'll include it anyhow as a reference.
Starting X / Stopping X
You can start X either by going to runlevel 5 (e.g. telinit 5 or setting runlevel 5 as the default runlevel in /etc/inittab) or for debugging purposes it's usually smarter to set the default runlevel to 3 (in /etc/inittab) and then to manually start X by hand as root (via startx).
You can always exit the X server by Ctrl-Alt-F1 and then typing Ctrl-C. Or by hitting Ctrl-Alt-Backspace. CAREFUL NOW! you will loose your X-session with all your windows!!
Check out your /var/log/XFree86.0.log file and get familiar with it's format.
These sections are mostly independent of each other.. e.g. the monitors are defined in one section, the grafics cards are defined in the "Device" sections. And the "Screen" sections define which monitor is connected to which grafics card, and what resolution is supposed to be used. There is also a section called "ServerLayout" which is interesting if you have more than one monitor.. it defines how the Screens are set up on your desk - e.g. which monitor is left, which one is right..
Last not least: each section in the XF86Config file contains an Identifier, which is nothing more than a free-form text string, which you can use to name your hardware. You can use pretty much any name you want. Just make sure that you use exactly the same string whereever you refer to a section.
Please do read the manual! man XF86Config !
e.g. I have two IBM P260 monitors and a Samsung SyncMaster 213T LCD display:
Section "Monitor" Identifier "Monitor Center" VendorName "IBM" ModelName "P260" HorizSync 30.0 - 121.0 VertRefresh 50.0 - 160.0 Option "dpms" EndSection Section "Monitor" Identifier "Monitor Right" VendorName "IBM" ModelName "P260" HorizSync 30.0 - 121.0 VertRefresh 50.0 - 160.0 Option "dpms" EndSectionThe Samsung Syncmaster 213T LCD display is tricky to set up (to say the least!). It has a very low maximum refresh rate of 60Hz and usually the built-in modes are "too fast" for it -- it can not sync them!
Samsung should really rename it to NoSync-Master 213T!!
Don't get confused with the modelines.. that part of the configuration is optional. We're manually defining a mode here and just use the one called "1600x1200@74".
Section "Monitor"
Identifier "Monitor Left"
VendorName "Samsung"
ModelName "213T"
# Max Pixel Clock Rate 162 MHz
# For Analog Side ONLY:
VertRefresh 56.0 - 75.0
HorizSync 30.0 - 81.0
# For Digital Side ONLY:
# VertRefresh 56.0 - 60.0
# HorizSync 30.0 - 75.0
Option "dpms"
# -- 1600x1200 Modelines : --
# 51 Hz
ModeLine "1600x1200" 137.61 1600 1672 2032 2176 1200 1202 1214 1240
# 1600x1200 @ 60Hz, 75.00 kHz hsync
Modeline "1600x1200" 162 1600 1664 1856 2160 1200 1201 1204 1250 +HSync +VSync
Modeline "1600x1200" 59.90 1600 1616 1968 2080 1200 1200 1204 1253
# we will be using the next modeline only:
Modeline "1600x1200@74" 130.4 1600 1648 1680 1760 1200 1202 1206 1235
# Modeline "1600x1200@74" 140 1600 1648 1700 1800 1200 1201 1204 1235
EndSection
Note: make sure each of your graphics-heads has enough memory for the screen resolution and color-depth you want to use!
24bit color depth means 3 bytes per color-channel. There are three channels: Red Green Blue.. So for each screen pixel you need 9 bytes memory at 24bit color depth.
For grafics cards with multiple heads, you might have to check the file /proc/pci and get the exact bus address for each grafics card. The lines "Screen 0" vs. "Screen 1" then define which physical connector on the card that device section is referencing.
e.g. I have an AGP card with one head, and a PCI card with two heads:
Section "Device" Identifier "AGP Card" Driver "savage" BoardName "Unknown" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "ATI Card Head1" Driver "radeon" BoardName "unknown" BusID "PCI:0:12:0" Screen 0 Option "SWcursor" "true" Option "BusType" "PCI" Option "DDCMode" "off" Option "IgnoreEDID" "true" Option "MonitorLayout" "TMDS,CRT" Option "OverlayOnCRTC2" "off" EndSection Section "Device" Identifier "ATI Card Head2" Driver "radeon" BoardName "unknown" BusID "PCI:0:12:0" Screen 1 Option "SWcursor" "true" Option "BusType" "PCI" Option "DDCMode" "off" Option "IgnoreEDID" "true" Option "OverlayOnCRTC2" "off" Option "NoTV" "yes" EndSection
With CRT monitors, XFree is very smart of figuring out which is the best (fastest) Mode for a given resolution to be compatible with your monitor. With LCD monitors it's a bit more difficult. You might have to force XFree to use the one mode you want. I did that by defining a mode that has a different name compared to all the predefined modes.. i defined "1600x1200@74" using a modeline in the Monitor section (above). e.g.:
Section "Screen"
Identifier "Screen1"
Device "ATI Card Head1"
Monitor "Monitor Left"
DefaultDepth 24
SubSection "Display"
Depth 24
# only the first entry is used - the other ones were for debugging and didn't work for me.
Modes "1600x1200@74" "1600x1200" "1280x1024"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen0"
Device "AGP Card"
Monitor "Monitor Center"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen2"
Device "ATI Card Head2"
Monitor "Monitor Right"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection
This little section does exactly that:
Section "ServerLayout" Identifier "XFree86 Configured" Screen 0 "Screen0" 0 0 Screen 1 "Screen1" LeftOf "Screen0" Screen 2 "Screen2" RightOf "Screen0" InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSectionIn my setup the LCD is on the left called Screen1 (DISPLAY variable: localhost:0.1) ,
The initial X login-screen will always go to localhost:0.0, that's why that one is in the middle for my setup.
I don't want to play with my desktop, I want to work with it ;-)
|
Maintainer: Tilo Sloboda linux AT unixgods.org last update: $Revision: 1.4 $ / $Date: 2003/08/25 08:40:49 $ |
|