Archive for July, 2009
I recently ran into a problem with my proprietary nvidia video driver on Ubuntu Linux 9.04. It seems that there was a conflict between the driver I downloaded directly from http://www.nvidia.com/Download/index.aspx?lang=en-us and the driver installed by Ubuntu’s restricted driver manger (found on the gnome System menu under Administration | Hardware Drivers). The problem was that the kernel module API installed by Ubuntu did not match the driver installed by the installer I downloaded and the end result was that my screen was completely black/blank and no tty’s worked so pressing Ctrl+Alt+F[1-6] wouldn’t take me to a terminal. (Executing dmesg at a command prompt would show messages indicating that there was an API mismatch. This message would also be shown by running “startx” at the command prompt.)
Simply pressing the power button once was sufficient to get Ubuntu to gracefully shutdown the machine, thankfully. After powering back up I selected the recovery item on the grub boot menu to boot into a root console. If you don’t have a recovery menu item then add “single” (without the quotes) to the kernel command line in the grub menu and boot from there. From the root console I did three things: I uninstalled the nvidia drivers that I manually installed earlier (that broke my system), I unloaded the nvidia kernel module, and then I manually searched for and removed all nvidia kernel modules.
Uninstalling the nvidia drivers I installed manually was easy. All I had to do was run “
nvidia-installer --uninstall”. I got a waring because I was running in single user mode so I had to tell the installer to proceed anyway and it worked fine. You will also get an error if X is running. To terminate X you need to kill gdm by executing “
/etc/init.d/gdm stop” as root, however it should not be running if you booted into the recovery console.
Unloading the nvidia kernel module was easy. Simply execute “
rmmod nvidia” as root.
Searching for and removing all nvidia kernel modules was tedious, but also easy. This procedure is not the ideal solution, but I had no working video or networking and had to take relatively drastic measures. First I had to find all the drivers. I did this by executing “
find / -type f 2> /dev/null | grep -i nvidia | grep -i \\.ko” as root. This generated output similar to this:
Then I manually removed each kernel module by using the “
rm -f <pathname_of_file>” command.
Finally I reran the nvidia installer, did a full install of the video driver, and then rebooted the machine by executing the “
reboot” command as root. When the machine finished booting I had video back and all was well in my world again.