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

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).





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


Accept or we won't get anywhere







Continue! (Yes)





Almost done, sir!







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






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.





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
 
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
    david@david-desktop:~/NVIDIA > find . -type d
    .
    ./331.38
    ./334.16-BETA

    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?
 
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?

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 :)
 
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.
 
Cool, I'll try that. So add PPA, then search for Nvidia drivers & settings?
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
 
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?
 
Now I can't even re-install the 319 drivers.
Need some help, I'm stuck with Nouvea drivers... :(
 
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)
 
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?
 
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.
 
Exactly, and Steam recommends keeping your distro up to date as well.
I'm just kinda scared since the Marley-PPA didn't work.
 
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
 
Back
Top