XineramaHowTo

Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2005-05-28 20:24:35
Size: 7251
Editor: adsl-213-190-44-43
Comment: imported from the old wiki
Revision 5 as of 2006-06-04 20:37:00
Size: 5575
Editor: c-67-183-154-231
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= XineramaHowTo = = Xinerama (multiple monitors) =
Line 3: Line 3:
= Overview = || This is a nascent wiki entry, that will be updated & refactored as more information becomes available. ||
For now see the following forum threads / pages :
 * http://ubuntuforums.org/showthread.php?t=6172
 * http://ubuntuforums.org/showthread.php?t=3329
 * XineramaHowTo is a slightly older howto page that may be useful, especially for users wishing to use Xinerama without nVidia cards (Matrox for example)
Line 5: Line 9:
This how to covers the use of Xinerama to control a dual head monitor setup in XFree86 / X.org for Warty. It is intended as a quick howto, including a working /etc/X11/XF86Config-4 file. An in depth discussion of Xinerama can be found at [http://linuxreviews.org/howtos/xfree/Xinerama-HOWTO/]. It is advisable to install the graphics card's binary driver before configuring dual monitors. See BinaryDriverHowto.
Line 7: Line 11:
= Warning = == Nvidia ==
Quick and dirty guide to using '''nVidia TwinView''' (two outputs on one card, a single desktop split across two monitors. 3d/video stuff works seamlessly across both).
Line 9: Line 14:
Make sure you replace setting such as screen refresh and resolution with values approprate for your system. Failure to do so may result in nasty consqeuences. Ok, the first thing to check is how many outputs your card has. Most of them tend to have a 15pin VGA output (the one your monitor is probably on) and a larger white DVI onnector. The ones with this DVI connector usually come with an adapter that converts it to a 15pin VGA socket - if you have this then you are ready for dualhead :)
 
