Difference between revisions of "Module-assistant and nVidia"

From LSDevLinux
Jump to: navigation, search
(Use wiki markup throughout instead of HTML)
(Add info about linux-headers)
Line 7: Line 7:
 
  sudo module-assistant auto-install nvidia
 
  sudo module-assistant auto-install nvidia
  
This does all the work of downloading and installing the right kernel-headers package, building the module as a package, and installing the resulting package. At this point, I can either reboot, or use modprobe to load the module and restart gdm.
+
This does all the work of downloading and installing the right linux-headers package, building the module as a package, and installing the resulting package. At this point, I can either reboot, or use modprobe to load the module and restart gdm.
  
 
Ideally, I want to use module-assistant '''before''' rebooting into the new kernel, because usually I don't notice that there's going to be a problem until '''after''' I reboot, which of course is often a long time after I did the upgrade. Running module-assistant under the old kernel requires you to specifiy the new kernel version as a parameter, like this:
 
Ideally, I want to use module-assistant '''before''' rebooting into the new kernel, because usually I don't notice that there's going to be a problem until '''after''' I reboot, which of course is often a long time after I did the upgrade. Running module-assistant under the old kernel requires you to specifiy the new kernel version as a parameter, like this:
Line 14: Line 14:
  
 
where ''version'' is the version of the new kernel you are installing. It is the same as appears at the end of the name of the <code>linux-image-</code> package, eg <code>2.6.18-4-vserver-686</code>.
 
where ''version'' is the version of the new kernel you are installing. It is the same as appears at the end of the name of the <code>linux-image-</code> package, eg <code>2.6.18-4-vserver-686</code>.
 +
 +
You may sometimes have to install the right linux-headers package manually, or you can leave the <code>linux-headers-2.6-686</code> package installed which will ensure that you always have the latest linux-headers available. This is the counterpart of having the <code>linux-image-2.6-686</code> package installed, which always depends on the latest kernel.
  
 
A nice benefit of using module-assistant is that the kernel module shows up in the list of installed packages, and doesn't cause problems when Debian finally comes up with their own package to match the latest kernel.
 
A nice benefit of using module-assistant is that the kernel module shows up in the list of installed packages, and doesn't cause problems when Debian finally comes up with their own package to match the latest kernel.
  
 
[[Category:Linux tools]]
 
[[Category:Linux tools]]

Revision as of 12:01, 25 February 2008

I've found it a big pain that Debian typically upgrades its kernels without upgrading commonly-used kernel modules at the same time. The result is that I have only a text login after the next reboot. Now I've found a relatively painless solution that works well every time.

A general upgrade through the package manager will install a new kernel automatically, even though I have kernel modules installed that are not being upgraded, and which won't work with the new kernel. The problem is usually with the nVidia kernel module, and the nVidia driver in the X server (Xorg) requires the kernel module in order to function, so the X server consistently gives up with an error, and gdm is disabled.

The solution, I've found, is to use module-assistant to rebuild the module from source every time I have a kernel upgrade. The command is simple:

sudo module-assistant auto-install nvidia

This does all the work of downloading and installing the right linux-headers package, building the module as a package, and installing the resulting package. At this point, I can either reboot, or use modprobe to load the module and restart gdm.

Ideally, I want to use module-assistant before rebooting into the new kernel, because usually I don't notice that there's going to be a problem until after I reboot, which of course is often a long time after I did the upgrade. Running module-assistant under the old kernel requires you to specifiy the new kernel version as a parameter, like this:

sudo module-assistant auto-install -l version nvidia

where version is the version of the new kernel you are installing. It is the same as appears at the end of the name of the linux-image- package, eg 2.6.18-4-vserver-686.

You may sometimes have to install the right linux-headers package manually, or you can leave the linux-headers-2.6-686 package installed which will ensure that you always have the latest linux-headers available. This is the counterpart of having the linux-image-2.6-686 package installed, which always depends on the latest kernel.

A nice benefit of using module-assistant is that the kernel module shows up in the list of installed packages, and doesn't cause problems when Debian finally comes up with their own package to match the latest kernel.