First, you will be glad to know that Linus Torvalds hates Nvidia precisely for the reasons why you are here. I have spent too many hours trying to figure this out, so here it is.

Important Note: All these steps need to be performed with the display connected to the integrated graphics port of your motherboard, not the NVidia GPU. You can connect your display to the NVidia GPU only after a successful installation of the latest drivers.

For the steps in this article to work, you have to get to a login prompt or TTY. Initially, you might be staring at an empty black screen.

Option 1: Hit  Ctrl+Alt+F1. It should likely bring a black screen with login prompt. That’s good. Login and follow the steps in the fixes given below

Option 2: If Ctrl+Alt+F1 does not work for you, you will have to edit the special kernel flags to get to a login prompt. For this to work, follow these steps:

  1. Reboot the machine into GRUB
  2. Highlight the Ubuntu option and press “E” (for edit). This will bring up an editable file that lists the boot flags.
  3. Append nouveau.modeset=0 to the end of the line beginning with linux.
  4. Press F10 to boot. This should get you to the login prompt


Steps for getting Nvidia GTX 1080 on Ubuntu 16.04 LTS:

These steps work only after you have been able to get to a TTY or a command-prompt. Use one of the options above to get a TTY before you perform these steps.

  1. Log into your account
  2. Change to superuser mode
    sudo bash
  3. Edit the /etc/modprobe.d/blacklist.conf file to blacklist some modules so that they do not interfere with your installations. Without GUI, you will have to use nano, emacs or vim for editing the file. Just append these commands at the bottom of the blacklist.conf file.
    # blacklist added by abhay harpale for nvidia gtx 1080 installation on ubuntu 16.04 LTS
    blacklist amd76x_edac
    blacklist vga16gb
    blacklist nouveau
    blacklist rivafb
    blacklist nvidiafb
    blacklist rivatv
  4. Run the following commands in that specific sequence. In this sequence, you login as root and then remove existing nvidia stuff and reboot the machine.
    # login as root
    sudo bash
    # remove existing nvidia stuff
    apt-get purge nvidia-*
    apt autoremove 
    # reboot
    shutdown -r now
  5. After logging back in you again ensure removal of any nvidia remnants, although none would be there.
    sudo bash
    apt-get remove --purge nvidia*
    dpkg --configure -a
    shutdown -r now
  6. Now that we have completed destroyed nvidia from the system, and rebooted afresh, let’s start the installation. Perform the following steps below (the # marks the comments, and need not be entered!). Note that if you do not kill the X-server using “killall xinit”, you might receive errors such as “You appear to be running an X server”.
    # login as root
    sudo bash 
    # stop the GUI
    service lightdm stop 
    # stop the X-server if it was already running, or nvidia will complain about it
    killall xinit 
    # download the latest nvidia drivers. At the time of this writing 367.35 was the latest
    cd ~/Downloads/
    # make the downloaded file an executable
    chmod +x 
    # run the NVidia installer
    # follow the prompts in the process
    # once the process is over, reboot
    shutdown -r now
  7. When the system reboots, you can connect your display to the appropriate port on the GPU. Welcome to GTX 1080 on an Ubuntu 16.04 LTS system! We did it!

Note: If in spite of installing the correct NVidia Driver’s for Ubuntu 16.04 LTS, you are staring at a black screen, it is possible that is a display resolution related issue. Please check out the detailed and helpful comment by Constantin on my post about getting Tensorflow working with GTX 1080 + Ubuntu 16.04 LTS.

If this article has worked for you, it is highly likely that some of your friends and followers will benefit from it too. Please share by clicking on the appropriate channels.

If you have any comments, questions or suggested modifications to improve the steps listed here, please drop me a comment below. Most importantly, if these steps did not work for you or something else did, please let me know that too, along with the error description you are getting.