My computer booted to a black screen after upgrading from 12.04 to 12.10. Now I have a very simple question:
What can I do to prevent this from happening the next time I upgrade Ubuntu to another version?
My computer booted to an unresponsive black screen with a blinking cursor after upgrading from 12.04 to 12.10. Here is a long involved saga of reinstalling Nvidia drivers resulting in a happy return of the graphical interface. I'd like to prevent this pain during the next upgrade. How can I do it?
Here is what I know and what I tried.
I can boot into recovery mode and get to a terminal prompt.
I have an Nvidia graphics card as shown here:
$ lspci | grep -i nvidia 02:00.0 VGA compatible controller: nVidia Corporation G98 [Quadro NVS 295] (rev a1)
I have downloaded NVIDIA-linux-x86_64-331.67.run which I believe to be the correct driver. I have a 64-bit system.
Running that resulting in issues with the Nouveau kernel driver. These seemed to be solved by running
sudoedit /etc/modprobe.d/nvidia-graphics-drivers.confand filling it with this:
# This file was installed by nvidia-current-updates # Do not edit this file manually blacklist nouveau blacklist lbm-nouveau blacklist nvidia-173 blacklist nvidia-96 blacklist nvidia-current blacklist nvidia-173-updates blacklist nvidia-96-updates alias nvidia nvidia_current_updates alias nouveau off alias lbm-nouveau off
Rerunning NVIDIA-linux-x86_64-331.67.run results in an error saying that the compiler used to compile the kernel gcc 4.6 does not match the current compiler. Answering "no" to this question seems to continue the installation. What the hell? I said no. This results in another error "unable to find kernel source tree".
"Installation has failed"
OK, is this fixable or is it time to bail out and install Linux fresh from a live CD?
Soldiering on per the instructions here.
sudo nvidia-settings --uninstallThis resulted in an error message that there was no such option as
--uninstall. I was not able to find any uninstall option in
nvidia-settings --helpso I ignored it.
sudo apt-get remove --purge nvidia*
sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv
I ran the following commands.
sudo apt-get install nvidia-common sudo apt-get install xserver-xorg-video-nouveau
unmet dependencies depends xserver-xorg-core recommends libg11-mesa-dri sudo apt-get install xserver-xorg-core libg11-mesa-dri
unable to locate package libg11-mesa-dri sudo apt-get install xserver-xorg-video-nouveau
unmet dependencies depends xserver-xorg-core recommends libg11-mesa-dri Unable to correct problems - you have held broken packages
Ignoring this, I tried:
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
It looks like this worked. Ubuntu 12.10 is back at a graphical interface.