As William pointed out in his xorg.conf (or XF86Config), the key is to have two "Device" sections with the same BusID. One should say "Screen 0" and the other should say "Screen 1".

Then create two "Screen" sections and two "Monitor" sections.
Tie them all together in your "ServerLayout" section with
two "screen" lines.  One of them should read "leftof" or
"rightof" the other.

BTW, since you have an nVidia card, you will need to use
nVidia's driver, not the open-source "nv" driver.  The
nv driver does not support dual-head set-up.

My nVidia-based XF86Config follows.  Feel free to shoot
further questions my way.


Alan







# /etc/X11/XF86Config-4

#################################################################################

Section "dri"
    # Access to OpenGL ICD is allowed for all users:
    Mode 0666
    # Access to OpenGL ICD is restricted to a specific user group:
    #    Group 100    # users
    #    Mode 0660
EndSection

#################################################################################

Section "Module"

    Load    "dbe"      # Double buffer extension
    Load    "v4l"      # Video for Linux
    Load    "extmod"
    Load    "glx"      # 3D layer (OK for nvidia)
    #Load    "dri"      # direct rendering (not for nvidia)
    #Load    "GLcore"   # GL (not for nvidia)

    SubSection  "extmod"
        Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection

    Load    "type1"
    Load    "freetype"

    Load    "synaptics"

EndSection

################################################################################

Section "Files"
    RgbPath    "/usr/X11R6/lib/X11/rgb"
    #FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
    #ModulePath "/usr/X11R6/lib/modules"
EndSection

################################################################################

Section "ServerFlags"

    #Option "DontVTSwitch"   # pass Ctrl-Alt-Fx VT-switch to clients
    #Option "DontZap"     # don't kill X on Ctrl-Alt-BS
    #Option "Dont Zoom"   # ignore Ctrl-Alt-KP+- video switch
    #Option "DisableModInDev"   # don't allow xmod (keyboard, mouse) changes

    Option "AllowMouseOpenFail" # start up even if the mouse doesn't work
    #Option "Xinerama" "on"

EndSection

################################################################################

Section "InputDevice"
    Identifier    "generic_keyboard"
    Driver    "Keyboard"
    Option "AutoRepeat" "500 30"
    #Option    "Xleds"      "1 2 3"  # which keyboard LEDs can be 
user-controlled with xset
    #Option "LeftAlt"     "Meta"
    #Option "RightAlt"    "ModeShift"
    #Option "XkbOptions"  "ctrl:swapcaps"  # switch the positions of your 
capslock and control
    Option "XkbRules"    "xfree86"
    Option "XkbModel"    "pc101"
    Option "XkbLayout"    "us"
EndSection

################################################################################

Section "InputDevice"
    Identifier    "usb_mouse"
    Driver    "mouse"
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mice"
    Option "ZAxisMapping"  "4 5"
    Option "Emulate3Buttons"
    #Option "Emulate3Timeout"    "50"
EndSection

################################################################################

Section "InputDevice"
  Identifier    "synaptics_touchpad"
  Driver        "synaptics"
  Option        "Device"        "/dev/psaux"
  Option        "Protocol"      "auto-dev"
  Option        "LeftEdge"      "1700"
  Option        "RightEdge"     "5300"
  Option        "TopEdge"       "1700"
  Option        "BottomEdge"    "4200"
  Option        "FingerLow"     "25"
  Option        "FingerHigh"    "30"
  Option        "MaxTapTime"    "180"
  Option        "MaxTapMove"    "220"
  Option        "VertScrollDelta" "100"
  Option        "MinSpeed"      "0.06"
  Option        "MaxSpeed"      "0.12"
  Option        "AccelFactor" "0.0010"
  Option        "SHMConfig"     "on"
#  Option       "Repeater"      "/dev/ps2mouse"
EndSection

################################################################################

Section "Monitor"
    Identifier  "laptop_lcd_monitor"
    HorizSync   31.5 - 48.5
    VertRefresh 50-90
EndSection

################################################################################

Section "Monitor"
    Identifier  "external_monitor"
    HorizSync    30-64
    VertRefresh 50-130
    Option "DPMS"
    vendorname "Dell"
    modelname "UltraScan-17FS"
    ModeLine "1280x1024/61Hz" 110 1280 1328 1512 1712 1024 1025 1028 1054
EndSection

################################################################################

Section "Device"
    Identifier    "Standard VGA"
    VendorName    "Unknown"
    BoardName     "Unknown"
    Driver        "vga"
EndSection

################################################################################

