NVidia: Monitor cable reconnected - but dual monitor setup lost

I had a perfect running FreeBSD 9.2 system with X.Org and dual Samsung Sync Master 2443 monitors, driven by a NVidia card. The left monitor was connected to the DVI output. The right monitor was connected to the VGA output. I even got it to work perfectly with Compiz graphics.

All good - until I had to move the computer - and therefore disconnected the monitor cables temporary for this task. By mistake, I reconnected the right monitor cable to the onboard VGA output. The onboard VGA is disabled in the BIOS. You would think, that this would not be a problem.

However, starting FreeBSD and X.Org resulted in major problems. Naturally, the right monitor was off - and I quickly realized, that the cable was not connected to the correct VGA output. I turned off the computer - and reconnected the cable to the correct VGA output on the NVidia card.

I was now ready to work - and I started up again - only to see, that the right monitor was now garbled up with wrong aspect resolution. I assumed, that a re-detection would solve the little problem and started up the NVidia Settings tool. Howewer, I could see, that the right monitor was no longer a Samsung SyncMaster 1920x1200. It was a CRT 1600x1200! Redetection could not change this. Nor could a number of reboots.

I then tried the good old xrandr detection. The same problem. It used to detect 1920x1200 on DVI as well as VGA. Now, it is also a 1600x1200. What is going on? I really hope, that someone can help me with this. I used so many hours to get this work - and I actually do not recall, how I finally got this to work in the first place. I am pretty sure though, that all setup was done from a basic xorg.conf, based on the nvidia driver in the ports collection. Then the NVidia Settings tool took care of the rest in terms of 3840x1200 desktop a cross both monitors.

Code:
[CMD]$ xrandr -q[/CMD]
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*+
   1600x1200      60.0  
   1400x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   800x600        60.3     56.2  
   700x525        60.0  
   640x480        59.9  
   512x384        60.0  
   320x240        60.1  
DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0     50.0  
   1680x1050      60.0  
   1600x1200      60.0  
   1440x900       59.9  
   1280x1024      60.0  
   1280x960       60.0  
   1280x800       59.8  
   1280x720       60.0     50.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   720x576        50.0  
   720x480        59.9  
   640x480        59.9  
HDMI-0 disconnected (normal left inverted right x axis y axis)

Code:
$ [CMD]cat /etc/X11/xorg.conf[/CMD]

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Xinerama" "0"
EndSection

Section "Files"
    ModulePath      "/usr/local/lib/xorg/modules"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/OTF"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
    Load           "extmod"
    Load           "record"
    Load           "dbe"
    Load           "dri2"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "dk"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-1"
    HorizSync       30.0 - 81.0
    VertRefresh     50.0 - 63.0
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GT218 [GeForce 210]"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 210"
EndSection

Section "Screen"

# Removed Option "metamodes" "nvidia-auto-select +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AddARGBGLXVisuals" "True"
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection
 
I should probably add, that it can be assumed, that X.Org - or underlaying software - changed the X.Org configuration file above. It can therefore not be assumed, that the dual monitor configuration, that I had working perfectly, was based on the configuration file shown. I presume, that the UFS file system does not support rolling back the original file.
 
It seems, that the problem is caused by detection failure. However, switching monitors rule out faulty monitors. The same counts for DVI and VGA cables. Could it be assumed, that X.Org has some kind of Windows like registry, in which corrupt EDID or other corrupt data might be stored?
 
The thing most likely to have remembered the wrong setting was the NVidia software. I will edit the original post to add "NVidia" to the subject, which may help in attracting people who have used those cards recently.
 
Thanks for your input. I will look into Disper. I have never heard about it.

I have a found solution now and I will share it here for future readers.

I assumed, that the problem could be isolated to analog VGA EDID, probably within the NVidia graphics adapter or driver software. I therefore replaced the VGA cable with a HDMI-DVI cable. The hardware is as follows.

Motherboard: Gigabyte GA-HA65M-D2H-B3.
PCI Express Link 16X Graphics Adapter: MSI NVidia N210 GT218 GeForce 210.
DVI Port: 2009 Samsung SyncMaster 2443 1920x1200.
HDMI Port: 2011 Samsung SyncMaster 2443 1920x1200.

I disabled GDM, so I could stop a faulty X and get back to shell. Cabled DVI to DVI on left monitor. Cabled HDMI to DVI on right monitor. Deleted configuration and placed my own basic configuration. Started X.Org. Both monitors came on instantly - looking sharp and with perfect resolution settings. Fonts perfect as well. Compiz 3D graphics desktop effects working perfect. I confirmed the settings with the NVidia settings tool. The monitors was recognized as DFP-0 and DFP-1. No more CRT. The desktop size a cross both monitors in a resolution of 3840x1200. I made no changes at all and closed down and confirmed the X.Org log. There were no errors - and it confirmed, that both monitors was detected and configured according to EDID. Enabled GDM again.

# rm /etc/X11/* /var/log/Xorg.*
# cp XXX/xorg.conf /etc/X11
# startx
# nvidia-settings
# more /var/log/Xorg.0.log


This is the X.Org configuration file, that I used.

Code:
Section "ServerLayout"
  Identifier "Mic"
  Screen 0 "Screen0" 0 0
  InputDevice "Mouse0" "CorePointer"
  InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
  ModulePath "/usr/local/lib/xorg/modules"
  FontPath "/usr/local/lib/X11/fonts/misc/"
  FontPath "/usr/local/lib/X11/fonts/TTF/"
  FontPath "/usr/local/lib/X11/fonts/OTF"
  FontPath "/usr/local/lib/X11/fonts/Type1/"
  FontPath "/usr/local/lib/X11/fonts/100dpi/"
  FontPath "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
  Load "extmod"
  Load "record"
  Load "dbe"
  Load "dri"
  Load "dri2"
  Load "glx"
EndSection

Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  Option "XkbLayout" "da"
EndSection

Section "InputDevice"
  Identifier "Mouse0"
  Driver "mouse"
  Option "Protocol" "auto"
  Option "Device" "/dev/sysmouse"
  Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
  Identifier "Monitor0"
  VendorName "Samsung"
  ModelName "SyncMaster"
EndSection

Section "Device"
  Identifier "Card0"
  Driver "nvidia"
  VendorName "NVIDIA Corporation"
  BoardName "GT218 [GeForce 210]"
  BusID "PCI:1:0:0"
EndSection

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

Section "Screen"
  Identifier "Screen0"
  Device "Card0"
  Monitor "Monitor0"
  DefaultDepth 24
  Option "AddARGBGLXVisuals" "True"
  SubSection "Display"
    Viewport 0 0
    Depth 24
  EndSubSection
EndSection

I will post the X.Org log in the next post because of restrictions.
 
This is the X.Org log file after the succesful test.

Code:
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.2-RC3 amd64 
Current Operating System: FreeBSD XXX 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 05 September 2013  08:51:29PM
 
