Friday, November 9, 2012

How to Install Nvidia Drivers In Ubuntu

Due to the large number of Install guides, all with different methods I decided to make one central guide with the methods that worked for me. This guide will Cover installing the Ubuntu provided drivers and also the binary drivers from Nvidia itself.


To install Ubuntu provided Nvidia drivers (If the sources "additional drivers" didn't work for you either):

 1) Ctrl-Alt-F1 and login as your username
2) Code: sudo apt-get install linux-source
and headers
Code: sudo apt-get install linux-headers-generic
3) Uninstall nvidia driver - this depends on which version you tried to install from additional drivers :
Code: sudo apt-get remove nvidia-current
Code: sudo apt-get remove nvidia-current-updates
Code: sudo apt-get remove nvidia-experimental-304

4) NOTE: You can install "nvidia-current" "nvidia-current-updates" or "nvidia-experimental-304"
Code: sudo apt-get install nvidia-current-updates 

5) Code: sudo shutdown -r now 

That should get the nvidia drivers of your choice working.


 I recommend that rather than installing the experimental branch of drivers, that you just go ahead and install the binary drivers from Nvidia.

At your own Risk! 

To Install Binary Drivers from Nvidia (This is what worked for me):

This guide assumes you have the above Nvidia drivers working, if not skip step 1.
 But I believe you will still need to install the headers outlined in the above guide. ^^^ Step 2

0) Download the drivers from Nvidia depending on your card, and place the .run on your desktop. Right click and go into properties and find "Allow executing as a program" and click it.

1) NOTE: Depends on which version you currently had above (nvidia-current-updates" or example) THIS STEP IS ONLY FOR USERS WITH NVIDIA DRIVERS ALREADY INSTALLED. If not, please skip step 1. 

1. Code: sudo apt-get purge nvidia-current nvidia-settings
2) Code: sudo service lightdm stop
3) ctrl-alt-f1
4) Login
5) Then switch to the directory where your drivers are (I put mine on my Desktop)

Code: cd Desktop
6) Then install the driver: 

Code: sudo ./N 

Then hit tab and Ubuntu will automatically fill in the exact driver name so you don't have to type out the long name. (Granted you don't have another N-titled launcher)

7) Follow the prompts and install the driver. 

If you get an issue with Nouveau (like I did at first)

Code: sudo apt-get --purge remove xserver-xorg-video-nouveau
9) Then reinstall the driver (If you can) and if even if you cannot, run:

Code: sudo update-initramfs -u and reboot.

You should now have a working Nvidia driver without messing with black lists and Nouveau drama.

Closing thoughts: Please take note that with every kernel you will have to reinstall the Nvidia drivers of your choice if and only if you installed the .run file.
Thank you for your time, and please let me know if this guide can be improved, or it didn't work for you. Both of which I will try to correct, thank you. -Dlambert


No comments:

Post a Comment