Wednesday, April 15, 2009

Tip: Fixing NVIDIA mismatched kernel module on Debian

I've installed Debian 5 Lenny a few day ago and imagine my surprise when yesterday I decided to update it and came across a broken Xorg.

Upon boot X11 didn't load and presented the following error message:
Failed to load the NVIDIA kernel module!
One of the updated packages was the Linux kernel, so I suspected that the problem was with the NVIDIA package and a mismatched Linux kernel.

I had nvidia-kernel-2.6.26-1-686 installed and the new kernel was 2.6.26-2-686 so I needed a matching NVIDIA kernel module.

So here are the steps that I took to fix things up:
  1. # aptitude search ~i~nvidia
  2. # aptitude update
  3. # aptitude purge nvidia-glx
  4. # aptitude install nvidia-kernel-2.6-686
  5. # aptitude install nvidia-glx
  6. # /etc/init.d/gdm restart
On step 1 let's us check exactly what we have installed related with nvidia. Next we update the apt's database and proceed removing the nvidia-glx on setp 3.

With steps 4 nvidia-kernel-2.6.26-2-686 and nvidia-kernel-common are pulled in and you'll be syncronized with the installed Linux kernel.

The nvidia-glx package is installed in step 5 and finnally gdm (replace gdm by the login manager you are using) is restarted bringing X11 back online.

And we're done. Bloodly kernel upgrades ;)

No comments: