XineramaHowTo

Differences between revisions 1 and 2
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 2 as of 2005-07-18 07:35:42
Size: 7305
Editor: S0106000000cc07fc
Comment: add category documentation
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= XineramaHowTo = '''Note: This needs to be updated for Hoary'''
Line 217: Line 217:

CategoryDocumentation

Note: This needs to be updated for Hoary

Overview

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

Warning

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.

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.

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.

# 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"
EndSection

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"
EndSection

Section "Device"
 Identifier "Matrox1"
 Driver  "mga"
 BusID  "PCI:1:0:0"
 Screen  0
EndSection

Section "Device"
 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"
EndSection

Section "Screen"
 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
EndSection

Section "Screen"
 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
EndSection

Section "ServerFlags"
 Option "Xinerama" "True"
EndSection

Section "ServerLayout"
 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
EndSection

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

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