I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.

  • The display is blank
  • The display flickers
  • Items on the screen do not display correctly
  • Certain programs complain of graphics issues
  • The computer boots to low-graphics mode

  • Your specific issue may not be here, but try the solutions described in the answers anyway.

This question is very broad, but each one of these issues likely has one solution.


If you are experiencing a login loop, check the last part of my answer.


If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.


Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.

  • 2
    For those stuck in login loop after installing the nvidia driver... please have a look at askubuntu.com/a/760469 it seems the nvidia drivers are not yet compatible with the latest kernel version. You can also try the steps mentioned here askubuntu.com/a/761326, if you still want to install the nvidia drivers though... I havent proceeded as my flicker problem has stopped. – Ajinkya Patil Apr 26 '16 at 22:14
  • My issue isn't listed, but it certainly qualifies for "NVidia & 16.04" problems. askubuntu.com/questions/789972/… – andyczerwonka Jun 22 '16 at 11:58
  • I solved this problem with proprietary driver, version 304 – valeriocomo Jul 17 '16 at 13:20
  • Through the years I have tried a lot of suggested solutions such as purging, graphics ppa, additional drivers etc. etc. on various laptops. For me none of this ever worked. With nvidia drivers I always fallback on downloading and installing drivers from nvidia, following instructions in the runnable. – Eduard Drenth Aug 7 '16 at 9:19
  • 1
    I cant answer this question but installing from NVIDIA's drivers with the flag "--no-opengl-files" helped me – shaunakde Sep 30 '16 at 16:40

12 Answers 12

up vote 194 down vote accepted

Please be aware that this answer may become slightly outdated. I will do my best to update it regularly, but I can't guarantee anything. The driver version used below may not be the latest. Please check the Launchpad page to confirm.

Each of the issues described (and maybe even more) can be fixed by following the steps below.


If you're installing Ubuntu, follow section 3.


1. First make sure you can enter a TTY

Press Ctrl+Alt+F1

If this brings you to a black screen with a login prompt, continue on. Otherwise, you will likely have to boot with a special kernel flag. Instructions are below.


2. Now for the fix

  1. Log into your account in the TTY.
  2. Run sudo apt-get purge nvidia-*
  3. Run sudo add-apt-repository ppa:graphics-drivers/ppa and then sudo apt-get update.
  4. Run sudo apt-get install nvidia-375.
  5. Reboot and your graphics issue should be fixed.

3. If you are unable to enter a TTY or are trying to install Ubuntu

  1. Reboot into GRUB.
  2. Highlight the Ubuntu option and press E.
  3. Add nouveau.modeset=0 to the end of the line beginning with linux.
  4. Press F10 to boot.
  5. Follow the instructions above.
    • (If installing Ubuntu, ignore this step, but follow the rest of the tutorial after the installation is finished.)

This solution should fix many problems described by users after an upgrade to 16.04. If a fresh install is affected, the solution is the same.


