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.

  1. I can boot into recovery mode and get to a terminal prompt.

  2. 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)
  3. I have downloaded NVIDIA-linux-x86_64-331.67.run which I believe to be the correct driver. I have a 64-bit system.

  4. Running that resulting in issues with the Nouveau kernel driver. These seemed to be solved by running sudoedit /etc/modprobe.d/nvidia-graphics-drivers.conf and 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
  5. 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".

  6. "Installation has failed"

    OK, is this fixable or is it time to bail out and install Linux fresh from a live CD?

  7. Soldiering on per the instructions here.

  8. sudo nvidia-settings --uninstall This 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 --help so I ignored it.

  9. sudo apt-get remove --purge nvidia*

  10. sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv

  11. I ran the following commands.

    sudo apt-get install nvidia-common
    sudo apt-get install xserver-xorg-video-nouveau  

    Error message:

    unmet dependencies depends xserver-xorg-core recommends libg11-mesa-dri
    sudo apt-get install xserver-xorg-core libg11-mesa-dri

    Error message:

    unable to locate package libg11-mesa-dri
    sudo apt-get install xserver-xorg-video-nouveau  

    Error message:

    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
  12. Reconfigured x-server:

    sudo dpkg-reconfigure xserver-xorg
  13. It looks like this worked. Ubuntu 12.10 is back at a graphical interface.

  • Someone named Louis suggested a really wonderful edit to this post, which I cannot figure out how to use because the ability to do that is non-obvious to a N00B on this board. While I appreciate the chance to clean up my post and make it more readable, I would appreciate even more a substantive answer to the question that helps me solve the problem at hand.
    – Invention1
    May 15, 2014 at 23:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.