Ubuntu

Changes xorg.conf when driver installation fails, no warning

Reported by inneas on 2009-10-14
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
jockey (Ubuntu)
High
Martin Pitt
Karmic
High
Martin Pitt
Lucid
High
Martin Pitt

Bug Description

Because of a bug in the nvidia-180 package the installation of the driver with jockey failed (https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-180/+bug/450493) but i didn't get an error message when installing the driver with the jockey-gtk.

I think jockey had been able to recognize that the installation wasn't completely done, cause there are some error messages in the jockey.log:

Setting up patch (2.5.9-5) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

2009-10-13 13:37:47,669 ERROR:
Error! Invalid number of arguments passed.
Usage: add -m <module> -v <module-version>

2009-10-13 13:37:47,837 WARNING: modinfo for module nvidia failed: ERROR: modinfo: could not find module nvidia

2009-10-13 13:37:47,914 DEBUG: XorgDriverHandler device sections ({0: ['\tIdentifier\t"Default Device"\n', '\tDriver\t"nvidia"\n']})
(https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-180/+bug/450493/comments/4)

There should been at least a warning, better an option to fall-back to the actually working, installed driver.

I think in case of future bugs in driver-packages, users with no experience aren't able to boot to console and edit xorg.conf to make their system boot able again.

ProblemType: Bug
Architecture: i386
CheckboxSubmission: 4d2d0a0a0792a0b9fa942aa82fdaa6d9
CheckboxSystem: d00f84de8a555815fa1c4660280da308
Date: Wed Oct 14 16:07:29 2009
DistroRelease: Ubuntu 9.10
MachineType: Dell Inc. Inspiron 1720
NonfreeKernelModules: nvidia
Package: jockey-gtk 0.5.5-0ubuntu1
PackageArchitecture: all
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-14-generic root=UUID=e7d84e81-7c96-4c6c-a44c-ef9d34c7fc0c ro quiet splash
ProcEnviron:
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.46-generic
SourcePackage: jockey
Uname: Linux 2.6.31-14-generic i686
XsessionErrors:
 (gnome-settings-daemon:2094): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2094): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2204): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2194): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
dmi.bios.date: 02/03/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A07
dmi.board.name: 0UK437
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA07:bd02/03/2008:svnDellInc.:pnInspiron1720:pvr:rvnDellInc.:rn0UK437:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Inspiron 1720
dmi.sys.vendor: Dell Inc.

inneas (inneas) wrote :
Marco Cimmino (cimmo) wrote :

Very nice, tried to install nvidia driver via jockey, failed but it decided that was good to change xorg.conf anyway ending up in screwed X.
Is this usability? Is this for newbie users?

Bryce Harrington (bryce) wrote :

This seems quite serious if it is true, and could explain why so many people are installing nvidia, rebooting, and finding things fail to work. Pitti, mind looking into this one? If it is not erroring out properly, maybe this needs an SRU...

Changed in jockey (Ubuntu):
importance: Undecided → High
Martin Pitt (pitti) wrote :

Plan of action for immediate and SRUable mitigation:

 - Check if matching kernel headers are installed; if not, install them along
 - After building package, check that nvidia module is available; if not, abort.

Changed in jockey (Ubuntu Lucid):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Changed in jockey (Ubuntu Karmic):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
Bryce Harrington (bryce) wrote :

Martin, one twist to think about...

I think dkms may only be building nvidia.ko for the *current* kernel, I think in most situations that should be fine, but if the user has installed a new kernel (as in an upgrade) but has not yet rebooted at the time they run jockey, it may be possible for nvidia.ko to be built fine... just against the wrong kernel. So jockey would not see any errors in this case, but still the reboot would fail to bring up X.

So one idea would be to cause the nvidia.ko to be built against additional kernels. Having it build against all kernels with header files installed would be easiest, however if the user has a lot of old kernels present that could be excessive and make upgrade take much longer than necessary. So maybe limit it in some fashion to just the 5 most recent kernels or something. Certainly if there are any kernels installed that are *newer* than the currently running kernel, that should be a flag that the upgrader has more work to do. Thoughts?

Martin Pitt (pitti) wrote :

Bryce,

shouldn't the dkms init script cope with exactly this case? I thought that was the very purpose of this?

Martin Pitt (pitti) on 2009-11-09
summary: - [jockey] Missing warnings in case of broken driver installation
+ Changes xorg.conf when driver installation fails
Martin Pitt (pitti) on 2009-11-09
summary: - Changes xorg.conf when driver installation fails
+ Changes xorg.conf when driver installation fails, no warning
Martin Pitt (pitti) wrote :

I replicated this by purging linux-headers-2.6.31-15-generic and installing linux-headers-2.6.31-15-server. I confirm that when enabling nvidia, I (1) get no warning (confusing), the driver appears as disabled (which is actually correct), and (2) it modifies xorg.conf to point to the new driver (very bad).

(1) is fixed in http://bazaar.launchpad.net/%7Ejockey-hackers/jockey/trunk/revision/581
(2) is fixed in http://bazaar.launchpad.net/%7Ejockey-hackers/jockey/trunk/revision/579

With those two fixes applied, xorg.conf stays how it is, and I get an error message:

   -----------------------------------------------------------
   Sorry, installation of this driver failed.

   Please have a look at the log file for details: /var/log/jockey.log
   -----------------------------------------------------------

This introduces two new strings. If the SRU team thinks that this is not appropriate, I'm fine with not applying this change to the karmic-updates package, but I think an English error might be better than not having any warning at all.

The log file has the entire output of apt, including

  Richte nvidia-185-kernel-source ein (185.18.36-0ubuntu9) ...
  Loading new nvidia-185.18.36 DKMS files...
  First Installation: checking all kernels...
  Building for architecture x86_64
  Module build for the currently running kernel was skipped since the
  kernel source for this kernel does not seem to be installed.

