Linux: NVidia drivers break with 2.6.9 kernel

This afternoon, I recklessly did an apt-get dist-upgrade on my desktop system. Something I should have previously learned not to do, since it’s broken a few things on me before. This time, after rebooting, the X server wouldn’t load. This has happened before, somehow the binary Nvidia kernel module would get hosed and I’d simply re install it. Only this time that didn’t work. I figured, heck if my system is broken, might as well upgrade my kernel from 2.6.5 to 2.6.9. That part was very easy:

  1. download new kernel source
  2. make oldconfig to use my running kernels options
  3. make-kpkg kernel_image
  4. make-kpkg modules_image
  5. install images and reboot

Unfortunately, nvidia module would not cooperate. Turns out the new kernel doesn’t play so well with the driver, LKML: Sid Boyce: RE: 2.6.9-rc2-bk4 Unknown symbol __VMALLOC_RESERVE but since the source is available, it wasn’t too difficult to fix and recompile:

There is a recent post with details of what’s needed for the nvidia
driver to compile and work. Links to patched are included. For that one,
put as the first line in nv.c
unsigned int __VMALLOC_RESERVE;

All in all, this wasn’t as much of a time sink as it could have been. I’ve spent/lost hours before tinkering with the kernel, nvidia drivers, ALSA but this time it only took me 45 minutes to get back to a working system.