XineramaHowTo

Differences between revisions 2 and 3
Revision 2 as of 2005-07-18 07:35:42
Size: 7305
Editor: S0106000000cc07fc
Comment: add category documentation
Revision 3 as of 2006-05-24 04:42:10
Size: 5433
Editor: S0106001150603f7d
Comment: can Warty info; move content from XineramaMultipleMonitors
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''Note: This needs to be updated for Hoary''' = 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/]. ---
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 7: Line 12:
= Warning = 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 9: Line 16:
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. 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 11: Line 35:
== 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 "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 14: Line 53:
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.

== Necessary Modifications ==

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 55:
# 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 59:

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 65:
 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 72:
 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 79:
 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 90:
 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 99:

Section "ServerFlags"
 Option "Xinerama" "True"
EndSection
Line 201: Line 100:
 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 108:
found at: http://forums.gentoo.org/viewtopic-t-105588-highlight-ati+radeon+mobility+7500.html
Line 213: Line 110:
= 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
----
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 :

--- 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.

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)