Author Topic: NVIDIA Driver - Troubleshooting Black Screen, Low Resolution  (Read 1540 times)

twodogs

  • Guru
  • ****
  • Posts: 224
    • View Profile
NVIDIA Driver - Troubleshooting Black Screen, Low Resolution
« on: February 06, 2011, 05:12:13 pm »
Executive Summary
Selecting a 60Hz resolution in the AV Wizard gives me an undisplayable 85Hz refresh rate. I think two things are causing this. First, the NVIDIA driver is failing to weed out modes that are beyond the capability of my hardware. Second, the wizard is adding my desired resolution to xorg.conf, but it is not specifying the refresh rate. The driver responds by choosing what it thinks is the "best" refresh rate, and I get a black screen. This might be happening to others who get a black screen after running the Wizard.

I have two questions for the experts. First, when checking modes, why does the driver note “VertRefresh out of range” then ignore it and declare the mode valid? UseEdid is set “true”, so out-of-range modes should be rejected. Second, why does the wizard not include the selected refresh rate when it inserts the mode into xorg.conf?


Detailed Version
I'm fairly new to MCE so I hope I'm not spreading disinformation. Main sources are the NVIDIA readme as well as the log and configuration files.

/var/log/Xorg.0.log
/etc/X11/xorg.conf
http://us.download.nvidia.com/XFree86/Linux-x86/195.36.15/README/programmingmodes.html
http://us.download.nvidia.com/XFree86/Linux-x86/195.36.15/README/xconfigoptions.html


NVIDIA Resolution Overview
One of the jobs of the NVIDIA driver is to offer a set of different modelines that can be selected to provide your desired screen resolution and refresh rate. The driver does not generate these modelines from scratch; it collects candidates from a variety of sources and evaluates whether each one will work with your system. The driver will supply standard Xserver and VESA modelines to the candidate list. The display section of xorg.conf can also supply modeline candidates. Finally, the monitor can supply modeline candidates through its EDID (Extended Display Identification Data). The EDID contains information about the monitor that your computer accesses through the VGA, DVI, or HDMI cable. The user can filter out some of these candidates by specifying options in xorg.conf.

The driver looks at each candidate modeline and declares it to be either “valid” or “rejected”. It makes this judgment based upon information gathered from the monitor (through EDID), from the graphics card, and from options specified in xorg.conf. Valid modelines are given unique names and put into a list. The naming convention is as follows ...

"1024x768"              : 1024 x  768 @  85.0 Hz  (from: X Server, VESA)
"1024x768_85"        : 1024 x  768 @  85.0 Hz  (from: X Server, VESA)
"1024x768_75"        : 1024 x  768 @  75.0 Hz  (from: X Server, VESA)
"1024x768_70"        : 1024 x  768 @  70.1 Hz  (from: X Server, VESA)
"1024x768_60"        : 1024 x  768 @  60.0 Hz  (from: X Server, VESA)

...and so on through all the remaining resolutions. The driver rank orders these valid modelines from best (85Hz) to worst (60Hz). It takes the best modeline (1024x768_85), duplicates it, and renames it with the refresh rate omitted. That way if you select “1024x768” and don't specify the refresh rate, you'll get the best available (in this case 85Hz). Remember that these are just the names, not the actual modelines themselves. A complete modeline looks like this...

ModeLine "1024x768_85.00" 78.75 1024 1040 1136 1312 768 769 772 800 -hsync -vsync

There are a few different ways to select the mode (resolution) you want. On your home office computer, you might open  “NVIDIA X Server Settings” from the menu bar. In LinuxMCE the AV Wizard allows you to choose your mode. The end result of both of these methods is to write the desired mode into the “screen” section of xorg.conf.  Most of this is a fairly automated process. You can also manually edit the xorg.conf file.

AV Wizard Generates Wrong Resolution
First, the hardware I'm using is...
P5N7A-VM
E5200 CPU
NVIDIA GeForce 9300 (integrated)
LG DU-42PX12X plasma (built 2004, 1024x768 native resolution, DVI cable)

After a fresh install of the latest snapshot, I selected 1024x768 60Hz (recommended by the TV manual) in the AV Wizard. This resulted in a black screen. The best resolution that would display was 640x480. I disconnected my TV, connected a PC monitor, and rebooted to arrive again at the wizard. Choosing 1024x768_60 gave a working display on the monitor, but it also showed the warning “input signal out of range”. Apparently the monitor was able to adapt to an out of range signal. Finishing the setup and checking /etc/X11/xorg.conf (see below) showed that the wizard inserted a modeline ("1024x768" 60.80 1024 1056 1128 1272 768 768 770 796) in the "Monitor" section. In the section “Screen” it inserted a line calling for mode "1024x768" to be displayed.

