Monday, July 24, 2006

X11 Dual Head with nVidia

This is more a reminder for myself than a regular post. Because I have been fiddling around with the xorg.conf to get my Linux desktop right with dual head and the right resolution on each screen, I post my configuration here. If anybody finds it useful, they are welcome to copy it.

I am currently using Ubuntu 6.06 (Dapper Drake) which comes with X.Org 7.0. My machine has a GeForce 5600XT based graphics board by LeadTek. It has a DVI-I and a VGA port. I installed the closed-source nvidia driver to get hardware acceleration and extended features the X.Org nv driver does not provide. Moreover I could not get dual head right with the X.Org driver.

The following configuration sets up two screens, one for the left display (analogue TFT, 1280x1024) and one for the right (CRT, 1024x768).

# /etc/X11/xorg.conf (xorg 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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
 FontPath "/usr/share/X11/fonts/misc"
 FontPath "/usr/share/X11/fonts/cyrillic"
 FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
 FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
 FontPath "/usr/share/X11/fonts/Type1"
 FontPath "/usr/share/X11/fonts/100dpi"
 FontPath "/usr/share/X11/fonts/75dpi"
 # path to defoma fonts
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
 Load "i2c"
 Load "bitmap"
 Load "ddc"
# Load "dri"
 Load "extmod"
 Load "freetype"
 Load "glx"
 Load "int10"
 Load "type1"
 Load "vbe"
EndSection

Section "InputDevice"
 Identifier "Generic Keyboard"
 Driver  "kbd"
 Option  "CoreKeyboard"
 Option  "XkbRules" "xorg"
 Option  "XkbModel" "pc105"
 Option  "XkbLayout" "de"
 Option  "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
 Identifier "Configured Mouse"
 Driver  "mouse"
 Option  "CorePointer"
 Option  "Device"  "/dev/input/mice"
 Option  "Protocol"  "ExplorerPS/2"
 Option  "ZAxisMapping"  "4 5"
 Option  "Emulate3Buttons" "true"
EndSection

Section "Device"
 Identifier "nvidia0"
 BoardName "GeForce FX 5600XT"
 Driver  "nvidia"
 BusID  "PCI:1:0:0"
 Screen  0
 #SINCE NVIDIA VERSION 1.0-8756 YOU MUST USE UseDisplayDevice INSTEAD OF ConnectedMonitor TO GET XINERAMA WORK:
    #Option "ConnectedMonitor" "CRT"
    Option "UseDisplayDevice" "CRT"
    Option "NoLogo" "0"
    Option "RenderAccel" "true"
    Option "AllowGLXWithComposite" "true"
    Option "UseEdidDpi" "FALSE"
EndSection

Section "Device"
 Identifier "nvidia1"
 BoardName "GeForce FX 5600XT"
 Driver  "nvidia"
 BusID  "PCI:1:0:0"
 Screen  1
 #SINCE NVIDIA VERSION 1.0-8756 YOU MUST USE UseDisplayDevice INSTEAD OF ConnectedMonitor TO GET XINERAMA WORK:
    #Option "ConnectedMonitor" "CRT"
    Option "UseDisplayDevice" "CRT"
    Option "NoLogo" "0"
    Option "RenderAccel" "true"
    Option "AllowGLXWithComposite" "true"
    Option "UseEdidDpi" "FALSE"
EndSection

Section "Extensions"
 Option "Composite" "Enable"
EndSection

Section "Monitor"
 Identifier "H750"
 Option  "DPMS"
 
EndSection

Section "Monitor"
 Identifier "Amaga"
 Option  "DPMS"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device  "nvidia0"
 Monitor  "H750"
 DefaultDepth 24
 SubSection "Display"
  Depth  24
  Modes  "1280x1024" "1024x768" "800x600" "640x480"
 EndSubSection
EndSection

Section "Screen"
 Identifier "Screen1"
 Device  "nvidia1"
 Monitor  "Amaga"
 DefaultDepth 24
 SubSection "Display"
  Depth  24
  Modes  "1024x768" "800x600" "640x480"
 EndSubSection
EndSection


Section "ServerLayout"
 Identifier "Dual Head Layout"
 Screen 0 "Screen0"
 Screen 1 "Screen1" RightOf "Screen0"
 InputDevice "Generic Keyboard"
 InputDevice "Configured Mouse"
 Option  "Xinerama" "On"
EndSection

Section "DRI"
 Mode 0666
EndSection

No comments: