Cannot logon after using Screens and Graphics program with nvidia-glx-legacy driver

Bug #153800 reported by John S. Gruber
12
Affects Status Importance Assigned to Milestone
Jockey
Invalid
High
Unassigned
displayconfig-gtk
Invalid
Undecided
Unassigned
displayconfig-gtk (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: displayconfig-gtk

Cannot logon after installing xgl (xserver-xgl) under the circumstances below.

Those with NVIDIA legacy graphics devices running the proprietary nvidia-glx-legacy driver with Xgl cannot login once they have used the Screens and Graphics program to make any kind of change.

(I believe those with these devices who wish to run compiz must run Xgl)

Unfortunately bulletproof-x is not started.

Related to bug 91064 because Xgl uses gl through xorg and the proprietary nvidia drivers. Since gdm doesn't use glx there is no problem until after login.

Another possible symptom:
Option "AddARGBGLXVisuals" "True" is also removed by the Screens and Graphics program, so windows borders may disappear. I don't have a recent nvidia card so I can't test this; it's only a suspicion.

Additional Information

In response to bug 91064 the above Option AllowGLXWithComposite line is added to xorg.conf in the nvidia driver of the restricted-manager for legacy nvidia devices. When anything is changed by the Screens and Graphics program that program uses displayconfigabstraction.py in guidance-backends to change the xorg.conf file. When it does so it drops the option above because it basically creates a brand new device section in that file.

The following test reveals the problem Xgl is having when one can't log on:

sudo /usr/bin/Xgl vt9 :21

Fatal server error:
no GLX visuals available

If not running Xgl the problem manifests itself by discontinuing the ability to run glx program. Running glxgears gives the following message:

glxgears
Xlib: extension "GLX" missing on display ":0.0".
Error: couldn't get an RGB, Double-buffered visual

This is because:

xserver-xorg's Xorg.0.log reports:
(EE) GLX is not supported with the Composite extension

I'm reporting this as a problem with guidance-backend, but another way to address this problem would be for restricted manager to set this option (as well as NoLogo and ARGBGLXVisuals) in the screen section rather than in the device section since that isn't recreated by displayconfigabstraction.py

Confirmation:

sudo dpkg-reconfigure -phigh xserver-xorg

System->Administration->Restricted Drivers Manager

Enable the proprietary driver and close

Confirm that the option Nolog and either AllowGLXWithComposite or AddARGBGLXVisuals is now part of the device section of /etc/X11/xorg.conf

System->Administration->Screens and Graphics
Change the monitor type and press ok

Confirm that the options have been removed from the device section of
/etc/X11/xorg.conf

If using nvidia-glx-legacy try to logo on.

To recover from this using nvidia-glx-new or nvidia-glx run:

sudo nvidia-xconfig -c /etc/X11/xorg.conf --allow-glx-with-composite --no-logo --add-ARGB-GLX-Visuals
(I understand that the last option is valid with this configuration's nvidia-xconfig)

or, if running a nvidia-glx-legacy, run from a console or failsave gnome session:

sudo nvidia-xconfig -c /etc/X11/xorg.conf --allow-glx-with-composite --no-logo

and logon normally. nvidia-xconfig moves these options, whether new or whether it is adding them, to the session section of the xorg.conf file, where they will be safe from the Screens and Graphics program in the future.

The legacy driver is not harmed by having the AddARGBGLXVisual option included--it only produces a warning.

This is only my second bug report so please forgive and correct me if I'm reporting this incorrectly.

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

Attached is a patch to restricted-manager to put the options needed for Xgl and compiz in the screen section of xorg.conf so that displayconfig-gtk won't overwrite them. It seems to me that it is probably better for displayconfig-gtk to own the device section rather than have both it and restricted-manager try to manage the section's options. While displayconfig-gtk may add to the screen section, it seems to leave already existing options alone. In contrast, as mentioned, displayconfig-gtk creates a totally new device section when it makes a change. The nvidia-xconfig command circumvention above works for the same reason.

The allowglxwithcomposite option shouldn't hurt the newer nvidia versions (nvidia-glx and nvidia-glx-new) and the other options that are understood by the new versions are ignored by the old one (nvidia-glx-legacy). Therefore it should be safe to add them all at once in the nvidiadriver class rather than add individual enable_config_hook methods to the -new and -legacy driver classes. While the patch takes the simplification of simply altering the first screen section the existing code is already making the same choice.

Since the patch is for restricted-manager I took the liberty of adding that project to the bug report.

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

Whoops, that was the whole patched file, not the diff. Here's the diff file.

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

I tried this with Hardy alpha 6. While the problem isn't fixed (displayconfig-gtk still messes
up xorg.config, which stops xgl and compiz from working) the problem is less severe. The
xserver does start now, despite the absence of the option mentioned above.

Revision history for this message
Martin Pitt (pitti) wrote :

John, in bug 211752 it was determined that AddARGBGLXVisuals is not even known to the legacy driver. Can you please check this on the latest hardy and verify which of the options are really needed, and make your system work properly? Thank you!

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

Martin, thanks for replying.

As noted in the patch I proposed, the nvidia-legacy driver doesn't use AddARGBGLXVisuals. Bug 211752's report is correct.

 For my system, using nvidia-legacy with glx,
AllowGlXWithComposite True
 and
USEEDIDFreqs True
 are the needed clauses

AllowGLXWithComposite is the option to avoid the symptoms mentioned in this bug. USEEDIDFreqs is needed to
get the legacy driver to use the full bandwidth of any attached monitor to provide higher screen resolutions.

The nologo option avoids an ugly transition with a split second of torn nvidia logo.
From research last fall, I believe AddArgbVisuals is only a long-lived typo.

Unknown options are ignored with a warning in nvidia drivers, as noted in bug 211752 and bug 138220, so
I didn't individualize screen options in my proposed patch. I see it is now much easier to do that.

I looked at the latest code with the fix for 211752 and it looked like it wouldn't break anything. Then
I tested it today. Though I had to patch for new bug 215027, it then worked fine with my video card.

I see that displayconfig-gtk is gone or hidden. If it is permanently gone is it time to close this bug with no action?

In any case I'd like to help out by testing anything you need with my old (I mean legacy) video card. Please
let me know if I can be of any assistance.

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

For the record, nvidia-legacy also requires the installation of xserver-xgl.

My research last Fall indicated that AddARGBGLXVisuals (not AddArgbVisuals) is needed for newer nvidia drivers.

Martin Pitt (pitti)
Changed in jockey:
assignee: nobody → pitti
importance: Undecided → High
status: New → In Progress
Martin Pitt (pitti)
Changed in jockey:
assignee: pitti → nobody
status: In Progress → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote : displayconfig-gtk is deprecated

Thank you for reporting this bug and for your efforts to make
Ubuntu better. As Xorg has improved this past year, an unfortunate side
effect of these improvements is that it has rendered several design
assumptions in displayconfig-gtk obsolete. So, starting with Hardy we
are no longer putting displayconfig-gtk forth as a primary configuration
tool, and are putting our development focus into the Screen Resolution
applet. As a result, we do not plan to fix this bug and thus are closing
it.

For more background on this change, please see this page:
https://wiki.ubuntu.com/X/DisplayConfigGtk

Changed in displayconfig-gtk:
status: New → Won't Fix
dino99 (9d9)
Changed in displayconfig-gtk:
status: New → Invalid
Changed in jockey:
status: Confirmed → Incomplete
status: Incomplete → Invalid
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.