Reviewing /var/log/Xorg.0.log (see below) showed three things of interest. First, the modeline supplied by the wizard is tested and rejected. Second, the VESA-supplied 85Hz mode is accepted (along with other modes that are beyond the TV capabilities). The driver identifies that the VertRefresh is out of range, but ignores this and declares the mode valid. Third, looking in the valid modepool, the 85Hz mode is the best valid mode and is renamed “1024x768”. This name matches the name from the “Screen” section of the wizard-supplied xorg.conf. So even though I requested a 60Hz mode, I was getting an 85Hz mode that the TV cannot display.

Manually replacing the wizard-supplied modeline with a valid one did not help because xorg.conf was still requesting the mode “1024x768” and that mode was still the driver-selected best mode of 85Hz. Only when I manually edited xorg.conf to specifically request "1024x768_60" did I get the correct resolution for the TV.





Code: [Select]
#From xorg.conf

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Unknown"

    ModelName      "Unknown"

    Option         "DPMS"

Modeline "1024x768" 60.80 1024 1056 1128 1272 768 768 770 796

HorizSync 20-500

VertRefresh 59-61

EndSection



Section "Device"

    Identifier     "Device0"

    Driver         "nvidia"

    VendorName     "NVIDIA Corporation"

Option "XvmcUsesTextures" "true"

Option "renderAccel" "true"

Option "NoDDCValue"

Option "UseEDID" "true"

Option "ExactModeTimingsDVI" "true"

Option "NoLogo" "true"

Option "NoBandWidthTest" "true"

Option "ModeValidation" "NoDFPNativeResolutionCheck, NoEdidMaxPClkCheck, NoMaxPClkCheck, AllowInterlacedModes, AllowNon60HzDFPModes, NoEdidModes"

Option "DynamicTwinView" "false"

Option "UseEvents" "true"

Option "ConnectedMonitor" "DFP"

EndSection



Section "Screen"

    Identifier     "Screen0"

    Device         "Device0"

    Monitor        "Monitor0"

    DefaultDepth    24

SubSection "Display"

Modes "1024x768"

Virtual 1024 768

EndSubSection

SubSection "Device"

Modes "1024x768"

EndSubSection


Code: [Select]
#From Xorg.0.log

(II) Feb 04 10:28:53 NVIDIA(0):   Validating Mode "1024x768":

(II) Feb 04 10:28:53 NVIDIA(0):     1024 x 768 @ 60 Hz

(II) Feb 04 10:28:53 NVIDIA(0):     Mode Source: X Configuration file ModeLine

(II) Feb 04 10:28:53 NVIDIA(0):       Pixel Clock      : 60.80 MHz

(II) Feb 04 10:28:53 NVIDIA(0):       HRes, HSyncStart : 1024, 1056

(II) Feb 04 10:28:53 NVIDIA(0):       HSyncEnd, HTotal : 1128, 1272

(II) Feb 04 10:28:53 NVIDIA(0):       VRes, VSyncStart :  768,  768

(II) Feb 04 10:28:53 NVIDIA(0):       VSyncEnd, VTotal :  770,  796

(II) Feb 04 10:28:53 NVIDIA(0):       H/V Polarity     : +/+

(II) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Scaled and BestFit AspectScaled are identical;

(II) Feb 04 10:28:53 NVIDIA(GPU-0):         collapsing BestFit AspectScaled.

(II) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Centered and BestFit Scaled are identical;

(II) Feb 04 10:28:53 NVIDIA(GPU-0):         collapsing BestFit Scaled.

(WW) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Centered ViewPort 1024x768 exceeds hardware

(WW) Feb 04 10:28:53 NVIDIA(GPU-0):         capabilities.

(WW) Feb 04 10:28:53 NVIDIA(0):     Mode is rejected: Unable to construct hardware-specific

(WW) Feb 04 10:28:53 NVIDIA(0):     mode timings.
...section deleted for brevity...
Validating Mode "1024x768":

(II) Feb 04 10:28:53 NVIDIA(0):     1024 x 768 @ 85 Hz

(II) Feb 04 10:28:53 NVIDIA(0):     Mode Source: VESA

(II) Feb 04 10:28:53 NVIDIA(0):       Pixel Clock      : 94.50 MHz

(II) Feb 04 10:28:53 NVIDIA(0):       HRes, HSyncStart : 1024, 1072

(II) Feb 04 10:28:53 NVIDIA(0):       HSyncEnd, HTotal : 1168, 1376

(II) Feb 04 10:28:53 NVIDIA(0):       VRes, VSyncStart :  768,  769

(II) Feb 04 10:28:53 NVIDIA(0):       VSyncEnd, VTotal :  772,  808

(II) Feb 04 10:28:53 NVIDIA(0):       H/V Polarity     : +/+