If you run into problems afterward, you should ask a different question. (Refer to this question so that we know it isn't a duplicate.) However, there are a few other small fixes you can try out before you do.

  • Reinstall Xorg

    • Go back into the TTY and run sudo apt-get purge xorg-* xserver-xorg; sudo apt-get install xorg xserver-xorg; sudo dpkg-reconfigure xorg.
  • Reinstall your desktop environment

    • If on Unity, run sudo apt-get purge ubuntu-desktop; sudo apt-get install ubuntu-desktop.
    • If on GNOME run sudo apt-get purge ubuntu-gnome-desktop gnome-desktop-environment; sudo apt-get install ubuntu-gnome-desktop.
    • If on MATE run sudo apt-get purge ubuntu-mate-desktop mate-desktop-environment; sudo apt-get install ubuntu-mate-desktop
    • Each Ubuntu DE has its own package name. If you have KDE or something else, the name should be similar to the ones above.
  • Fresh reinstall
    • It's not the most inviting option, but sometimes it's the best thing to do in cases like this.

Please remember that there are a lot of things that can go wrong, and this is not a guaranteed fix for everything. Even if you are experiencing something listed in the question, the solution may not fully work for you.

This answer is merely for driver issues with 16.04 and nVIDIA. Your issue may go deeper than a bad driver.


Other issues after the fix

  • If you get to a working display, but run into a login loop (you login and get returned to the login screen), take a look here.
  • 1
    @XiaodongQi Have you tried disabling Secure Boot? The other answers here suggest that fixes the login loop. – TheWanderer Apr 29 '16 at 10:19
  • 1
    That's very strange. OK, this might break your system even further, but I guess it's worth a shot: sudo apt-get purge nvidia*. No dash before the asterisk. Then try the rest of the steps. – TheWanderer May 8 '16 at 16:03
  • 1
    I think you need to reinstall :/ @Pavel – TheWanderer May 8 '16 at 16:12
  • 1
    Ha - this did not help. – user3728501 Jun 29 '16 at 22:25
  • 2
    Still the same symptoms with nvidia-367. – sds Jul 20 '16 at 17:15

I installed Ubuntu 16.04 and everything worked fine until I switched to NVIDIA driver. After rebooting I couldn't get past the login screen. The solution that worked for me was to disable secure boot.

While stuck in login loop, I switched to console Ctl+Alt+F1, rebooted and disabled secure boot in UEFI. Now everything works with nvidia driver installed.

For The display is blank & The display flickers

I faced the same issue but now every thing works fine.

There are two solutions to this:

  1. Use NVIDIA driver version 364 from the Graphics drivers PPA (Best Option)

    • sudo add-apt-repository ppa:graphics-drivers/ppa
    • sudo apt update && sudo apt install nvidia-364
  2. Use LightDM instead of GDM

    • sudo apt-get install lightdm
    • choose lightdm as the default when prompted.

NOTE If that didn't work for you, install intel-microcode (if available) from the Additional Drivers app before installing the NVIDIA driver.

  • So you had a login loop? There are five 'issues' in the question. – TheWanderer Apr 24 '16 at 21:55
  • i had both The display is blank & The display flickers – Independent Peculiar Apr 25 '16 at 0:41
  • Ah. Well you should probably put that in the answer ;). – TheWanderer Apr 25 '16 at 0:42
  • 2
    Hi - I tried 361, 364 and 367 without any success. Tried to reconfigure lightdm as well, no results. I still can not get rid of tearing when scrolling or watching videos/movies. Only solution to have decent graphics is to use intel only through prime-select. I would happily try any other solution if there is something else I am forgetting – pandaadb Jun 13 '16 at 13:33
  • 1
    I did exactly, now i can't login ubuntu at all. – atilkan Jul 3 '16 at 18:21

I upgraded from Ubuntu GNOME 15.10 to 16.04 and was faced with a black screen. Using systemctl status and digging through logs, I found that the proprietary NVidia drivers were broken.

Purging nvidia-* and reinstalling gdm got me to low-graphics mode, but reinstalling the NVidia drivers brought back the black screen. As it turns out, Secure Boot had been set to "Windows" in the BIOS settings. I changed it to "Other", and my issue was solved.

Before I found the Secure Boot option I'd tried purging and reinstalling nvidia-*, xorg*, xserver-xorg, ubuntu-gnome-desktop, gnome-desktop-environment. I'm not sure whether or not this helped, but it seems best to put it in. Also, the upgrade tool had said that it would have to disable Secure Boot in order to succeed, but that it would turn it back on afterwards. That is what led me to go look for it.

I checked the X11 log file at /var/log/Xorg.0.log for (EE) error entries:

root@computer:/var/log# grep EE Xorg.0.log
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   156.124] (EE) No devices detected.
[   156.127] (EE) no screens found(EE) 

so the graphics card was not detected by the nouveau driver.

checking the installed card with lspci gave the following result:

root@computer:/usr/share/X11/xorg.conf.d$ lspci | grep NVIDIA 
02:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210]    (rev a2)
02:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)

With this type of graphics card the answers recommending to install the NVIDIA drivers given here didn't help me since the latest NVIDIA driver doesn't support my card.

Therefore after some internet search i found the suggestion to help the X11 system a bit by specifying the details of the card in a file

/usr/share/X11/xorg.conf.d/20-nouveau-conf and using the info from the lspci command:

# lspci | grep NVIDIA 
# 02:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
Section "Device"
   Identifier  "NvidiaGraphics"
   Driver      "nouveau"
   VendorName "NVIDIA Corporation"
   BusID    "PCI:2:0:0"   
EndSection

Now things work like expected and no (EE) error lines show up in the log file.

For those who are following the guide but the problem still appears, then maybe it has something to do with the driver itself.

Some of the NVIDIA's GPUs doesn't play well with the newest driver. If you've suspected that you're the victim of that problem, then you can follow my guide below.


Below are just copy paste answer from my own question here.


I did it!! It was a problem with the driver itself!

Problem : My Card (NVIDIA GTX980M) doesn't run well with new proprietary NVIDIA Linux driver. Solution : Use the old driver that supports my graphic card.


Basically, after lurking the internet for a while, some people said that maybe I can try to use stable nvidia-352 instead of new drivers.

However, upon looking at apt-cache search nvidia-352, I have found out that nvidia-352 is just a transition driver for nvidia-361 graphic driver.

However, based on my previous test, nvidia-361 up to newest (nvidia-370 at the time of writing) is the source of my problem.

So I need to download the exact nvidia-352 instead of transition nvidia-361.


If you're having the same problem as mine, then below are the steps on how I solved it.

Steps :

  1. Uninstall all your current problematic NVIDIA drivers.

    sudo apt-get purge nvidia-* libcuda-* 
    

    .

  2. Create temporary folder to store nvidia-352 required files

    cd ~/Desktop
    mkdir nvidia-352
    cd nvidia-352
    

    .

  3. Download the required files for nvidia-352 graphic driver.

    wget https://launchpad.net/ubuntu/+archive/primary/+files/libcuda1-352_352.63-0ubuntu3_amd64.deb
    wget https://launchpad.net/ubuntu/+archive/primary/+files/nvidia-libopencl1-352_352.63-0ubuntu3_amd64.deb
    wget https://launchpad.net/ubuntu/+archive/primary/+files/nvidia-opencl-icd-352_352.63-0ubuntu3_amd64.deb
    wget https://launchpad.net/ubuntu/+archive/primary/+files/nvidia-352_352.63-0ubuntu3_amd64.deb
    

    Edit 1:

    If you have problem downloading nvidia-352_352.63-0ubuntu3_amd64.deb from the link above (occurred to me), you can also download it from different sources.

    Here is an alternative link for that file :

    http://mirrors.mit.edu/ubuntu/pool/restricted/n/nvidia-graphics-drivers-352/nvidia-352_352.63-0ubuntu0.15.10.1_amd64.deb
    

    Edit 2:

    The links above is for 64-bit NVIDIA driver, for those who are looking for 32-bit then do a look at below link :

    https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-352
    

    The steps are just the same, just you need to download a different files that support your 32-bit setup.

    .

  4. Install all the debs files.

    sudo dpkg -i *.deb
    

    .

  5. Reboot

    .


Voila! If you booted into your desktop without having a single crash, then you have successfully solved this graphic problem!

Enjoy! :D

After struggling with this issue for a day and a half, eventually it was solved by disabling secure boot in Bios settings. during installation of driver I was prompted to disable secure boot and I did, but somehow, perhaps because windows is also installed, it was not disabled (while installing). rebooting and pressing F2 (on Asus) I got into Bios, security, then disabled secure boot. rebooted, and voila! Although this may be specific to certain bios versions or dual boot systems, no one posted this solution here before.

Every day I check for update and download them using Software Updater. But last night Ubuntu asked me for a partial download (said, something not installed correctly - something like that), so I follow Partial Download process. End of the download process it asked for a restart, so I restart Ubuntu. After reboot, the boot logo and login window are on low-resolution, login loop and no internet connection (wifi + ethernet both I tried)! So, I can't even log in!

I'm using Ubuntu 16.04.2 LTS in ASUS X556UQ Laptop.

After a long experiment (trying above and other solution from Google), I find that the problem occurs for the latest Linux Kernel 4.8.0-42 with Nvidia 378 driver! So I downgrade to Nvidia 370 driver using TTY (Ctrl + Alt + F1) and restart Ubuntu using Linux Kernel 4.8.0-41 (Using grub menu) and all problem solved!

I tried many solutions and non worked. Finally, I tried this and worked perfectly, without any need to do things like sudo service lightdm stop and so on. Just run the followings:

This shows you the list of compatible drivers for your devices: sudo ubuntu-drivers list

Then run to install the compatible ones:

sudo ubuntu-drivers autoinstall

Finally do (or just restart your machine):

sudo service lightdm restart

