View Single Post
Old 03-13-09, 11:43 PM   #6
mathog
Registered User
 
Join Date: May 2006
Posts: 90
Default Re: force screens 0 and 1 even when no display attached

Figured it out!

The xorg.conf below starts both screens even when the CRT cable is not plugged into the PC, or when the TV is off. (I have not tested it with both off.)

The problem was that the ConnectedMonitor option must appear only one time. It seems not to matter where it appears, in either Display or Screen section. Also it must have both devices in it. Specifying the two devices in separate ConnectedMonitor option lines, in the corresponding screen or display sections, does not work. The example given by Tub fits this model, but since there was only a single Screen section in that example, there was enough rope to hang myself when extrapolating to a config with two Screen sections. I probably don't get a vote, but the driver should either merge multiple ConnectedMonitor options correctly, or give an EE when it sees it. Currently it does neither.

The suggested "IgnoreDisplayDevices" was apparently not needed in my configuration.

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder57)  Thu Mar  5 18:47:52 PST 2009

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@palmer)  Mon Nov  3 08:46:46 UTC 2008

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Sony CPD-420GS"
    HorizSync       30.0 - 96.0
    VertRefresh     48.0 - 120.0
    Option         "DPMS"
EndSection

Section "Monitor"

    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "TV-0"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    BusID          "PCI:1:0:0"
    Screen          0
# The next line can apparently be in any Device or Screen section.
# However, it must appear only ONCE since it seems to be global. Splitting
# CRT-1 and TV-0 into two separate ConnectedMonitor lines does not work!
# At least with 180.37.
    Option         "ConnectedMonitor" "CRT-1,TV-0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "CRT: nvidia-auto-select +0+0; CRT: 1280x1024 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "CustomEDID" "CRT-1:/etc/X11/crt1_edid.bin"
    Option         "metamodes" "CRT: 1280x1024 +0+0"
    Option         "UseEvents" "True"
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TVOutFormat" "SVIDEO"
    Option         "TVStandard" "NTSC-M"
    Option         "metamodes" "TV: 640x480 +0+0"
    Option         "UseEvents" "True"
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
mathog is offline   Reply With Quote