Once you have two monitors hooked up, the magic all happens in the X config file (which will be /etc/X11/Xorg.conf or /etc/X11/XF86Config-4 depending on which version you are unning). It is all contained in the Device section.
Line 11: Line 18:
== Background ==
This assumes that you have the hardware correctly setup. Installation of binary drivers is covered in [BinaryDriverHowto], but these are not required for Xinerama to work. This howto is geared towards those with a Matrox G450 or similar AGP video card, but could be useful for anyone trying to get a dual head setup working in Ubuntu.
Here is mine:
{{{
 Section "Device"
         Identifier "Videocard0"
         Driver "nvidia"
         VendorName "Videocard vendor"
         BoardName "NVIDIA GeForce FX5900XT"
         Option "TwinView" "true"
         Option "RenderAccel" "true"
         Option "UseEdidFreqs" "true"
         Option "MetaModes" "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,NULL;800x600,800x600;640x480,640x480"
         Option "SecondMonitorHorizSync" "30-110"
         Option "SecondMonitorVertRefresh" "50-160"
 EndSection
}}}
The most important is the "TwinView" one, which enables the dualhead support. "UseEdidFreqs" means to probe the monitors for the resolutions they support (more on that in a moment). The "MetaModes" is where the configuration really lies - this tells the driver how you want the displays configured. The first entry will be the default and each entry is separated by a semicolon (";"). The first entry in mine therefore is "1600x1200,1600x1200" which means that both monitors should be in a 1600x1200 screenmode, making the total X display 3200x1200. Same principle for 1280x1024,1280x1024. The next one is slightly different, "1024x768,NULL" means that the second monitor will display nothing, so this mode is a true 1024x768 mode on the first monitor only (I use this one for playing games so they don't cross the monitor boundary). Beyond that, the "SecondMonitor" options are because my second monitor doesn't support EDID frequency lookups, so I have to tell the driver its refresh rates.
 
The only other thing you need to change then is to tell X's "Screen" section about these sizes.
Line 14: Line 37:
The default behaviour for Ubuntu Warty is to clone the display from one monitor to the other, which isn't very useful. Instead, we wish to have both monitors being used for a single virtual desktop. This is useful for those wishing to have a window extend across two monitors, such as a large image. Here is mine:
{{{
 Section "Screen"
         Identifier "Screen0"
         Device "Videocard0"
         Monitor "Monitor0"
         DefaultDepth 24
         SubSection "Display"
           Viewport 0 0
           Depth 24
           Modes "3200x1200" "2560x1024" "1024x768" "1600x600" "1280x480"
         EndSubSection
 EndSection
}}}
The "Modes" line being the important one here, you can see that it tells X the sizes the displays will be once the nvidia driver has set the monitors up with the metamodes above.
 
That should pretty much be it, just check you're not loading the Xinerama module in the config file, nvidia's driver provides its own xinerama extension. I strongly recommend reading the README included with nvidia's driver (also available in the Linux driver section on www.nvidia.com) as it contains a lot more information about twinview that might be relevant to your situation.
Line 16: Line 55:
== Necessary Modifications == == ATI ==
Line 18: Line 57:
I have used the original XF86Config-4 that Ubuntu created as a starting point, modifying it to use Xinerama.

 *I have added another "Device" section, which is almost identical to the first one. The identifier for the first device is "Matrox1" on screen 1, and the second "Matrox2" on screen 2.

 *I have added another "Monitor" section, which is almost identical to the first one except for the identifier. If you're using different monitors, you'll want to change these settings appropriately.

 *I have two "Screen" sections, copied from the original Screen section. The first one is uses the "Device" and "Monitor" identifiers for the first monitor, while the second "Screen" section uses the "Device" and "Monitor" identifiers for the second monitor. Since these two monitors have the same hardware, I'm using the same settings.

 *The "ServerFlags" section is needed to set the Xinerama option to true.

 *The "ServerLayout" section defines how the virtual desktop is laid out. In this example, the second screen is to the right of the first (primary desktop).

Here's the XF86Config-4 that works on my Matrox G450 setup.
For users with an ati radeon card i found a xorg.conf which worked for me:
Line 33: Line 59:
# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
# cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
# md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
# dpkg-reconfigure xserver-xfree86

Section "Files"
 FontPath "unix/:7100" # local font server
 # if the local font server has problems, we can fall back on these
 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/CID"
 FontPath "/usr/lib/X11/fonts/Speedo"
 FontPath "/usr/lib/X11/fonts/100dpi"
 FontPath "/usr/lib/X11/fonts/75dpi"
        # paths to defoma fonts
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
Section "Monitor"
        Identifier "Fujitsu0"
        Option "DPMS"
Line 68: Line 63:

Section "Module"
 Load "GLcore"
 Load "bitmap"
 Load "dbe"
 Load "ddc"
 Load "dri"
 Load "extmod"
 Load "freetype"
 Load "glx"
 Load "int10"
 Load "record"
 Load "speedo"
 Load "type1"
 Load "v4l"
 Load "vbe"
 Load "xtt"
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/input/mice"
 Option "Protocol" "ImPS/2"
 Option "Emulate3Buttons" "true"
 Option "ZAxisMapping" "4 5"
Section "Monitor"
        Identifier "Fujitsu1"
        Option "DPMS"
Line 107: Line 69:
 Identifier "Matrox1"
 Driver "mga"
 BusID "PCI:1:0:0"
 Screen 0
        Identifier      "ati0"
        Driver         "radeon"
        BusID          "PCI:1:0:0"
        Screen         0
Line 114: Line 76:
 Identifier "Matrox2"
 Driver "mga"
 BusID "PCI:1:0:0"
 Screen 1
EndSection

Section "Monitor"
 Identifier "DELL P991 1"
 HorizSync 30-107
 VertRefresh 48-120
 Option "DPMS"
EndSection

Section "Monitor"
 Identifier "DELL P991 2"
 HorizSync 30-107
 VertRefresh 48-120
 Option "DPMS"
        Identifier "ati1"
        Driver "radeon"
        BusID "PCI:1:0:0"
        Screen 1
Line 135: Line 83:
 Identifier "Default Screen"
 Device "Matrox1"
 Monitor "DELL P991 1"
 DefaultDepth 24
 SubSection "Display"
  Depth 1
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 4
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 8
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 15
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 16
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 24
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
        Identifier "screen0"
        Device "ati0"
        Monitor "Fujitsu0"
        DefaultDepth 24
        SubSection "Display"
                Depth 24
                Modes "1280x1024"
        EndSubSection
Line 166: Line 94:
 Identifier "Second Screen"
 Device "Matrox2"
 Monitor "DELL P991 2"
 DefaultDepth 24
 SubSection "Display"
  Depth 1
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 4
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 8
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 15
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 16
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
 SubSection "Display"
  Depth 24
  Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
 EndSubSection
        Identifier "screen1"
        Device "ati1"
        Monitor "Fujitsu1"
        DefaultDepth 24
        SubSection "Display"
                Depth 24
                Modes "1280x1024"
        EndSubSection
Line 195: Line 103:

Section "ServerFlags"
 Option "Xinerama" "True"
EndSection
Line 201: Line 104:
 Identifier "Default Layout"
 Screen 0 "Default Screen"
 Screen 1 "Second Screen" RightOf "Default Screen"
 InputDevice "Generic Keyboard"
 InputDevice "Configured Mouse"
EndSection

Section "DRI"
 Mode 0666
        Identifier "Multihead"
        Screen "screen0"
        Screen "screen1" RightOf "screen0"
        InputDevice "mouse1" "CorePointer"
        InputDevice "keyboard1" "CoreKeyboard"
        Option "Xinerama"
Line 212: Line 112:
found at: http://forums.gentoo.org/viewtopic-t-105588-highlight-ati+radeon+mobility+7500.html
Line 213: Line 114:
= Screenshot =

Here is a large screenshot of a desktop displayed across two monitors using Xinerama. It has been downsampled from 3200x1200.
attachment:http://www.ubuntulinux.org/wiki/xinerama.png
----
CategoryDocumentation CategoryCleanup

Xinerama (multiple monitors)

This is a nascent wiki entry, that will be updated & refactored as more information becomes available.

For now see the following forum threads / pages :

It is advisable to install the graphics card's binary driver before configuring dual monitors. See BinaryDriverHowto.

Nvidia

Quick and dirty guide to using nVidia TwinView (two outputs on one card, a single desktop split across two monitors. 3d/video stuff works seamlessly across both).

Ok, the first thing to check is how many outputs your card has. Most of them tend to have a 15pin VGA output (the one your monitor is probably on) and a larger white DVI onnector. The ones with this DVI connector usually come with an adapter that converts it to a 15pin VGA socket - if you have this then you are ready for dualhead Smile :)

