I am currently having problems with my Nvidia driver after upgrading Ubuntu to the latest version. I get 640x480 and a log-in loop.

If I drop to a shell and re-install the driver by executing these commands:

sudo service lightdm stop
sudo bash NVIDIA-Linux-x86_64-367.44.run

I can do...

sudo service lightdm start

And everything works again - full resolution, can log in.

After rebooting, I end up with 640x480 and the log in loop again.

I am sure when I originally set up the machine a few years ago, I had to do something else, but I cannot remember what it was.

Any help appreciated.

The card model is a GeForce GTX 750Ti this looks like the same issue as Login Loop, Video Driver Problem, Reinstalling Driver Fixes until Reboot which has no answer, so I'll keep this question up to date with my progress...

Update 1

Followed Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics by doing...

sudo apt-get purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-370
sudo reboot

I got some warnings about uninstalling the old driver during the last command...

WARNING: Your driver installation has been altered since it was initially
         installed; this may happen, for example, if you have since installed
         the NVIDIA driver through a mechanism other than nvidia-installer
         (such as your distribution's native package management system).
         nvidia-installer will attempt to uninstall as best it can.  Please see
     the file '/var/log/nvidia-uninstall.log' for details.

... and then it outputs some errors like this...

ERROR: Unable to create '/usr/lib32/nvidia-370/libGLESv1_CM_nvidia.so.370.28'
       for copying (No such file or directory)

...but it looks like this is due to the uninstall.

Now after a reboot, I do not get the log in loop, but I still only have 640x480 as the only available screen size

I'm going round in circles on this one...

  • 1
    This is a wrong way of installing Nvidia drivers. Install from Ubuntu repos or a PPA.
    – Pilot6
    Sep 10 '16 at 13:08
  • 2
    @Pilot6 have tried that (tried quite a lot of things during spare time over the last few weeks), the only way I can get into my desktop at the moment is by doing the above steps every time after a reboot, it's getting annoying... Read hundreds of posts by people with simliar issues...
    – BretC
    Sep 10 '16 at 13:16
  • The drivers don't actually take effect until you reboot. Sep 10 '16 at 13:18
  • 1
  • 1
    Looks like this user askubuntu.com/questions/755700/… has had the same problem... As there are no answers, I am dreading the nuclear option of "reinstall everything and hope it works" :(
    – BretC
    Sep 10 '16 at 13:55

After wasting about 10 hours of my life over this for the past few weeks, I've finally found out what the problem was.

I went back to my original way of installing the driver as in the question.

After powering on my machine, I was in 640x480 mode, so I opened a shell and typed...

> lspci -nnk | grep -iA2 vga

After a fresh reboot it was listing...

bret@bret-Precision-WorkStation-T5500:~$ lspci -nnk | grep -iA2 vga
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2)
        Subsystem: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380]
        Kernel modules: nvidiafb, nouveau, nvidia_352

After stopping lightdm, re-installing the driver and starting it again, the command output was...

03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2)
        Subsystem: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380]
        **Kernel driver in use: nvidia**

I then remembered what I did when I originally set up the machine with Ubuntu 14.11, I had to blacklist the other two modules by adding...

# Blacklist modules that conflict with NVidia driver...
blacklist nouveau
blacklist nvidiafb

to /etc/modprobe.d/blacklist.conf

Now when I reboot, everything works.

  • This jogged my memory... askubuntu.com/questions/35273/… - I also removed a file that was left by an old nvidia v352 driver in modprobe.d - not sure if this made any difference
    – BretC
    Sep 10 '16 at 15:28
  • As commented above: This is a wrong way of installing Nvidia drivers. Install from Ubuntu repos or a PPA
    – user589808
    Jan 17 '17 at 13:23
  • I tried this today (2020-05-06) with Ubuntu 20.04, Kernel version 5.4.0-29, a GeForce GTX 1060 6GB/PCIe/SSE2, and the manually downloaded NVIDIA-Linux-x86_64-440.82.run. So far after reboot nothing seems wrong. --- Note that, to "install the driver", I booted to recovery mode, entered the root shell, navigated to the downloaded driver install file, made the file executable with chmod +x ./NVIDIA-Linux-x86_64-440.82.run, and ran it with the command sudo ./NVIDIA-Linux-x86_64-440.82.run, and then accepted every prompt that came up. May 6 '20 at 15:15

This can happen if you update your nvidia driver and the old one is not completely removed. Have faced this and similar ones many times as I had to install/update/reinstall for Deep Learning,CUDA related work.

Step 1

If you are able to get a command line login via Cntrl +Alt + F1 ( or F2 depending on your Distro) proceed to Step 2.

Else Edit Grub and get into console mode login -- This is the simplest and surfire way

Step 2

Purge current driver on Nvidia driver

sudo apt-get purge nvidia*

Step 3


Step 4

Check if GUI is working - should work

Else-- Note if you have tried starting GUI from sudo via startx then there would be permission problems, and you need to change the permission of.Xauthority

Step 5

Assuming you are in the GUI or having a network. Install the latest drivers for your card from https://www.nvidia.com/Download/index.aspx. Note sometimes it is better to take a slightly older and more stable version of the driver as the new driver may not work with the old card.

 sudo add-apt-repository ppa:graphics-drivers
 sudo apt-get update
 sudo apt-get install nvidia-430

like - https://medium.com/techlogs/install-the-right-nvidia-driver-for-cuda-in-ubuntu-2d9ade437dec

Step 6

reboot and test using nvidia-smi command enter image description here

That's all should solve your problem. If you are having the same problem then try to install a lower more stable version of the driver. For example, I first tried with nvidia-430 and it did not work then tried with nvidia-410 and it was fine.


This question appears in Google Search for a bit different problem: NVIDIA driver stops working after a reboot if the Linux Kernel is upgraded during that reboot.

The solution is the same: https://askubuntu.com/a/1366441/341184

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.