View Single Post
Old 12-03-04, 03:27 PM   #13
LordWoody
Registered User
 
Join Date: Jun 2004
Posts: 1
Default Re: DFP and TV: I want DFP to be the primary display!

OK, DFP is always the last *default* output (screen), so to have DFP (Primary) and CRT (secondary) in appearance here is how it goes:

DFP == 1680x1050
CRT == 1024x768

Take an ordinary xorg.conf as configured for the DFP alone and modify the screen section as follows:

Code:
### Begin Screen section
Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24

    # Twinview settings
    Option "TwinView" "true"
    Option "ConnectedMonitors" "DFP-0,CRT-0" # the order here is irrelevent
    Option "SecondMonitorHorizSync" "31.5-90"
    Option "SecondMonitorVertRefresh" "59-100"
    Option "IgnoreDisplayDevices" "TV"
    Option "MetaModes" "1024x768 @1024x1050 +1680+0, 1680x1050 +0+0"
    Option "Xinerama" "on"

    Subsection "Display"
        Depth 8
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 15
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 16
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 24
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection
EndSection
### End screen section
The important line here is "MetaModes" It is the absolute control over what screen gets placed where (the CRT is still screen 0 and the DFP is still 1). It is documented in the NVidia TWINVIEW-README. This will result in *one* effective display that spans two screens and the real resolution is the width of both displays and the height of the taller display if the screens are side by side and the height of both displays and the width of the widest display if one above the other.

In short you define a setup for each avaialble screen with copmmas between each screen control. each screen understands three space separated items:

resolution @virtualres +left+down

In our example above, screen 0 has a real resolution of 1024x768 and a virtual resolution of 1024x1050 and has a upper left coordinate of 1680,0 (1680 pixels left of screen 1 which starts at 0,0 and is 1680 pixles wide).
screen 1 starts at 0,0 and has a virtual resolution equal to it's real resolution (no '@' definition). The *whole* display is rectangular, so even though your screen 0 is pysically shorter than screen 1, the difference in height actually still exists, hence the need define a virtual resolution to pan for screen 0.

Your desktop manager (Gmone, KDE, ect...) Needs to be Xinerama aware. Recent releases of Gnome and KDE are and as such will be able to place things like the taskbar and icons on the correct physical screen.

That said, my experience is that the login manager for those who boot runlevel 5 will show up on screen 0 regardless of position unless told to do otherwise. gdm has a special setting to handle this:

in the greeter section of gdm.conf:

Code:
[greeter]
XineramaScreen=1
For users of xdm, kdm and/or mdkkdm I can't say, but I suspect there are ways of setting the screen they show up on also.

You know if you have the screen orientation how you want based on the position of the NVidia logo on the start of X. It positions itself in the middle whole display as laid out in MetaModes.

Enjoy,

Woody

My entire xorg.conf (or XF86Config-4 for those on Xfree86) follows:

Code:
# **********************************************************************
# Refer to the XF86Config man page for details about the format of
# this file.
# **********************************************************************

Section "Files"
    # Multiple FontPath entries are allowed (they are concatenated together)
    # By default, Mandrake 6.0 and later now use a font server independent of
    # the X server to render fonts.
    FontPath "unix/:-1"
EndSection

Section "ServerFlags"
    #DontZap # disable <Crtl><Alt><BS> (server abort)
    #DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)
    AllowMouseOpenFail # allows the server to start up even if the mouse doesn't work
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "type1"
    Load "freetype"
    Load "synaptics"
    Load "/usr/X11R6/lib/modules/extensions/libglx.so"
EndSection

Section "InputDevice"
    Identifier "Keyboard1"
    Driver "keyboard"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "en_US"
    Option "XkbOptions" ""
EndSection

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

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "ExplorerPS/2"
    Option "Device" "/dev/usbmouse"
    Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Generic"
    ModelName "Flat Panel 1680x1050"
    HorizSync 31.5-90
    VertRefresh 59-100

    # Hewlett Packard zd7000
    # 1680x1050 @ 75.00 Hz (GTF) hsync: 82.20 kHz; pclk: 188.07 MHz
    Modeline "1680x1050"  188.07  1680 1800 1984 2288  1050 1051 1054 1096  -HSync +Vsync

    # 1440x900 @ 75.00 Hz (GTF) hsync: 70.50 kHz; pclk: 136.49 MHz
    Modeline "1440x900"   136.49  1440 1536 1688 1936   900  901  904  940  -HSync +Vsync

    # 1216x760 @ 75.00 Hz (GTF) hsync: 59.55 kHz; pclk: 96.23 MHz
    Modeline "1216x760"    96.23  1216 1288 1416 1616   760  761  764  794  -HSync +Vsync

EndSection

Section "Device"
    Identifier "device1"
    BoardName "NVIDIA GeForce FX (generic)"
    Driver "nvidia"
    Option "DPMS"
    Option "IgnoreEDID" "1"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24

    # Twinview settings
    Option "TwinView"                 "true"
    Option "ConnectedMonitors"        "DFP-0,CRT-0"
    Option "SecondMonitorHorizSync"   "31.5-90"
    Option "SecondMonitorVertRefresh" "59-100"
    Option "IgnoreDisplayDevices"     "TV"
    Option "MetaModes"                "1024x768 @1024x1050 +1680+0, 1680x1050 +0+0"
    Option "Xinerama"                 "on"

    Subsection "Display"
        Depth 8
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 15
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 16
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection

    Subsection "Display"
        Depth 24
        Modes "1680x1050" "1440x900" "1216x760"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "SynapticsMouse1" "CorePointer"
    InputDevice "Mouse1" "AlwaysCore"
    Screen "screen1"
EndSection

Last edited by LordWoody; 12-03-04 at 03:44 PM.
LordWoody is offline   Reply With Quote