Once you have two monitors hooked up, the magic all happens in the X config file (which will be /etc/X11/Xorg.conf or /etc/X11/XF86Config-4 depending on which version you are unning). It is all contained in the Device section.

Here is mine:

 Section "Device"
         Identifier  "Videocard0"
         Driver      "nvidia"
         VendorName  "Videocard vendor"
         BoardName   "NVIDIA GeForce FX5900XT"
         Option      "TwinView"                 "true"
         Option      "RenderAccel"              "true"
         Option      "UseEdidFreqs"             "true"
         Option      "MetaModes"                "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,NULL;800x600,800x600;640x480,640x480"
         Option      "SecondMonitorHorizSync"   "30-110"
         Option      "SecondMonitorVertRefresh" "50-160"
 EndSection

The most important is the "TwinView" one, which enables the dualhead support. "UseEdidFreqs" means to probe the monitors for the resolutions they support (more on that in a moment). The "MetaModes" is where the configuration really lies - this tells the driver how you want the displays configured. The first entry will be the default and each entry is separated by a semicolon (";"). The first entry in mine therefore is "1600x1200,1600x1200" which means that both monitors should be in a 1600x1200 screenmode, making the total X display 3200x1200. Same principle for 1280x1024,1280x1024. The next one is slightly different, "1024x768,NULL" means that the second monitor will display nothing, so this mode is a true 1024x768 mode on the first monitor only (I use this one for playing games so they don't cross the monitor boundary). Beyond that, the "SecondMonitor" options are because my second monitor doesn't support EDID frequency lookups, so I have to tell the driver its refresh rates.

The only other thing you need to change then is to tell X's "Screen" section about these sizes.

Here is mine:

 Section "Screen"
         Identifier   "Screen0"
         Device       "Videocard0"
         Monitor      "Monitor0"
         DefaultDepth 24
         SubSection "Display"
           Viewport   0 0
           Depth      24
           Modes      "3200x1200" "2560x1024" "1024x768" "1600x600" "1280x480"
         EndSubSection
 EndSection

The "Modes" line being the important one here, you can see that it tells X the sizes the displays will be once the nvidia driver has set the monitors up with the metamodes above.

That should pretty much be it, just check you're not loading the Xinerama module in the config file, nvidia's driver provides its own xinerama extension. I strongly recommend reading the README included with nvidia's driver (also available in the Linux driver section on www.nvidia.com) as it contains a lot more information about twinview that might be relevant to your situation.

ATI

For users with an ati radeon card i found a xorg.conf which worked for me:

Section "Monitor"
        Identifier "Fujitsu0"
        Option  "DPMS"
EndSection
Section "Monitor"
        Identifier "Fujitsu1"
        Option  "DPMS"
EndSection

Section "Device"
        Identifier      "ati0"
        Driver          "radeon"
        BusID           "PCI:1:0:0"
        Screen          0
EndSection

Section "Device"
        Identifier      "ati1"
        Driver          "radeon"
        BusID           "PCI:1:0:0"
        Screen          1
EndSection

Section "Screen"
        Identifier      "screen0"
        Device          "ati0"
        Monitor         "Fujitsu0"
        DefaultDepth    24
        SubSection "Display"
                Depth   24
                Modes   "1280x1024"
        EndSubSection
EndSection

Section "Screen"
        Identifier      "screen1"
        Device          "ati1"
        Monitor         "Fujitsu1"
        DefaultDepth    24
        SubSection "Display"
                Depth   24
                Modes   "1280x1024"
        EndSubSection
EndSection
Section "ServerLayout"
        Identifier "Multihead"
        Screen  "screen0"
        Screen  "screen1" RightOf "screen0"
        InputDevice     "mouse1" "CorePointer"
        InputDevice     "keyboard1" "CoreKeyboard"
        Option "Xinerama"
EndSection

found at: http://forums.gentoo.org/viewtopic-t-105588-highlight-ati+radeon+mobility+7500.html


CategoryDocumentation CategoryCleanup

XineramaHowTo (last edited 2008-08-06 16:38:16 by localhost)