It's unfortunately buried amongst a lot of other noise, but it's very close to the bottom of the file. Grabbing the error message from apt and passing it from the d-bus backend to the frontend will require a much more intrusive fix which I don't recommend for an SRU.

Martin Pitt (pitti) wrote :

Finally, http://bazaar.launchpad.net/%7Eubuntu-core-dev/jockey/ubuntu/revision/376 does the best-effort installation of linux-headers-*.

With this version, it installs the nvidia driver correctly when I previously only had the -server headers installed.

Changed in jockey (Ubuntu Lucid):
status: In Progress → Fix Committed
Martin Pitt (pitti) wrote :

Uploaded to karmic-proposed, awaiting review from SRU team.

Accepted jockey into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in jockey (Ubuntu Karmic):
status: In Progress → Fix Committed
tags: added: verification-needed
lunkwill (launchpad-lunkwill) wrote :

I suspect there's another bug, but perhaps not in jockey. I installed linux-headers-generic-pae and did a

dpkg-reconfigure nvidia-185-kernel-source

But I got the "Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed" error (even though the headers were there). As the earlier poster commented, I had to

apt-get remove --purge linux-headers-2.6.31-15

And then, when I did an

apt-get install linux-headers-2.6.31-15-pae

it automatically rebuilt (successfully) the nvidia.ko.

lunkwill (launchpad-lunkwill) wrote :

Update: I think that's a false alarm. I installed the 2.6.31-15 headers but the -14 kernel.

J Bruni (jbruni) wrote :

I am using Kubuntu 9.10, and just applied the most recent updates suggested by KPackageKit.

It installed "linux-headers-2.6.31-15" among other packages.

When rebooting, the beautiful login screen did not appear. Instead, an error message regarding the screen dimensions appeared, and I could only access the system in the command-line interface.

Then, I ran "sudo shutdown -r now"...

In the GRUB menu, there are new options for the "2.6.31-15" kernel (including the new default). I had to manually select "2.6.31-14", and fortunately the "beautiful login screen" appeared, and here I am, using the KDE interface.

I am an intermediate user - not an absolute newbie, but also not an experiencied user. Anyway, this situation is not "comfortable": I simply accepted the updates suggested by KPackageKit, and the result is that my system does not boot nicely as before...

As I have nVidia drivers installed, and the error message mentions screen size, and I found this bug in Launchpad, I am reporting this here - I hope I am in the right place...

Please, if possible, help me by telling me what should I type in the command-line to "fix" the "2.6.31-15" boot, to make it start X-server + KDE normally. Also, help me to provide more information - I don't know what other information should I be including here, so you can have more resources to help me.

Thanks!

raduv (raduv) wrote :

I am having the same problem with my ATI card ... I have a 2.6.31-15 kernel and let jockey install the drivers and after I rebooted, it crashed. Any ideas how I can fix this? I know that xorg.conf is missing in karmic, so probably that's why I get "Fatal server error: no screens found", but still ...

Martin Pitt (pitti) wrote :

Fixed in lucid:

jockey (0.5.5-0ubuntu3) karmic-proposed; urgency=low

  * Merge bug fixes from trunk:
    - xorg_driver.py, enable(): Do not mangle xorg.conf if module is not
      available after package installation. (LP: #451305, part 1)
    - ui.py, set_handler_enabled(): Give an error message pointing to the log
      file if driver installation fails. (LP: #451305, part 2)
  * data/handlers/{fglrx,nvidia}.py: Override enable() method to first try and
    install the corresponding kernel headers for the current kernel, to
    eliminate a common reason for driver installation failure.
    (LP: #451305, part 3)

 -- Martin Pitt <email address hidden> Mon, 09 Nov 2009 14:30:34 +0100

Changed in jockey (Ubuntu Lucid):
status: Fix Committed → Fix Released
J Bruni (jbruni) wrote :

For those who reached this page having the same problem described in my previous comment above (# 13)...

The solution was as easy as type the following at the command-line (I did it after booting to the command-line selecting the newest kernel option in GRUB):

sudo dpkg-reconfigure xserver-xorg

Once we have the information, it is so easy!

Thanks.

Martin Pitt (pitti) wrote :

I just tested the karmic-proposed jockey on my wife's computer (ATI card), and confirm that it still works as intended.

This update fixes a lot of situations where jockey previously rendered the system X-less, thus I feel it should go to -updates now.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jockey - 0.5.5-0ubuntu3

---------------
jockey (0.5.5-0ubuntu3) karmic-proposed; urgency=low

  * Merge bug fixes from trunk:
    - xorg_driver.py, enable(): Do not mangle xorg.conf if module is not
      available after package installation. (LP: #451305, part 1)
    - ui.py, set_handler_enabled(): Give an error message pointing to the log
      file if driver installation fails. (LP: #451305, part 2)
  * data/handlers/{fglrx,nvidia}.py: Override enable() method to first try and
    install the corresponding kernel headers for the current kernel, to
    eliminate a common reason for driver installation failure.
    (LP: #451305, part 3)
 -- Martin Pitt <email address hidden> Mon, 09 Nov 2009 14:30:34 +0100

Changed in jockey (Ubuntu Karmic):
status: Fix Committed → Fix Released
Bevor (bugs-devgems) wrote :

Happens in Lucid 64bit again.
After editing xorg, the whole X server is screwed because of jockey. I can't use the nvidia drivers anymore. It seems that xorg.conf has been suddendly deleted!

Bevor (bugs-devgems) wrote :

additional:
When I reboot with the latest kernel, active nvidia with jockey, reboot again, then nvidia works again.

Changed in jockey (Ubuntu Karmic):
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers