Monday, 4 April 2011

Nvidia drivers fail without 'smp_lock.h'

If you install a very recent kernel from, and then try to install the NVIDIA graphics drivers, you may find that the driver install fails. The NVIDIA installer actually compiles the drivers against your kernel source tree, but recent kernels seem to have dropped a file that's called 'smp_lock.h'. Unable to find this file that it expects to have, the NVIDIA driver compile process fails.

A quick and dirty solution that worked for me was to simply locate 'smp_lock.h either under /usr/include/linux, or in an old kernel source tree, and drop it into the include/linux directory of your new kernel source tree. If you can't get a copy of a the file, then try making an empty file with the same name, I think even that will probably work. You should then find that the NVIDIA install process gets by that hurdle at least. It worked for me!

1 comment:

  1. Thanks! Just ran into this problem. When upgrading my kern, first tried nouveau drivers, which didn't work and then proprietary drivers failed to compile. Your average day as Linux admin - another day, another change in kernel.