NVIDIA drivers not working after upgrade. Why can I only see terminal?

Solution 1:

You will need to boot into recovery mode, then issue apt-get remove --purge nvidia-current on the root terminal, followed by apt-get install nvidia-current - to rebuild the nvidia driver for the new kernel. I had this problem as well when I upgraded.

Please do not install the drivers from nVidia's website btw! You could cause serious trouble if you then try to install the recommended driver later without cleanly removing the previous one.

Edit: You will need to run these commands from a terminal. I cannot guarantee a perfect result, since I am going based on what I've found via the internet and from memory.

The problem you are getting is caused by having differing user mode components and kernel modules. To fix it, the nvidia kernel module has to be rebuilt. This is supposed to happen on reboot, but it often does not.

First you need to install the linux kernel headers:

  • sudo apt-get install linux-headers-generic

Then you will need to run dkms to remove the old nvidia kernel module:

  • sudo dkms remove nvidia

Then run:

  • sudo apt-get install nvidia-current
  • this should make it install correctly, so all you need to do is run sudo nvidia-xconfig and reboot.
  • If you still get an error about the module version, run: sudo dkms build nvidia

This should solve the problem.

Sorry if things are a little confusing, I tried to put back together the process I had to use to the best of my memory :)! If you run into problems don't hesitate to let me know (and if anyone spots any problems with the instructions please let me know ASAP)!!!!


Update:

I found another possible cause. Nouveau might not have been blacklisted, and nvidia-current may not have placed itself in the .conf file that is used to choose your display driver. Here is how to fix it:

NB:

Before you continue, ensure that you have the nvidia-current driver from the repositories. Downloading the driver from nvidia's website can cause problems later, as it does not use the debian package format and leaves things behind that can conflict with later installations. So make sure you clear any traces of it first, and then install the standard driver from the Ubuntu repos. If you do not, you will get a driver mismatch, and this fix will be pointless.

  • If you are stuck on the console, log in and install the nouveau X.org driver: sudo apt-get install xserver-xorg-video-nouveau
  • Restart your computer (you will have working graphics, yay! But this is temporary).
  • Open gedit as root: gksu gedit.
  • From gedit open /etc/modprobe.d/blacklist.conf.
  • Add this line at the bottom: blacklist nouveau.
  • Save the file, and open /etc/modprobe.d/nvidia-graphics-drivers.conf.
    • Add these lines:

      blacklist nouveau
      blacklist lbm-nouveau
      blacklist nvidia-173
      blacklist nvidia-96
      alias nvidia nvidia-current

  • Now save this file, and close gedit.
  • Run:
    • sudo nvidia-xconfig,
    • and then:
    • sudo apt-get remove xserver-xorg-video-nouveau,
    • followed by:
    • sudo shutdown -r now.
  • When your system restarts, you should have working nvidia drivers.
By the way, this problem of not blacklisting nouveau seems to exist in the newer drivers (nvidia-current), so I would suggest after fixing the problem, that you wait for an update on this bug (I am going to report the bug soon).

Alternate solution: If you did install the NVIDIA drivers from their web site, then you must boot into a text terminal, (hold at boot to see grub menu and select 'recovery' mode of the kernel version that last worked with the NVIDIA drivers, and select the command line as root option)

Then run the original NVIDIA install shell script you ran to install the NVIDIA drivers from their website. e.g. sudo ./NVIDIA-Linux-x86-290.10.run --uninstall. (Your version may differ.)

You won't need to run the "sudo dkms remove nvidia" command, as this doesn't apply for your case.

Solution 2:

This is why I always recommend installing Ubuntu as a clean install instead of doing an upgrade. This is just my opinion but I have always had some problem or other when doing upgrades. No problems when doing a clean install.

For what I have read over the other answers you have installed the Nvidia Driver from the Nvidia Site. Even though it works good and etc.. DO NOT DO IT!. The one that comes in the ubuntu repositories has been tested and that is the one recommend.

In your case you will need to do several things.

Step 1 - Uninstall the nvidia driver you install and never again install it. It will save you from having THAT specific problem that...ehem....somebody also had it (Me ;) ) you also need to remove the modules from it and whatever configuration files it leaves behind. If am not mistaken, then nvidia drivers from Nvidia web site have an uninstall binary. Run that and make sure there is no other nvidia files left behing.

UPDATED - To uninstall an Nvidia Driver installed from the Nvidia Site you might have one of several options:

  • Some suggest to uninstall using the same installer.
    Example: NVIDIA-Linux-x86-1.0-8178.run --uninstall
  • Others suggest to use the Nvidia Installer.
    Example: nvidia-installer --uninstall

TIP - Try to type --help at the end of the Nvidia Binary Executable to see if it shows some help. Pages like https://help.ubuntu.com/community/NvidiaManual And http://www.nvnews.net/vbulletin/showthread.php?t=83678 give an idea of how to uninstall the Nvidia Driver from the Nvidia Site.

Step 2 - Reboot and check that you NOTHING left from nvidia. Delete the xorg.conf file since you will be making a new one soon enough. Reboot.

Step 3 - Install the recommended Nvidia drivers. sudo apt-get install nvidia-current or sudo apt-get reinstall nvidia-current (If you already had it installed. I would recommend unistall then installing it again.)

Step 4 - CREATE the xorg.conf file for the Nvidia recommended driver. nvidia-xconfig. This will create the xorg.con file with the options needed for your nvidia video card. Reboot again.

Up to this step I would need feedback if you had any problem. For a more general solution please feel free to read this guide: How do I install the Nvidia drivers?