When switching from nv to nvidia driver lose screen resolution; nvidia doesn't use EDID freq. data even though that data is correct

Bug #151141 reported by John S. Gruber
14
Affects Status Importance Assigned to Milestone
Jockey
Fix Released
Undecided
Unassigned
Restricted Manager
Won't Fix
Undecided
Unassigned
jockey (Ubuntu)
Fix Released
Undecided
Unassigned
linux-restricted-modules-2.6.24 (Ubuntu)
Fix Released
Undecided
Unassigned
restricted-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

nvidia driver, unlike nv driver, doesn't try to use EDID data that is correct

This is related to problem 3731. Possibly a dup of 105967, related to nvidia-glx

Its particular circumstances:

1. Resolution is fine with nv driver, but after using the Restricted Drivers Manager to
go from the nv driver to the nvidia driver high resolutions are lost

2. The monitor returns correct EDID data, as demonstrated by "xresprobe nv" and
"xresprobe nvidia".

My card uses the nvidia-glx-legacy drivers. I was trying to use compiz, but this
problem seems to be driver related, not compiz related. Because of compiz many
people with EDID compliant monitors might try to use the restricted driver manager
with nvidia cards, so this issue might grow in importance with the release of Gutsy.

Detail:

Examining the xorg.conf files and Xorg.0.log files I saw that the nvidia driver constrained
the resolution by comparing the requirements against a different, conservative, set
of HorizSync and VertRefresh settings--apparently driver defaults. The nv driver had been
using the monitor-returned EDID frequency results and was therefore allowing higher
resolutions.

Further examination of more detailed xorg logs showed that the nvidia driver was
retrieving the EDID frequency data, but just not using it.

Using the strings command on the nvidia X driver I saw the driver had an option called
"UseEDIDFreqs" . I found that the nvidia-xconfig program from the package of the
same name has an option of --use-edid-freqs which inserts the UseEDIDFreqs option into
the xorg.conf file.

Note that this program's advanced help (nvidia-xconfig -A) explains the option and
says that this option will override the HorizSync and VertRefresh ranges given in
the xorg.conf monitors section with the equipment returned EDID data.
I confirmed this through testing.

A Suggested solution:

Have Restricted Drivers Manager add another Option line to the xorg.conf output
when it changes it to use the nvidia driver--

 Option "UseEDIDFreqs" "True"

Sample code change to Restricted Drivers Manager nvidia.py, a one
line change:

=======================================================
--- nvidia.py_orig 2007-10-08 22:32:08.000000000 -0400
+++ nvidia.py_new 2007-10-09 16:34:39.000000000 -0400
@@ -38,21 +38,22 @@
         # compiz does not work otherwise
         self.xorg_conf.getSections('Screen')[0].defaultdepth = 24

 class LegacyNvidiaDriver(NvidiaDriver):
     is_handler = True

     name = "nvidia_legacy"

     def __init__(self, module):
         NvidiaDriver.__init__(self, module, "nvidia-glx-legacy",
- {"AllowGLXWithComposite": "True", "NoLogo": "True"})
+ {"AllowGLXWithComposite": "True", "NoLogo": "True",
+ "UseEdidFreqs": "True"})

     def description(self):
         return _("NVIDIA accelerated graphics driver (legacy cards)")

 class NewNvidiaDriver(NvidiaDriver):
     is_handler = True

     name = "nvidia_new"

     def __init__(self, module):
=========================================================

I tested the option by editing xorg.conf by hand. It worked for me.

I then made the above change to the restricted driver manager and
it successfully allowed the plug and play function of xorg to
enable the proper higher resolutions and set the resolution to the
resolution nv used.

