kernel updates ALWAYS breaks video drivers

Bug #577566 reported by Douglas Moyes
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: apt

Whenever APT or the auto-updater updates the kernel, it always breaks the video drivers (specifically nvidia). This can be problematic to fix, especially if Ubuntu screws up your screen resolutions (ubuntu 8.04), and will require some knowledge to fix even after the video drivers have been reinstalled...

This is very troublesome to me as I'm am about to ship out a new computer to a customer with Kubuntu reinstalled.

How to fix:

1. Do not update the kernel by default when upgrade is run, add an extra update-kernel parameter.
2. Before updating the kernel, post a big caveat that it could break video drivers when upgrading.
3. If the kernel is reinstalled, the video drivers should be reinstalled as well (or, kernel and video drivers need to be released at the same time, with the kernel update occurring first).

This is extremely problematic for those of us who also offer support for new systems, and have to deal with broken video drivers. Just fix it now. Quick hack to apt-get and auto-updaters that require the user to explicitly state they wish to update the kernel, and print a warning with confirmation dialogue before updating the kernel until a better solution can be found to automatically fix drivers and other software that could be affected by a kernel update.

Okay, now back to boxing up this brand new windows-free system for a customer....

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: apt 0.7.25.3ubuntu7
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sat May 8 12:27:04 2010
InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
ProcEnviron:
 LANGUAGE=
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apt

Revision history for this message
Douglas Moyes (aragorn-stellimare) wrote :
Revision history for this message
Sven Kalinowski (info-svenkalinowski) wrote :

could this be a duplicate of Bug #575997 ?

Revision history for this message
Douglas Moyes (aragorn-stellimare) wrote :

No, that relates to kernel headers. The kernel headers were fine, and were current enough for the nvidia factory drivers to accept them for building a new video kernel module.

Re-installing the nvidia-current package, and even watching it say "compiling kernel module" still did nothing. Had to download the factory drivers and instruct my customer that, should they ever have a problem after an update, to kill kdm/gdm, and re-run the nvidia driver install utility. This suggests that also the nvidia install scripts are broken as well, or tied to a specific kernel version.

i'm happy to say that I no longer have to remove any exisiting nvidia modules for the nvidia driver to install properly, which i had to do in the past because the wrong kernel module would load.

Irregardless, the kernel headers are only needed when building a new drivers, but, when the new kernel loads, headers or not, the video driver gets broken.

If the kernel gets updated, there needs to be some kind of check to see if modules need to be reinstalled/rebuilt... like, instead of just a "dependency" have a "co-dependency" such as, if this package gets changed/updated, then these need to as well. From a distribution stability standpoint, any "co-dependent" packages would need to be updated for the new kernel before the kernel could be considered stable to release into the wild for automatic updates.

Revision history for this message
Philip Muškovac (yofel) wrote :

The driver and kernel packages have a check to make sure the drivers get rebuilt on a kernel/driver update using dkms. If the module didn't get rebuilt then something went wrong, but this has nothing to do with apt.
As for the drivers from the nvidia site: they are only built for the current kernel and have to be rebuilt by hand every time you update your kernel. (That's one of the reasons why you're not supposed to use them, other than the fact that we don't support them.)

Revision history for this message
Torsten Spindler (tspindler) wrote :

I do not believe apt is the correct package for this problem, if the nvidia drivers do not get rebuild upon a kernel update the fault might be at jockey. I will change the package accordingly

affects: apt (Ubuntu) → jockey (Ubuntu)
Revision history for this message
Douglas Moyes (aragorn-stellimare) wrote :

Well, what happens is, even when re-installing the kernel drivers the scripts mention the driver is being rebuilt, but it never gets installed in the proper place. It could possibly be a fault in the package it's self (old kernel version number got saved in some .config file maybe?).

In any case, the only fix I've found was to download the drivers direct from nVidia and run their install script with gdm stopped.

And that guy loves his new Ubuntu computer. Woo Hoo!

Revision history for this message
Alberto Milone (albertomilone) wrote :

First of all, the installer from Nvidia's website is not supported (as it can break the system that we use in Ubuntu) and whenever a kernel is updated you will have to rebuild the module manually.

Using only Jockey and Ubuntu's packages should work, provided that the metapackage for your kernel headers (e.g. linux-headers-generic) is installed as you will update the headers when you receive a kernel update. Also, installing the nvidia package without enabling the driver will result in a failure.

I'm unable to help you with this problem because:
1) you don't seem to have a clean system any more (as you used the nvidia installer)
2) you didn't provide any logs which could help debugging (such as the output of dmesg, Xorg.0.log, etc.). For future reference, filing a bug report by typing the following command includes (most of) the relevant information: "ubuntu-bug nvidia-current"