When I first installed Ubuntu 16.04.1 I had graphics issues that were resolved by using nvidia-304 (already mentioned above as a solution). I just updated my system a week or so ago and since then I found myself in the "can't log in loop problem" as many people has already described. Logging in via a tty, I tried installing nvidia-304, 324, 350, and 370. NONE of them worked. Finally I tried something very drastic. I installed Xubuntu 16.04.1. It worked immediately with NO specific effort on my part. So it seems the problem is intimately tied to the desktop manager (Gnome). So if you can switch to Xfce from within a shell window, you might be good with your current version of Ubuntu (sorry but I don't know how to do that). Otherwise, install Xubuntu.

Good luck!

I've been having this login loop problem for months now up to no end. Now I've finally got an answer, and really want to share it with all of you out there who are pulling your hair out for the solution. If there is a simpler way to do this as well, please do tell.

This is my first post ever so please do bear with any errors I may make as a first timer :)

I'm gonna tell the whole process that I did from the very start so you will know what are all the methods I've tried.

  1. At first when installing Ubuntu, the screen was incredibly slow and lagging. The output came from the inbuilt graphics output (the built-in VGA) and then after installing NVIDIA drivers, it was showing a login loop in which when the user logs into the PC, the screen will flash and then the login screen appears again in an infinite loop. The resolution was also low but output came from the HDMI of the GPU this time.

  2. To try fixing the situation, there were many suggestions in the web, such as to try removing the .Xauthority file or to try doing sudo chown user:user .Xauthority. I've tried both of them but in vain.

  3. Then there was a method to try and install the lightdm manager instead of the usual gdm manager that was in ubuntu. I've then changed the display manger to the same but it was also not working.

  4. The next suggestion was to install the xubuntu-desktop environment and then try using it. When i removed the ubuntu-desktop and then installed the xubuntu-desktop. This actually solved the problem but it was temporary. The screen cam back but the GTX 980 was not visible in the Nvidia x server setting. But at this point after I installed CUDA that was detecting the GPU.

  5. After a reboot the screen stopped working again and this time the tty also stopped showing, even after I use the Ctrl-Alt-F1 to F7 shortcuts individually.

  6. Thinking that this was a problem in the OS, I then started experimenting with other OSes. I've downloaded and tried to install an Ubuntu server version. After installing the server version, I tried installing a desktop environment. Hence after trying to install the desktop environment, the OS crashed with a message saying "Oh no! Something has gone wrong!". Then its struck again.

  7. Taking away Ubuntu Server version I then shifted to Kubuntu 16.04 thinking its display manager may do some help. I installed first after removing the GPU and the installation went well. After that I installed the Nvidia driver after putting back the GPU and the login loop came back. This was incurable again.

  8. After that I tried to install different Nvidia drivers as that was another suggestion given. I've tried nvidia-300, nvidia-340 and proprietary nvidia-367 at the time too, but all were in vain. There were also some PPA with experimental versions (ppa xorg-edgers and something similar), but they too didn't work.

  9. Then I tried installing Fedora. But at the time one page talked about other parallel VGA controllers that may be in the system. So when I checked I noticed that there is an integrated Matrox Graphics driver in the motherboard. (MG 200e). This could have been the problem as their could have been a conflict between the drivers all this time. So I started searching on how to disable the driver.

  10. Then I found the method!!. I went to BIOS setup and then disabled the "Onboard display" option. That solved the problem. Now when I opened fedora, it actually started working along with the GPU card and the driver was not installed yet. This was a great improvement from before. After installing the Nvidia driver the OS starting working well.

My solutions is this.

OS ubuntu 16.04 nvidia driver before 350, installed in software updates from ubuntu

I download from nvidia the driver 370 and i execute sh./path-to-driver in terminal enter to tty

ctrl alt f1

and kill process lightdm

sudo service lightdm stop

with this commands have problems

Solution

First reboot the pc and my first problem was i cannot enter to desktop in ubuntu and cannot enter to tty terminal, i enter in recovery mode and go to root terminal and make this

nvidia-uninstall

this remove the nvidia driver that your install with command ./nvidia.run

and reboot and look. you need to install driver of ubuntu with

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

or find in software and updates and install the driver

This solution is my solution of same problem before. i cannot uninstall driver when i download of nvidia web page

  • 5
    nvidia-current is a legacy driver. It is a bad solution in most cases. – Pilot6 Aug 29 '16 at 17:53

protected by muru Apr 27 '16 at 1:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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