Monday, February 10, 2014

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









No comments:

Post a Comment