Freya HowTo: Install latest NVIDIA Driver on Linux without getting black screen

Discussion in 'Tutorials' started by paradise, Dec 9, 2014.

  1. paradise

    paradise Thread Starter
    Expand Collapse
    Elementary Member

    Joined:
    Dec 3, 2014
    Messages:
    114
    Likes Received:
    33
    This tutorial is deprecated. It is way more easy to use the GraphicsPPA.

    (This tutorial is for geeks. You are an Elementary/Linux newcomer? Please install your NVIDIA Driver this way: https://elementaryforums.com/index....-driver-in-elementaryos-the-official-way.206/ << easy, eh?)

    Dear Community,

    i'm going to explain you step-by-step the way how to install the very latest NVIDIA Graphic Driver from http://nvidia.com for Linux 32- and 64Bit without any PPA. This tutorial is written for ElementaryOS Freya, Ubuntu 14.04 and Linux Mint 17. The instruction could work or help for other Distro's too.

    I am going to explain especially how to prevent the black screen :eek:after installing the latest NVIDIA Driver. A black screen :eek: after installation is the most issue at all.

    I would like that you understand what you are doing below. I can't write the solutions in 5-6 lines and 80% of the folks still doesn't have the issue resolved. Please, take a fresh coffee and let's start us. :)

    #1. Download the latest NVIDIA Driver from http://nvidia.com

    Go to http://nvidia.com and choose your Graphic Card & chose your linux version 32- or 64Bit. Download the latest driver.
    NVIDIA_driver_search_Linux.jpg

    In this tutorial we are downloading NVIDIA-Linux-x86_64-343.36.run from http://nvidia.com. If Nvidia already published newer drivers just download the newest driver for your 32- or 64Bit Linux.
    # Make the Installer executable
    Code (Text):
    cd ~/Downloads
    chmod +x NVIDIA-Linux-x86_64-343.36.run
    #2. Prepare your GRUB to prevent first black screen :eek:

    Please - do not install any proprietary driver before adjusting the GRUB config with adding "nomodeset". This option does disable the kernel integrated video driver as we need it now.
    Since Linux Kernel 2.6.28 the kernel itself does provide the graphic driver during the startup of your linux. The developers thought it would be a cool idea to provide nice animated splash screens during boot a linux, but it does hurt the NVIDIA Driver hard and often result in a black screen :eek:.

    Code (Text):
    sudo nano /etc/default/grub
    # Add the option "nomodeset" behind "quiet spash".
    # Add new line with your resolution: GRUB_GFXPAYLOAD_LINUX=1920x1080
     
    Screenshot: etc_default_grub_add_nomodeset.jpg
    #Update GRUB to activate this config.
    Code (Text):
    sudo update-grub
    #Find out which Display-Manager your Ubuntu Devirate is using:
    Code (Text):
    cat /etc/X11/default-display-manager
    Remember the output for the next step.

    #3. Move to command line and kill the Display Manager

    Now we say goodbye to our beautiful Desktop and move to fully to the Linux command line Mode. This is required 'case the driver can't be installed while it's running the Desktop/X-Server.
    Do you remember the output from /etc/X11/default-display-manager Step #2 ? You now have to shut it down.

    #Press CRTL + ALT + F1
    #(Press CRTL + ALT + F7 > this will give you the desktop back)
    #Shutdown Display Manager in terminal mode CRTL+ALT+F1

    ElementaryOS Freya & Ubuntu 14.04:
    Code (Text):
    sudo /etc/init.d/lightdm stop
    Linux Mint 17:
    Code (Text):
    sudo /etc/init.d/mdm stop
    Alternatives are: sudo /etc/init.d/gdm stop (Gnome Ubuntu) or sudo /etc/init.d/kdm stop(Kubuntu)

    #4. Delete EVERY earlier installed NVIDIA-Package from Ubuntu Repository!

    This by hand installed latest binary proprietary NVIDIA Driver is not going to run, if there are any old nvidia-* Packages installed. It does end in a version conflict and runs into a black screen :eek: too. So, be friendly to yourself and uninstall them.

    #Detect what nvidia-* is installed
    Code (Text):
    sudo dpkg --get-selections | grep nvidia
    #De-Install every package which is in status "install" and not "deinstall"
    Code (Text):
    sudo apt-get autoremove nvidia-304 nvidia-current nvidia-libopencl1-304 nvidia-libopencl1-331 nvidia-opencl-icd-304 nvidia-opencl-icd-331 nvidia-prime nvidia-settings
    Re-Run sudo dpkg --get-selections | grep nvidia until it looks like this:
    dpkg_get_selections_deinstall_nvidia_packages.png
    (if there is no output, you are ok! this means, nvidia is not only de-installed but also completely purged. thats ok.)

    #5. Run the NVIDIA-Installer NVIDIA-Linux-x86_64-343.36.run

    You are now ready to install the latest NVIDIA Binary Driver on your Linux. Take care what option you choose! Lets tell me what to choose step-by-step.

    #Start the installer with sudo
    Code (Text):
    cd ~/Downloads
    sudo chmod +x NVIDIA-Linux-x86_64-343.36.run
    sudo ./NVIDIA-Linux-x86_64-343.36.run
    #Pre-Install Script failed. Do you really wanna run?
    nvidia_installer_pre_install_failed_continue_anyway.jpg
    Yes. This warning is the default in Ubuntu. "Continue", if there is no nvidia-* anymore installed from ubuntu-repository (Step #4)

    #Install 32-Bit compatibility libraries?
    install_nvidia_32-bit_compatiblity_libraries3.jpg
    #Yes.

    #Would you like to run the nvidia-xconfig utility to automatically update your X Configuration file so set the NVIDIA X driver will be used when you restart X?
    install_nvidia_x_config_do_not_accept_no_no.jpg
    #no,no,No,NO,NO!!!
    #Why? Your X-Settings will be automatically detected. The file /etc/X11/xorg.conf should be just empty. Otherwise you run often directly into another black screen :eek: at the moment, your login-screen should appear.

    Well done so far. As soon as the installer is finished and did close itself, you can reboot with sudo reboot. And pray for there will no black screen :D (if you follow the instruction there won't!)

    #6 Done.

    Done. After reboot, you will find a new menu entry "Nvidia Settings" or just run in the terminal: nvidia-settings to figure out which version is installed.

    nvidia-settings.jpg

    FAQ'bs - Frequently Asked Questions 'cause of black screen :eek:

    I have installed the latest NVIDIA Driver from http://nvidia.com, but houston we have a problem!

    • Damn, how can I get a console when CRTL + ALT + F1 does display only a black screen :eek:?
      • Solution: You have to boot into recovery-mode to do your changes. Choose "Network" and "Root Shell" in Recovery-Mode. Recovery Mode: grub_elementaryos.jpg
    • I see the Boot-Logo, but there is a black screen :eek: instead of login screen afterwards, why?
      • Solution: Usually X11 Config Issue. Is your /etc/X11/xorg.conf not empty? With up2date Ubuntu-Versions, it's better when it's empty (= auto detect settings).
      • Solution 2nd: You have errors in /var/log/syslog because there are not uninstalled nvidia-* packages from repository. Uninstall them and reboot.
    • There is no Boot-Logo, after GRUB the display is just black :eek:.
      • You probably do not have "nomodeset" added to GRUB before installing NVIDIA proprietary Driver. (Step #2)
        • You can add this option on-the-fly: When you see GRUB, press "e" to get the edit-mode of GRUB and add as explained in Step #2. This solution is only for this boot and not saved for everytime. Re-Run Step #2.
     
    #1 paradise, Dec 9, 2014
    Last edited by a moderator: Feb 4, 2017
  2. mig

    mig
    Expand Collapse
    New Member

    Joined:
    May 25, 2015
    Messages:
    1
    Likes Received:
    0
    Thanks! I've been looking for a solutions for the better part of the day. Finally got it working thanks to you!
     
  3. LKX7

    LKX7
    Expand Collapse
    Member

    Joined:
    Jun 1, 2015
    Messages:
    19
    Likes Received:
    7
    Attention! Within the next Kernel update it will display a black screen too! This tutorial may work for hand installation, but as soon as elementary os is updating their kernel, you have to reinstall this NVIDIA driver with recovery mode again!

    - Start linux in recovery mode (2nd boot option in GRUB)
    - Run Root Shell
    - Install as root NVIDIA again ./NVIDIA-Linux-x86_64-343.36.run

    It's a pain to do this every kernel update again.

    EDIT: because i think this tutorial is for linux pro and not for beginners, i wrote this quick installation instruction for beginners (it isn't the latest driver, but stable): https://elementaryforums.com/index....-driver-in-elementaryos-the-official-way.206/
     
    #3 LKX7, Jun 1, 2015
    Last edited: Jun 2, 2015
  4. Cabinetelephonique

    Cabinetelephonique
    Expand Collapse
    New Member

    Joined:
    Jul 16, 2015
    Messages:
    2
    Likes Received:
    0
    Paradise, thanks for your Job : here however big problem with my Nvidia driver : i did the entire job you mention, but i have a black screen as result after booting (only the Logo appear than the screen shutdown automatically). I check, i have "nomodeset" added in the Grub menu, in my case there is also $vt handoff attached at the end of the same grub line.
    I want to try a solution you mention, the one saying to "uninstall nvidia packages into /var/log/syslog" :
    What does this mean, and how can i proceed to do that ????
    Actually, my system is completely broken so any help would be very usefull ! Thanks in Advance Waiting your reply !
    Cab
     
    #4 Cabinetelephonique, Jul 16, 2015
    Last edited: Jul 16, 2015
  5. paradise

    paradise Thread Starter
    Expand Collapse
    Elementary Member

    Joined:
    Dec 3, 2014
    Messages:
    114
    Likes Received:
    33
    (i am online by mobile only, have to write it short: )
    - What is your output when you type

    Sudo dpkg --get-selections | grep nvidia

    In your terminal? Does it show you some nvidia packages marked as "install"?
     
  6. Cabinetelephonique

    Cabinetelephonique
    Expand Collapse
    New Member

    Joined:
    Jul 16, 2015
    Messages:
    2
    Likes Received:
    0
    Great, thanks for the reply !
    > No result in the terminal after the command. No error message, just nothing happening.
    But now i uninstall the driver and I explained the problem in detail in the Linux Mint Forum here :
    http://forums.linuxmint.com/viewtopic.php?f=59&t=200338

    You can check what is my configuration (I run Linux Mint on a MacBook Pro) etc and what i did. In the post I mention your post, explaining what doesn't work. Yesterday, i found that it is maybe a bug related to the "EFI mode" as explained here (check last post) :
    http://forums.linuxmint.com/viewtopic.php?f=49&t=200012&p=1041264&hilit=macbook#p1041264
    The guy say :
    "I, too, have the macbook pro 7,1 and the reason you're getting the black screen is because you installed mint in efi mode. You need to reinstall it in bios mode for the graphic drivers to work."

    This post suggest that i re-install my Linux Mint but i don't want to do that, because i installed many things. My new Plan is to do a new partition and install an other Linux in dual boot with Linux Mint (and Mac of course). Do you think it's a good idea ? What about your suggestion concerning the var/log/syslog ? Should i go in this direction or follow the idea of looking after a new way to Boot my screen, through a different EFI mode ?

    Any suggestion to help my bug is welcome.
    Thanks in advance!
    Cab or Telephone
     
  7. paradise

    paradise Thread Starter
    Expand Collapse
    Elementary Member

    Joined:
    Dec 3, 2014
    Messages:
    114
    Likes Received:
    33
    Well, the /var/log/syslog is not real a solution, its the way to get more informations.

    This logfile is the first place to check if anything in the linux system isn't running that good. The syslog does log every kernel or critical driven error. Additionally, inside /var/log/ are much more logs (cd /var/log && ls -rtlha), a good idea dealing critical issues is to check the several last edited logfiles for the error msg , and google for that error.

    I think a dualboot with another linux is a good choice. I've installed beside eOS a Mint too for testing purposes :)

    EDIT: comming ubuntu releases are going to run with systemd too. The pendant for syslog will be "journalctl"
     
  8. Viking

    Viking
    Expand Collapse
    New Member

    Joined:
    Aug 26, 2015
    Messages:
    1
    Likes Received:
    0
    Hi
    I'm stuck at the point after the message "Pre-Install Script failed"
    It tells me that Nouvaeu kernel driver is currently in use by my system which is incompatible with NVIDIA driver and I have to disable it before proceeding. However I can't seem to do that :/
    Any help on that?

    if it is important: graphics card is gtx9800+ and the driver I want to install is 340.76 (64-bit)
    thx in advance ;-)

    Edit: found a solution (for those with similar problems: http://eos-snippets.blogspot.de/2014/10/installing-nvidia-driver-from-website.html)

    thx anyways for the tutorial ;-)
     
    #8 Viking, Aug 26, 2015
    Last edited: Aug 26, 2015
  9. Darius

    Darius
    Expand Collapse
    New Member

    Joined:
    Dec 11, 2015
    Messages:
    1
    Likes Received:
    1
    For me that tutorial was not working, but i found another method :)

    From the terminal run to install the driver:

    sudo add-apt-repository ppa:xorg-edgers/ppa
    sudo apt-get update
    sudo apt-get install nvidia-340 nvidia-settings

    Then create a new configuration file by running (a new configuration
    file before reboot is CRUCIAL (you may get a warning but as long as a
    new configuration file is created you are okay.....

    sudo nvidia-xconfig
    Reboot

    Download Bumblebee by running:

    sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
    Reboot

    I suggest removing the ppa by typing (this is optional):

    sudo add-apt-repository --remove ppa:xorg-edgers/ppa
     
    Guilherme likes this.
  10. user957

    user957
    Expand Collapse
    Member

    Joined:
    Oct 10, 2015
    Messages:
    8
    Likes Received:
    0
    I did the noob guide and it didn't help. Did the geek guide and now I have 2 black screens instead of 1! It says Could not turn on displaypower on i915. The it drops me at nonGUI login. As soon as I enter the first username letter the screen goes black and I cant get it back. Now I have no use of the computer at all!

    I got the screen back by ctrl alt f1. Retrying uninstall nvidia drivers.
    Failed to fetch archive.ubuntu.com ... ocl-icd/ocl-icd-libopencl1_2.1.3-4_amd64.deb

    Another nvidia driver gives
    Unable to locate nvidia-340-uvm

    Managed to uninstall drivers using sudo apt-get uninstall nvidia-*
    Upon reinstalling using the .run file it does NOT ask me about the x config file.

    Rebooted and get only the nonGUI login. Ctrl alt f7 gives a black screen. Also, only the external monitor works. The laptop's monitor is turned off.

    How do I get my computer back, please?

    Eventually both screens went black after splash. Not even a command line. No grub. Obviously the fixes mentioned can't be done then. I am actually having to reinstall the entire os and all programs because of this. Starting to regret switching to linux from win. Its just too complicated and messy.
     
    #10 user957, Jan 1, 2016
    Last edited: Jan 1, 2016
  11. Packa

    Packa
    Expand Collapse
    New Member

    Joined:
    Jan 26, 2016
    Messages:
    1
    Likes Received:
    0

    I was having the exact same problem, was lucky to find this thread, man I have spent 3 days installing it :D
    look here the this is what helped me: http://askubuntu.com/a/613573/498359
     
  12. Guilherme

    Guilherme
    Expand Collapse
    New Member

    Joined:
    Jan 27, 2016
    Messages:
    2
    Likes Received:
    0

    You are a big mother fuck !!!! kkkk <3
     
  13. agemo

    agemo
    Expand Collapse
    New Member

    Joined:
    Feb 16, 2016
    Messages:
    1
    Likes Received:
    1
    thank you paradise, good how-to which worked for me :)
     
    paradise likes this.
  14. Awwkaw

    Awwkaw
    Expand Collapse
    New Member

    Joined:
    Mar 12, 2016
    Messages:
    2
    Likes Received:
    0
    The driver installer asks me to make a modprobe file to disable noveau, and no matter if i say no or yes it exist the installation, what should i do?
     
  15. paradise

    paradise Thread Starter
    Expand Collapse
    Elementary Member

    Joined:
    Dec 3, 2014
    Messages:
    114
    Likes Received:
    33
    Hi Awwkaw, which driver version do you try to install?
    in the mean time some new versions released by nvidia are out, i guess i have to update the article soon to prevent some misunderstandings :s
     
  16. Awwkaw

    Awwkaw
    Expand Collapse
    New Member

    Joined:
    Mar 12, 2016
    Messages:
    2
    Likes Received:
    0
    Hi, i tried with the 361.28 version, so you're proberbly right.
    what i don't get is that i also get a black screen when clicking the driver in "additional drivers" (even thou that's the older version) it would be really awesome if you updated the article
     
  17. willis

    willis
    Expand Collapse
    New Member

    Joined:
    Mar 20, 2016
    Messages:
    1
    Likes Received:
    0
    i did 3 times according to you approach, everytime i re-formate the disk and re-install the OS with the image of but still black screen.
    it's been a week.
    i bought a new ASUS FL5800 with a Geforce 940m card, using the 361.28 for AMD 64, the OS is elementary Freya 64bit.
    the last trying is i installed the 'current' version from the 'software updater', and the 'settings'. once done, i saw the NVIDIA X server settings in the 'Applications' panel. after restart, still the same black screen, and Ctrl+ALt+F1 didn't work.
    could you give me any advice ?
    Thanks in advance!
    BTW, before your approach , i also tried this approach , with same result.
    http://ubuntuforums.org/showthread.php?t=2263316
     
  18. fdfsdf

    fdfsdf
    Expand Collapse
    New Member

    Joined:
    Aug 10, 2016
    Messages:
    1
    Likes Received:
    0
    Hi,
    there is no xorg.conf file on /etc/X11 or /etc/ ,when i try to create using nvidia-xconfig stuck with blank screen so , I purge all nvidia driver it works fine ?? i know the problem with my xorg but how can i resolve it ..I follewed every above steps.
     
    #18 fdfsdf, Aug 10, 2016
    Last edited: Aug 11, 2016
  19. ElementaryQuestions

    ElementaryQuestions
    Expand Collapse
    Member

    Joined:
    Feb 5, 2016
    Messages:
    5
    Likes Received:
    0
    I'm stuck in CTRl+ALT+F1 it ask for credentials

    Account-PC login:
    Password:

    Truth is I have tried to use mine but keep failing. So i cant really execute any command

    Ok I managed to login. DUnno why but use of lowercase letters is mandatory

    Now I can't proceed with driver install. It says nouveau driver is in use by system. I have stopped lightdm service
     
    #19 ElementaryQuestions, Sep 15, 2016
    Last edited: Sep 15, 2016
  20. Barnyard

    Barnyard
    Expand Collapse
    New Member

    Joined:
    Jan 1, 2017
    Messages:
    1
    Likes Received:
    0
    Thank you for writing this!!!!!!! I've just wasted a week and a half trying to get the drivers work.
     

Share This Page

Loading...