Current version of pixman: 0.30.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Oct  8 18:42:24 2013
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "Mic"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
XXX
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.4
	X.Org Video Driver: 6.0
	X.Org XInput driver : 7.0
	X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(--) PCI:*(0:1:0:0) 10de:0a65:1462:8094 NVIDIA Corporation GT218 [GeForce 210] rev 162, Mem @ 0xf9000000/16777216, 0xd0000000/268435456, 0xee000000/33554432, I/O @ 0x0000cf00/128, BIOS @ 0x????????/65536
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.13.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.1.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Server Extension
(II) NVIDIA GLX Module  319.12  Wed Apr  3 16:20:33 PDT 2013
(II) Loading extension GLX
(II) LoadModule: "nvidia"
(II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
	compiled for 4.0.2, module version = 1.0.0
	Module class: X.Org Video Driver
(II) NVIDIA dlloader X Driver  319.12  Wed Apr  3 16:03:12 PDT 2013
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: PCI 01@00:00:0
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/local/lib/xorg/modules/libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/local/lib/xorg/modules/libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.1.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Option "AddARGBGLXVisuals" "True"
(**) Oct 08 18:42:24 NVIDIA(0): Enabling 2D acceleration
(II) Oct 08 18:42:25 NVIDIA(0): NVIDIA GPU GeForce 210 (GT218) at PCI:1:0:0 (GPU-0)
(--) Oct 08 18:42:25 NVIDIA(0): Memory: 1048576 kBytes
(--) Oct 08 18:42:25 NVIDIA(0): VideoBIOS: 70.18.49.00.00
(II) Oct 08 18:42:25 NVIDIA(0): Detected PCI Express Link width: 16X
(--) Oct 08 18:42:25 NVIDIA(0): Valid display device(s) on GeForce 210 at PCI:1:0:0
(--) Oct 08 18:42:25 NVIDIA(0):     CRT-0
(--) Oct 08 18:42:25 NVIDIA(0):     CRT-1
(--) Oct 08 18:42:25 NVIDIA(0):     Samsung SyncMaster (DFP-0) (boot, connected)
(--) Oct 08 18:42:25 NVIDIA(0):     Samsung SyncMaster (DFP-1) (connected)
(--) Oct 08 18:42:25 NVIDIA(0): CRT-0: 400.0 MHz maximum pixel clock
(--) Oct 08 18:42:25 NVIDIA(0): CRT-1: 400.0 MHz maximum pixel clock
(--) Oct 08 18:42:25 NVIDIA(0): Samsung SyncMaster (DFP-0): 330.0 MHz maximum pixel clock
(--) Oct 08 18:42:25 NVIDIA(0): Samsung SyncMaster (DFP-0): Internal Dual Link TMDS
(--) Oct 08 18:42:25 NVIDIA(0): Samsung SyncMaster (DFP-1): 165.0 MHz maximum pixel clock
(--) Oct 08 18:42:25 NVIDIA(0): Samsung SyncMaster (DFP-1): Internal Single Link TMDS
(**) Oct 08 18:42:25 NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
(**) Oct 08 18:42:25 NVIDIA(0):     device Samsung SyncMaster (DFP-0) (Using EDID frequencies
(**) Oct 08 18:42:25 NVIDIA(0):     has been enabled on all display devices.)
(**) Oct 08 18:42:25 NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
(**) Oct 08 18:42:25 NVIDIA(0):     device Samsung SyncMaster (DFP-1) (Using EDID frequencies
(**) Oct 08 18:42:25 NVIDIA(0):     has been enabled on all display devices.)
(==) Oct 08 18:42:25 NVIDIA(0): 
(==) Oct 08 18:42:25 NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
(==) Oct 08 18:42:25 NVIDIA(0):     will be used as the requested mode.
(==) Oct 08 18:42:25 NVIDIA(0): 
(II) Oct 08 18:42:25 NVIDIA(0): Validated MetaModes:
(II) Oct 08 18:42:25 NVIDIA(0):     "DFP-0:nvidia-auto-select{},DFP-1:nvidia-auto-select{}"
(II) Oct 08 18:42:25 NVIDIA(0): Virtual screen size determined to be 3840 x 1200
(--) Oct 08 18:42:25 NVIDIA(0): DPI set to (93, 95); computed from "UseEdidDpi" X config
(--) Oct 08 18:42:25 NVIDIA(0):     option
(**) Oct 08 18:42:25 NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
(--) Depth 24 pixmap format is 32 bpp
(II) Oct 08 18:42:25 NVIDIA: Reserving 768.00 MB of virtual memory for indirect memory
(II) Oct 08 18:42:25 NVIDIA:     access.
(II) Oct 08 18:42:25 NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select{},DFP-1:nvidia-auto-select{}"
(II) Loading extension NV-GLX
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(==) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(II) Loading extension XINERAMA
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing extension GLX
XXX
 
micski said:
Code:
[CMD]$ xrandr -q[/CMD]

# Removed Option "metamodes" "nvidia-auto-select +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AddARGBGLXVisuals" "True"
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "CRT: nvidia-auto-select [B][U]+0+0[/U][/B], DFP: nvidia-auto-select [b][U]+0+0[/U][/b]"

EndSection

It would never work good anyway, you somehow polluted the xorg.conf.
In the right configuration you should have 'main' monitor with "+0+0" settings and then second monitor adjusted to its physical placement (let it be "+1920+0" for right-of-main).
 
Back
Top