(II) Feb 04 10:28:53 NVIDIA(0):     VertRefresh (85.0 Hz) out of range (56.000-76.000 Hz);

(II) Feb 04 10:28:53 NVIDIA(0):         however, ignoring VertRefresh check for DFP frontend

(II) Feb 04 10:28:53 NVIDIA(0):         mode validation

(II) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Scaled and BestFit AspectScaled are identical;

(II) Feb 04 10:28:53 NVIDIA(GPU-0):         collapsing BestFit AspectScaled.

(II) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Centered and BestFit Scaled are identical;

(II) Feb 04 10:28:53 NVIDIA(GPU-0):         collapsing BestFit Scaled.

(II) Feb 04 10:28:53 NVIDIA(GPU-0):     BestFit Centered         1024x768

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Horizontal Taps        0

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Vertical Taps          0

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Base SuperSample       x1

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Base Depth             32

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Distributed Rendering  1

(II) Feb 04 10:28:53 NVIDIA(GPU-0):       Overlay Depth          32

(II) Feb 04 10:28:53 NVIDIA(0):     Mode is valid.
...section deleted for brevity...
(II) Feb 04 10:28:53 NVIDIA(0): --- Modes in ModePool for HSG HF207 (DFP-0) ---

(II) Feb 04 10:28:53 NVIDIA(0): "nvidia-auto-select" : 1024 x  768 @  85.0 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768"           : 1024 x  768 @  85.0 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768_85"        : 1024 x  768 @  85.0 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768_75"        : 1024 x  768 @  75.0 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768_70"        : 1024 x  768 @  70.1 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768_60"        : 1024 x  768 @  60.0 Hz  (from: VESA)

(II) Feb 04 10:28:53 NVIDIA(0): "1024x768_87i"       : 1024 x  768 @  87.0 Hz Interlace  (from: VESA)
...section deleted for brevity...
(II) Feb 04 10:28:53 NVIDIA(0): Assigned Display Device: DFP-0

(II) Feb 04 10:28:53 NVIDIA(0): Requested modes:

(II) Feb 04 10:28:53 NVIDIA(0):     "1024x768"

(II) Feb 04 10:28:53 NVIDIA(0): Validated modes:

(II) Feb 04 10:28:53 NVIDIA(0): MetaMode "1024x768":

(II) Feb 04 10:28:53 NVIDIA(0):     Bounding Box: [0, 0, 1024, 768]

(II) Feb 04 10:28:53 NVIDIA(0):     HSG HF207 (DFP-0): "1024x768"

(II) Feb 04 10:28:53 NVIDIA(0):         Size          : 1024 x 768

(II) Feb 04 10:28:53 NVIDIA(0):         Offset        : +0 +0

(II) Feb 04 10:28:53 NVIDIA(0):         Panning Domain: @ 1024 x 768

(II) Feb 04 10:28:53 NVIDIA(0):         Position      : [0, 0, 1024, 768]

(**) Feb 04 10:28:53 NVIDIA(0): Virtual screen size configured to be 1024 x 768
« Last Edit: February 11, 2011, 10:22:42 pm by twodogs »
http://greenrenovation.wordpress.com/home-automation/
system:
ASUS P5N7A-VM
integrated GeForce 9300
E5200 processor
Fusion 5 lite HDTV card
2G RAM
SYBA SY-PCI15001 6-port serial card
Denon AVR 3805
LG 42" Plasma
Gyration GYR3101
Cisco SPA3102 analog telephone adapter
Cisco 7971G IP phone/orbiter

twodogs

  • Guru
  • ****
  • Posts: 224
    • View Profile
Re: NVIDIA Driver - Troubleshooting Black Screen, Low Resolution
« Reply #1 on: March 10, 2011, 03:23:42 pm »
I know that 99.9% of things that people think are bugs are really just operator error. Maybe someone with more programming experience could confirm what I'm seeing? It seems like the A/V wizard should include the desired refresh rate as part of the resolution when it rewrites xorg.conf, i.e. "1024x768_60" instead of "1024x768".
I looked at trying to code this change myself, but there is a complicated interaction of subroutines that is over my head at the moment.

John
http://greenrenovation.wordpress.com/home-automation/
system:
ASUS P5N7A-VM
integrated GeForce 9300
E5200 processor
Fusion 5 lite HDTV card
2G RAM
SYBA SY-PCI15001 6-port serial card
Denon AVR 3805
LG 42" Plasma
Gyration GYR3101
Cisco SPA3102 analog telephone adapter
Cisco 7971G IP phone/orbiter

willygest11

  • Guest
Re: NVIDIA Driver - Troubleshooting Black Screen, Low Resolution
« Reply #2 on: March 17, 2011, 11:38:52 am »
any recommendations about a good nvidia to buy?