As a result, I'm marking this bug report as Incomplete. Of course, should you want to do a clean installation of Ubuntu and to try to reproduce the problem, I'd be glad to help you through the debugging process.

Changed in jockey (Ubuntu):
status: New → Incomplete
affects: jockey (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Revision history for this message
Douglas Moyes (aragorn-stellimare) wrote :

Unfortunately that system has already been shipped. It'll be some time before I get around to doing a clean install on any of my existing systems.

Regardless, the system had a clean install at first, and when the update utility was allowed to upgrade the system (including the linux kernel header files), the video stopped working. Also, when the system had a clean install, the nvidia package claimed the driver was being built, but it still didn't update the current kernel.

The supported drivers do not work well with nVidia cards, and offer a very limited (800x600) resolution which is unacceptable.

So there you go. The problem is most likely in the package's build process. I'm sure any log files would tell you something similar.

nVidia was the first of the major 3d accelerated video card manufacturers to support linux with stable drivers, ATI came later. Even still, nVidia will remain a favorite among many Linux users, and not supporting the drivers is foolish. While old time linux users won't have much of a problem working around that, newer Linux users will be completely lost and will be scratching their heads wondering why their video stopped working (which is also what happened with my client when the update utility decided it was time to update the kernel again).

If anything, a simple fix would be to disable auto-updates of the kernel by default. If a system works, there is generally no reason to update the kernel.

Dist-upgrade to 10.4 from 9.10 on my notebook resulted in breaking my wifi card. reverting back to the older kernel fixed everything. Just an example (it's a RaLink card). But that's for another bug.

Bryce Harrington (bryce)
tags: added: kubuntu
Revision history for this message
Scribe63 (scribe63) wrote :

I am using Ubuntu 10.04 (64 bit), and at this point in time i am experiencing this issue with the "nvidia" drivers every time there is a kernel update. Mind you, i am using the lucid nvidia-current package, as oppose the the installer from Nvidia's website.

A kernel update from 2.6.32-25-generic to 2.6.32-26-generic was just released, and i did so. Upon reboot, poof, no GUI.

---From Xorg.1.log
(EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
(EE) NVIDIA: system's kernel log for additional error messages.
(II) UnloadModule: "nvidia"
(II) Unloading /usr/lib/xorg/extra-modules/nvidia_drv.so
(EE) Failed to load module "nvidia" (module-specific error, 0)
(EE) No drivers available.

Fatal server error:
no screens found

Please consult the The X.Org Foundation support at http://wiki.x.org for help.
Please also check the log file at "/var/log/Xorg.1.log" for additional information.

ddxSigGiveUp: Closing log

I get th above error, and the prompt follows, about reconfiguring this and that and the other, is absolutely useless at this point.

When the kernel update is installed, it's corresponding headers are not being installed at the same time. So there fore upon reboot dkms fails to rebuild the module and X fails.

From /var/log/messages
Nov 24 11:01:00 ptah dkms_autoinstaller: nvidia-current (195.36.24): Installing module on kernel 2.6.32-26-generic.
Nov 24 11:01:00 ptah dkms_autoinstaller: Kernel headers for 2.6.32-26-generic are not installed. Cannot install this module.
Nov 24 11:01:00 ptah dkms_autoinstaller: Try installing linux-headers-2.6.32-26-generic or equivalent.

I have to go to the command line and manually install the headers, in my case the linux-headers-2.6.32-26-generic package, as oppose to the linux-headers-2.6.32-26 package. Then re-install the nvidia-current package, which rebuilds the nvidia module for the current kernel.

Nov 24 23:48:23 ptah dkms_autoinstaller: nvidia-current (195.36.24): Installing module on kernel 2.6.32-26-generic

On another note:
What makes this worst also, is that if you are using Network Manager to manage you network connections, you would also not have any network access. It seems that for it to automatically work, you have to be logged into gnome.

It is sad to have to be still doing this at this point in time, and i assume a new user would be totally clueless.

On debian (lenny), kernel updates keeps the same name and or does something to avoid this kind of issue with the 'nvidia' driver.

Don't know if this was fixed for maverick, if so, then what is the point of using an LTS desktop. The 6 month update cycle keeps breaking hardware compatibility.

Is there some kind of procedure to avoid this that i am unaware of.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nvidia-graphics-drivers (Ubuntu) because there has been no activity for 60 days.]

Changed in nvidia-graphics-drivers (Ubuntu):
status: Incomplete → Expired
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.