Section "Device"
    Identifier  "videocard1"
    Driver      "nvidia"
    BusID       "PCI:01:00:0"
    Option      "DPMS"
    Screen      0
    Option      "TwinView"    "false"
    Option      "ConnectedMonitor" "DFP"

    # AGP support
    # 0:disable AGP
    # 1:use the NVIDIA internal AGP support, if possible
    # 2:use AGPGART, if possible
    # 3:use any AGP support(try AGPGART, then the NVIDIA AGP)
    Option "NvAgp"        "3"


# TWINVIEW

    #Option "TwinView"                 "on"
    #Option "TwinViewOrientation"      "RightOf"
    #Option "TwinViewOrientation"      "LeftOf"
    #Option "TwinViewOrientation"      "Above"
    #Option "TwinViewOrientation"      "Below"
    #Option "TwinViewOrientation"      "Clone"
    #Option "MetaModes"                "1024x768,1280x1024; 1024x768,NULL"
    #Option "ConnectedMonitor"         "LCD"
    #Option "SecondConnectedMonitor"   "CRT"
    #Option "SecondMonitorHorizSync"   "30-98"
    #Option "SecondMonitorVertRefresh" "50-160"
    #Option "NoTwinViewXineramaInfo"   "on"

    # CURSOR

    # Option "HWCursor"                "on"  # default=on
    # Option "SWCursor"                "0"
    # Option "CursorShadow"            "1"
    # Option "CursorShadowAlpha"       "64"
    # Option "CursorShadowXOffset"     "4"
    # Option "CursorShadowYOffset"     "2"

    # Use the hardware cursor on the laptop LCD, and use the software cursor
    # on the external monitor.  If you use the hardware cursor on both, you
    # get trails on the external monitor.  If you use the software cursor on
    # both, the cursor appears about 10 pixels too low on the external monitor.
    Option "HWCursor"                  "on"
    Option "SWCursor"                  "0"

    # OTHER

    # Option "PageFlip"                "on"      # default=on
    # Option "FlatPanelScalingMode"    "scaled"  # or "centered"
    # Option "IgnoreEDID"              "off"     # default=off
    # Option "OverridePolarity"        "1"       # helps console switching
    # Option "NoLogo"                  "1"
    # Option "UseEdidFreqs"            "on"      # default=off
    # Option "DigitalVibrance"         "0"
    # Option "NoRenderAccel"           "off"     # default=off
    # Option "RenderAccel"             "on"

EndSection

################################################################################

Section "Device"
    Identifier  "videocard2"
    Driver      "nvidia"
    BusID       "PCI:01:00:0"
    Screen      1
    Option      "DPMS"
    Option      "TwinView"            "false"
    Option      "ConnectedMonitor"    "CRT"

    # Use the hardware cursor on the laptop LCD, and use the software cursor
    # on the external monitor.  If you use the hardware cursor on both, you
    # get trails on the external monitor.  If you use the software cursor on
    # both, the cursor appears about 10 pixels too low on the external monitor.
    Option "HWCursor"                  "off"
    Option "SWCursor"                  "1"

EndSection

################################################################################

Section "Screen"
    Identifier  "laptop_lcd_screen"
    Device      "videocard1"
    Monitor     "laptop_lcd_monitor"
    DefaultDepth 24

    Subsection "Display"
        Depth       24
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
EndSection

################################################################################

Section "Screen"
    Identifier  "external_screen"
    Device      "videocard2"
    Monitor     "external_monitor"
    DefaultDepth 24

    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

################################################################################

Section "ServerLayout"
    Identifier  "dualhead"
    Screen "laptop_lcd_screen"
    Screen "external_screen" leftof "laptop_lcd_screen"
    InputDevice "synaptics_touchpad" "CorePointer"
    InputDevice "usb_mouse" "SendCoreEvents"
    InputDevice "generic_keyboard" "CoreKeyboard"
EndSection

################################################################################
#
#Section "ServerLayout"
#    Identifier  "ext"
#    Screen "external_screen"
#    InputDevice "synaptics_touchpad" "CorePointer"
#    InputDevice "usb_mouse" "SendCoreEvents"
#    InputDevice "generic_keyboard" "CoreKeyboard"
#EndSection
#
################################################################################
#
#Section "ServerLayout"
#    Identifier  "lcd"
#    Screen "laptop_lcd_screen"
#    InputDevice "synaptics_touchpad" "CorePointer"
#    InputDevice "usb_mouse" "SendCoreEvents"
#    InputDevice "generic_keyboard" "CoreKeyboard"
#EndSection
#
################################################################################



--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to