X.Org/Dual Monitors/ATI
From Gentoo Linux Wiki
[edit] With the Open Source Drivers
MergedFB, Pseudo Xinerama:
You can use multiple monitors without the proprietary drivers, by enabling MergedFB dualhead. The xorg driver is capable of running 3D accelleration on both of the monitors at the same time.
For this you will need support for Direct Rendering Manager in your kernel. Go to your kernel source directory and configure it:
| Linux Kernel Configuration: Open source radeon kernel config |
Device Drivers --->
Graphics support --->
<M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<M> ATI Radeon
|
then run
to load newly compiled modules run
it will load the driver for your graphics card and the drm module.
Module Size Used by radeon 110880 2 drm 58132 3 radeon
Generally you will want to edit file /etc/modules.autoload.d/kernel-2.6
Now you have to edit your xorg.conf
Section "Device"
Identifier "Card0"
Driver "radeon"
VendorName "ATI Technologies Inc"
BoardName "RV380 0x3e50 [Radeon X600]"
BusID "PCI:1:0:0" #!!!Edit this
Option "DynamicClocks" "on" # optional
Option "MergedFB" "true"
Option "CRT2Position" "LeftOf"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
Virtual 2560 1024 #The first value is the summ of horizontal resolutions your displays use
EndSubSection
EndSectionYou dont even have to modify your ServerLayout section of xorg.conf
A working xorg.conf example with use of mergedFB can be found here: http://mg.pov.lt/xorg.conf
Original Xinerama:
You can use multiple monitors without the proprietary drivers, by enabling xinerama, but you lose 3D acceleration by doing it this way. Don't forget to run:Section "ServerFlags"
Option "Xinerama" "On"
EndSection
Section "Module"
Load "dbe" # Double-Buffering Extension
Load "v4l" # Video for Linux
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
Load "dri"
EndSection
...
Section "Device"
Identifier "device0"
VendorName "ATI"
BoardName "ATI Radeon"
Driver "radeon"
BusID "PCI:1:0:0"
Screen 0
EndSection
Section "Device"
Identifier "device1"
BoardName "ATI Radeon"
Driver "radeon"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Monitor"
Identifier "monitor0"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "monitor1"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen0"
Device "device0"
Monitor "monitor0"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024"
EndSubsection
EndSection
Section "Screen"
Identifier "Screen1"
Device "device1"
Monitor "monitor1"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Multihead layout"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Screen "Screen0" 0 0
Screen "Screen1" RightOf "Screen0"
EndSection[edit] With the proprietary binary driver
As of the 8.19.10 ati-drivers release, Xinerama is natively supported inside the official ati-drivers themselves. Here are some tips for getting ATI "Big Desktop", the ATI Xinerama extension, and hardware DRI all working together. This configuration allows auto-detection of the presence of the secondary display.
Newer ati-drivers come with a handy aticonfig script that actually produces a working dual-head setup. This is the quick-and-easy way. Log out of X, backup your xorg.conf and run something akin to the following line:
On one setup (amd64), KDE would instantly work with a streched desktop, when the monitors were the same size. On another setup (x86), KDE would only use one screen, when the monitors were of different size. Both systems did NOT use the xinerama flag. On this second system, all other tried window managers (Gnome and Fluxbox) would operate with no problems on both screens. In one occasion with a setup using gnome and monitors of different size, the bigger monitor was not completely filled.
If you would like to avoid butchering your xorg.conf file with aticonfig, here are the sections that will need to be added/modified. Note this example will setup a cloned screen for use with a laptop. To stretch across 2 monitors try Option "DesktopSetup" "horizontal". Also if you have more than one video card the BusID will probably need to be added somewhere.
Section "Monitor"
Identifier "Monitor1"
VendorName "Generic"
ModelName "Flat Panel"
#HorizSync 31.5 - 90.0
#VertRefresh 75
#DisplaySize 314 234
#DisplaySize 285 214
DisplaySize 339 271
EndSection
Section "Monitor"
Identifier "Monitor2"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
Identifier "ATI Graphics Adapter1"
Driver "fglrx"
BoardName "ATI Radeon Mobility x300"
Option "no_accel" "no"
Option "no_dri" "no"
Option "mtrr" "no" # disable DRI mtrr mapper, driver has its own code for mtrr
Option "MonitorLayout" "LVDS, AUTO" #"LVDS, NONE" #"AUTO, NONE"
Option "IgnoreEDID" "off"
Option "HSync2" "unspecified" #"31.5 - 90.0"
Option "VRefresh2" "unspecified" #"75"
Option "ScreenOverlap" "0"
Option "NoTV" "yes"
Option "TVStandard" "NTSC-M"
Option "TVHSizeAdj" "0"
Option "TVVSizeAdj" "0"
Option "TVHPosAdj" "0"
Option "TVVPosAdj" "0"
Option "TVHStartAdj" "0"
Option "TVColorAdj" "0"
Option "GammaCorrectionI" "0x00000000"
Option "GammaCorrectionII" "0x00000000"
Option "Capabilities" "0x00000000"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "CenterMode" "off"
Option "PseudoColorVisuals" "off"
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
Option "FSAAEnable" "no"
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
Option "UseFastTLS" "0"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "yes"
Option "ForceGenericCPU" "no"
Option "DesktopSetup" "clone" #or horizontal to stretch
BusID "PCI:1:0:0" # vendor=1002, device=5460
EndSection
Section "Device"
Identifier "ATI Graphics Adapter2"
Driver "fglrx"
BusID "PCI:1:0:0"
Screen 1
EndSection
Section "Screen"
Identifier "Screen1"
#Device "ATI OSS"
Device "ATI Graphics Adapter1"
Monitor "Monitor1"
DefaultDepth 24
Subsection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "Screen2"
Device "ATI Graphics Adapter2"
Monitor "Monitor2"
DefaultDepth 24
SubSection "Display"
Depth 24
Viewport 0 0
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen1" 0 0
#InputDevice "Mouse1" "CorePointer"
InputDevice "Touchpad1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "DRI"
Mode 0666
EndSection[edit] Troubleshooting fglrx setup
If the aticonfig method does not work, you need to tweak xorg.conf a bit.
- Make sure your apps are compiled with Xinerama support - ( equery hasuse xinerama )
- Make sure Xinerama is NOT loaded as a module in xorg.conf. The Ati-drivers will take care of this automatically.
- Inside the ATI Device section of xorg.conf, check these settings
- Option "MonitorLayout" "LVDS,AUTO" - This is for a laptop, it sets the first display to be in the internal LCD (LVDS), and to auto-detect the second display.
- Option "HSync2" "65" - This sets the horizontal sync for the secondary display.
- Option "VRefresh2" "60" - This sets the refresh rate of the secondary display.
- Option "Mode2" "1280x1024" - This sets the resolution of the secondary display, by default it'll try to use the identical resolutions on both displays.
- Option "EnablePrivateBackZ" "yes" - Might help get DRI and Big Desktop to work together.
- Option "UseInternalAGPGART" "no" - If using the kernel AGP modules, disable the ATI AGP support.
The known options for use within the ATI Device section of xorg.conf are documented here:
This is a community generated man page created from public records, and is also available here via CVS.
- In dual head mode, you can't move windows between the two screens, as there's no xinerama
- In big desktop mode (with a single frame buffer), the two screens will be put into the same resolution, or as close to it as the driver can manage (eg 1440x900 and 1156x864)
- In the 8.28.8 driver, you can use PairMode (Option "PairMode" "WxH+WxH") instead of Mode2 to request a different resolution for the second screen
- It will still come up in whatever mode it fancies, but you can use xrandr to switch
- You can only have one pairmode for now
- You will need to use a Virtual line in your screen if the second screen is larger in any dimension than the first
Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
Option "DesktopSetup" "horizontal"
Option "PairModes" "1440x900+1280x1024"
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
#This virtual is for 2 monitors, a 1440x900 next
# to a 1280x1024
Virtual 1440 1024
Depth 24
EndSubSection
EndSection