Local Tech Repair: Ubuntu 11.04 Crash startup after upgrade or update Nvidia drivers

Tuesday, May 31, 2011

Ubuntu 11.04 Crash startup after upgrade or update Nvidia drivers

Recently I upgraded my ubuntu 10.10 laptop with Nvidia drivers to 11.04 ubuntu while upgrading the installer did not really look kindly that I had custom drivers for my GPU. Sense I use nvidia's drivers and not the distributions drivers because I use CUDA on my laptop it just crashes when ever I upgrade or update the kernel for Ubuntu. Though this does make sense because Nvidia does tell us in their documentation that we needed to rebuild the drivers for each kernel that we install. So I will help you walk through how to fix this problem with out having to do a reinstall.

as I stated in my installing cuda on ubuntu 10.10 article we will do some of the same things. To find that article follow this link
http://localtechrepair.blogspot.com/2011/02/installing-cuda-on-ubuntu-1010.html

So the very first thing we can do is just check over some basic things to make sure it is your drivers. Start the computer and go in to the recovery console. Once that is boot up you can go down to drop to shell with networking. Make sure your computer is connected to the internet my wire.

Once your in shell then you will need to connect to the internet.
commands:
sudo dhclient eth0

We then will need to do a few more other things. we are going to make sure that the upgrade did finish properly.
commands:
sudo -i
apt-get update
apt-get upgrade
apt-get check

What this does is makes apt update is records to make sure it has the newest packages in the system. Then it will do is make sure the upgrade is finished or if there is anything wrong it will install more. The third thing is it will make sure there are no broken packages on the system.

After that we should reboot and test if that fixed the problem if it still has not fixed it which it won't if it is a video driver problem. But it is always good to make sure everything is up to date. We will need install the drivers for nvidia for our kernel. So when you reboot go to the recovery console again and then make sure the system is ready for installing the drivers.

(If you do not have the drivers you will need to download them
http://www.nvidia.com/Download/Find.aspx?lang=en-us
I used the beta drivers version 275.09)

step 1
sudo apt-get purge nvidia-*
step 2
sudo gedit /etc/modprobe.d/nvidia-graphics-drivers.conf
then add:
blacklist vga16fb
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidiafb

Step 3
telinit 3
step 4
sudo -i

step 5
cd to location of the drivers aka .run file
step 6 (ls will show you files)
./then_the_driver_name.run
step 7
Reboot

Doing all these steps will make sure that that the nvidia drivers are installed and that there are no conflicts with other drivers on the system. When installing the nvidia drivers I would recommend that you say yes for everything that it asks.

This is a basic repair of the nvidia drivers after an update of the kernel or a system upgrade. Sense if you use Nvidia's drivers from their site they do not auto recompile for each new kernel which requires you to build them each time.

I hope this helps,
local tech repair admin