(After the modification was made I used the restricted driver manager
to disable the restricted driver, then used it again to enable the
driver, running the modified code. That's what worked)

Note 1:

While this would help plug and play work with properly working monitors and video
cards, people with equipment returning bad EDID data with the nvidia restricted
driver would still like to override the horizontal and vertical frequencies by
way of the file. I was able to confirm that the nvidia driver will choose the
EDID information over the HorizSync and VertRefresh options in the xorg.conf file.

While plug and play with standards compliant equipment should probably be a priority,
the need to continue to address the needs of those with malfunctioning equipment
should probably continue to be addressed.

Perhaps the new displayconfig-gtk should add the
IgnoreEDID option so the xorg.conf file it produces will override the EDID data.
I confirmed through testing that with the nvidia driver the IgnoreEDID data does
overrule the UseEDIDFreqs option if both are present in the file. Perhaps
the insertion of IgnoreEDID by displayconfig-gtk in the monitor section
would be a good precaution anyway in case there is bad EDID data of other
sorts which might otherwise overrule the contents of the config file.

Note 2:

I'm a newbie and this is my first bug report. Please forgive and correct me
if I've violated any protocol or done anything wrong.

Related branches

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Using displayconfig-gtk already removes UseEDIDFreqs, so Note 1 doesn't apply.

Revision history for this message
Alessandro Polverini (polve) wrote :

I'm experiencing a similar problem.
I've an NVIDIA 8600 and I just installed Gutsy release candidate, these are the problems I find:
 - the card is incorrectly configured as Vesa at low res (800x600 instead of 1280x1024 of my flat panel)
 - if I manually select "nv" driver and set the resolution, it works fine
 - when I switch to proprietary drivers all the settings are lost

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Allessandro:

Thanks for writing.

Well, as I said, I'm new at reporting Ubuntu bugs and at changing xwindows
configurations. I'f you would like to know if it is this same problem there are several
things to do.

What is the vendor and the model of your flat panel?

Which nvidia driver package do you have installed (nvidia-glx-legacy, nvidia-glx, or
nvidia-glx-new?)

What is the result of running sudo get-edid | parse-edid You'll need the read-edid
package to run these commands.

When you are having trouble when running the nvidia driver what does your
/etc/X11/xorg.conf file contain? (Can you attach it here?) What does your
xorg log file contain after trying it? It is usually in /var/log/Xorg.0.log
Could you attach it as well?

If you would rather just do something to fix it that's ok and would probably take
less work than the above. I'd be very happy to try to help you do that (assuming you
haven't found your way past it already.)

There is much help to be found in the other bugs and forum threads, too.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

If vertical and/or horizontal frequencies were specified by debconf, or if the file was edited by hand, note 1 would still apply. Perhaps it would be better if UseEdidFreqs were only enabled if both vertical and horizontal frequencies were omitted.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Here's a suggested patch for the problem. The patch looks for the use of the EDID related options in all the pertinent sections and only adds the option UseEDIDFreqs if none are present and no monitor frequencies are specified. Comments are added to alert the owner that the option should be removed should it be desirable to override the monitor returned frequency values. The option, and the comments, are automatically removed by displayconfig-gtk should the computer owner select new settings.

Revision history for this message
Peter Makowski (petermakowski) wrote :

I have the same problem with my nvidia tnt2 m62 card - nvidia-glx-legacy with Ubuntu Hardy. I can only use those resolutions - 640x480 and 800x600

oponek (oponek-merged)
Changed in jockey:
assignee: nobody → jockey-hackers
Changed in restricted-manager:
status: New → Confirmed
status: New → Confirmed
Changed in jockey:
status: New → Confirmed
status: New → Confirmed
assignee: nobody → jockey-hackers
Revision history for this message
Martin Pitt (pitti) wrote :

Confirming l-r-m task. The best solution would be to get a fixed nvidia driver which just does the right thing without workarounds.

John, thanks a lot for your patch. I'll apply it to jockey and wait for some more tests.

Changed in linux-restricted-modules-2.6.24:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

restricted-manager upstream development has ceased, closing upstream task. I'll keep the Ubuntu r-m task open for the case that we want to fix this in gutsy-updates.

Changed in restricted-manager:
status: Confirmed → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

This seems to be fixed in at least nvidia-glx-new, it defaults to autodetecting EDID. So we only need this code for the legacy driver.

Changed in linux-restricted-modules-2.6.24:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in upstream bzr head.

Changed in jockey:
status: Confirmed → Fix Released
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jockey - 0.2-0ubuntu1

---------------
jockey (0.2-0ubuntu1) hardy; urgency=low

  * New upstream bug fix release:
    - Do not create default handlers for nonexisting kernel modules.
      (LP: #187148)
    - Suppress exceptions (like SIGPIPE) in logging. (LP: #188658)
    - Enable UseEdidFreqs for legacy NVidia driver. (LP: #151141)
    - Set proper window icon. (LP: #187073)
    - Clean up strings in .desktop files (LP: #150205)
    - Fix test suite exit code on success.
    - Do not set AddARGB{,GLX}Visuals options in standard and new nVidia
      handler any more (obsolete).
    - Support hiding of help button if help is not available.
  * tests/oslib.py: Add simple tests for Ubuntu implementation of package
    system query functions.
  * jockey/oslib.py, package_description(): Do not crash when apt-cache show
    succeeds, but prints nothing. This works around apt bug #18306.
    (LP: #186943)
  * tests/oslib.py: Add shallow test cases for {install,remove}_packge() to
    ensure that they won't crash for the simplest reasons. This reproduces
    #186584.
  * jockey/oslib.py: Add missing import of time. (LP: #186584, #186883)
  * jockey/oslib.py, ui_help_available(): Only show help if yelp is present.
    (LP: #186179)
  * debian/rules: Run test suite during build (failure causes FTBFS).

 -- Martin Pitt <email address hidden> Mon, 04 Feb 2008 18:53:26 +0100

Changed in jockey:
status: Fix Committed → Fix Released
Revision history for this message
Peter Makowski (petermakowski) wrote :

I can confirm that the problem is resolved for me.

Changed in restricted-manager:
status: Confirmed → Fix Released
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Working correctly in Hardy Alpha 6. Thank you.

Curtis Hovey (sinzui)
Changed in jockey:
assignee: Registry Administrators (registry) → nobody
Changed in jockey (Ubuntu):
assignee: Registry Administrators (registry) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.