[How-To] Install the latest NVIDIA Drivers in Linux Mint 16 (petra)

Discussion in 'Linux Guides (Generic)' started by allenskd, Feb 11, 2014.

  1. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    This is post from my blog: How to install the latest NVIDIA Drivers in Linux Mint 16 "petra"

    Hey there, linux users around the world. I'll be writing a little how-to install NVIDIA drivers

    Please follow this guide if:
    • You are willing to dirty your hands with the terminal. Ubuntu and its variants (Linux Mint) has done a great job in maintaining the simplicity.
    • You really need the drivers. Some drivers could lead to instability, uninstalling them is an easy task though.
    • You want the latest NVIDIA drivers for Linux, I think that's why you are here. Let's get started
    Things you need to know beforehand. If your distro upgrades the kernel or any X.org package there's a high possibility that your drivers might break. This isn't a big issue because you can reinstall them as many time as you want. I always keep a folder of NVIDIA drivers in my home directory. Example:


    david@david-desktop:~/NVIDIA > find . -type d
    .
    ./331.38
    ./334.16-BETA

    Now, whenever I download the drivers I always make sure to place them driver in different folders because they are easy to access. This is just a suggestion, if you don't want to do it that's your choice.



    Anyway, let's go get our stuff ready


    Step 1) Download the drivers



    Step 2)

    sudo apt-get install linux-headers-`uname -r` build-essential
    sudo apt-get purge xserver-xorg-video-nouveau nvidia*
    sudo update-initramfs -u -k all


    Step 3) Logout and switch to a different TTY, press CTRL + ALT + F1 (you can use from F1 to F6 Linux Mint usually uses F8 for the display output).



    [​IMG]

    You'll be in tty1 after you pressed CTRL + ALT + F1



    Login with your user and password



    Step 3) An important note, at least in my Linux Mint 16 we use MDM which is the Mate Display Manager, the one that handles greetings and let us login into different sessions. What we are going to do is stop it. In an enviroment like Lubuntu where the DM is LightDM then you would say "sudo service lightdm stop"

    sudo service mdm stop


    Step 4) Go to the directory where you downloaded your drivers



    I'm going to use drivers 331.38 in my example, it could be different for you.



    Step 5)

    chmod +x NVIDIA-Linux-x86_64-331.38.run
    sudo ./NVIDIA-Linux-x86_64-331.38.run
    [​IMG]

    Accept or we won't get anywhere





    [​IMG]

    Continue! (Yes)



    [​IMG]

    Almost done, sir!



    [​IMG]



    Step 6) The installer will ask you if you want to enable DKMS. What DKMS support will do is that every time there's a new kernel update it will automatically build the driver. I haven't tested this feature so I answered in mine no.


    Step 7) The installer will ask you if you want to install 32 bit libraries. Say yes unless you want to say good bye to Steam and WINE games. The installer will install it in: /emul/ia32-linux/usr/lib/



    Step 8) The installer will ask you if you want to update X.org configuration. I always choose yes.



    Step 9) You are done, reboot and come back here because you aren't done.



    Step 10) Once you logged into your machine.


    sudo kate /etc/ld.so.conf


    Step 11) Add the path /emul/ia32-linux/usr/lib at the end of the file


    [​IMG]



    Step 12)


    sudo ldconfig -v


    Congrats, you are done. Please leave any questions or doubts here. The reason for adding 32 bit libraries of those drivers is because a lot of games and applications like WINE 32bit still uses them. Steam won't "find" OpenGL.so because there's no 32 bit alternative.

    [​IMG]



    Things to know:

    • You don't have to update ldconfig everytime you install the drivers
    • The NVIDIA drivers will usually save your answers for later installations
    • You can uninstall the drivers by saying sudo ./NVIDIA[longname].sh -uninstall
    booman and Kladiator like this.
  2. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    I have to admit, I never did it this way.
    But then again Fedora is a different monster ;)

    When I download the drivers I go as far as renaming it so its easier to remember. Those long file names are pretty annoying.
    Thats a personal preference of course...

    I have a few questions (which will show my lack of Linux knowledge):
    1. I don't fully understand the first part where you store your drivers in different folder. They syntax is confusing to me
      I would probably just keep the drivers in my /home directory so its easy to find but it appears you have created an NVIDIA directory in root. What does the periodslash mean? wait a second... are you renaming the drivers as well?
      Did you rename them to 331.38 and remove the extension? Then you are just running them via console from the NVIDIA folder. Guess I answered my own question. Maybe a few extra steps explaining this would help new Linux users

    2. In step 10, can I use nano instead of kate to edit the ld.conf?
    3. I remember other distros telling us to kill "X" before installing NVIDIA drivers. I don't see a step for that, so I'm guessing we don't have to do that any more?
  3. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    1. I don't rename them I store them in folders

    (main folder) NVIDIA
    | - (folder) 331.38
    | - File inside 331.38

    Take a look at this screenshot, you'll get the idea

    2. You can use any editor you are comfortable with :)

    3. Stopping MDM stops X :) It could be different if you are using other distros. Example, Lubuntu uses "LightDM", it also stops X if you force it to stop.

    As for file names, when you start writing the file name you can press TAB and it will autocomplete the name of the file :)
    booman likes this.
  4. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Great, thank you for answering my questions.
    The way you presented the folders was confusing me (I still have Windows in my head). Yup, I learned the Tab trick and still forget to use it.
    Originally I would rename because I kept making "typos" and get an errors.

    I just wasn't sure if a specific text editor was required. Most new users won't even realize that the Terminal has text editors.
  5. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
  6. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Cool, I'll try that. So add PPA, then search for Nvidia drivers & settings?
  7. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Yep. Just search the package's name. Remember to uninstall other nvidia drivers before installing that one.

    In case of doubt
    After adding the PPA

    sudo apt-get update && sudo apt-cache search nvidia

    you should see the latest NVIDIA driver listed by version
  8. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    uninstalling requires:
    Code:
    sudo apt-get remove -purge
    correct?
  9. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    sudo apt-get purge [filename]

    but yea apt-get --purge remove also works, to be honest I had to google because I've been so used to apt-get purge myself
    booman likes this.
  10. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
  11. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    I added the Marley PPA and it shows up in my sources list.
    Now I go to Driver Manager and click Nvidia-334
    It loads, but after rebooting login screen never appears.
    I have to go to TTY and apt-get purge nvidia-334 in order to get nouveau back so I can login.
    Is this driver not supported or am I installing it incorrectly?
  12. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Now I can't even re-install the 319 drivers.
    Need some help, I'm stuck with Nouvea drivers... :(
  13. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Alright, I removed the Marley PPA and then re-installed 319. I"m back in business, but now I'm afraid the 334 isn't going to work in Mint 16 (saucey)
  14. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Hey booman, seems like this thing alerted me too late. Sorry to hear about the drivers, what's your card model?( 750, 580? 440?)

    I do manual installations... never had a need to install through debian packages :[ was there any sign of error log?
  15. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    550 Ti
    No problem, I was able to get my 319 drives installed.
    I don't mind trying a manual install, but I've read many people say only to use the drivers provided by the Distro.
  16. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Now that I am in Mint 16 64-bit
    I was thinking of adding this Ubuntu PPA at xorg-edgers: add-apt-repository ppa:xorg-edgers/ppa
    Then trying the 331 or 337 drivers. I really need to know how to do this so I can stay up-to-date with my video drivers.
    What do you think?
  17. mrdeathjr28

    mrdeathjr28 Active Member

    Joined:
    Mar 9, 2014
    Messages:
    587
    Likes Received:
    38
    Trophy Points:
    28
    On wine its recommended have lastest version of drivers, on my case added 38 videos on my youtube channel with this drivers and wine 1.7.16 and works good



    :)
  18. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Exactly, and Steam recommends keeping your distro up to date as well.
    I'm just kinda scared since the Marley-PPA didn't work.
  19. mrdeathjr28

    mrdeathjr28 Active Member

    Joined:
    Mar 9, 2014
    Messages:
    587
    Likes Received:
    38
    Trophy Points:
    28
    try install manually, if you have 331 now its more simple
  20. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,347
    Likes Received:
    627
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    I have done that in the past, but have read that its a bad idea to manually install if you can just use a PPA

Share This Page