
I should have known better than try to upgrade the video drivers on my Ubuntu box. 3 hours later, its working again but on the upside I learnt something.
It appears that in my efforts to get this working, I managed to get my drivers crossed. One set of drivers were installed using the Ubuntu restricted driver tool, the other drivers I tried were the drivers downloaded directly from Nvidia.
DKMS and kernel modules
It appears the Ubuntu drivers use DKMS, which if your read a little about it is smart stuff. In short, drivers are added as part of /usr/src tree, so that when you install new kernels it can rebuild the drivers automatically for you. The rebuilt drivers are installed into /lib/modules/<kernel version>/updates/dkms.
The Nvidia drivers on the other hand, build and install manually and the driver goes into /lib/modules/2.6.27-14-generic/kernel/drivers/video, which is traditionally where you would expect them.
Fixing up my mess
I played around a little with DKMS, and in the end confirmed that at least for my system there was a clash or problem with libraries and that the DKMS version would not work without significant cleaning up. There is a good LinuxJournal article on DKMS that walks you through adding, building and installing DKMS drivers.
The Ubuntu drivers were version 180.11, the Nvidia drivers were 180.60, so I wanted to use the NVidia drivers anyway. I found that if I did a find on /lib/modules for nvidia.ko, there were two versions, one in kernel/drivers/video, and another in updates/dkms. When I looked at the loaded nvidia driver (lsmod | grep nvidia), it was about 7.8M, which coincided with the nvidia.ko file in the dkms directory. If I loaded the kernel/drivers/video version ( insmod nvidia.ko) it was 10M, and then when I restarted the Gnome Desktop Manager (/etc/init.d/gdm restart) then the video worked. Clearly at boot time, the kernel was finding the dkms version rather than the drivers/video version.
To clean up the various packages, first I had to remove all the nvidia packages that had been installed.
dpkg-query --list | grep nvidia | cut -f3 -d " " | xargs apt-get remove
I then re-ran the Nvidia installer
sh ./NVIDIA-Linux-x86_64-180.60-pkg2.run
I followed the defaults, and now if I do a find on the /lib/modules directory there is only the 10M driver in the drivers/video directory.
After a reboot, Gnome loaded and the machine was again usable. I hope this helps someone else out.
Cheers
Pete

Recent Comments