Installing downloaded NVIDIA drivers in GNU/LINUX

Installing downloaded NVIDIA drivers in GNU/LINUX ? Then this might turn out to be a headache for novice GNU/LINUX users. Yes, that did for me and many of my friends as well. So am sharing this with you guys. nvidia linux driver

Why do I need to manually install drivers ?

"Hey wait a sec. I can install the drivers from the software repositories. So why do i need to download the drivers manually and install them running all the command, all going through the hardship ?" - Is this the question you are asking ? Then here are your answers :
  1. Drivers provided in the software repository are a bit outdated and may miss important bug fixes and updates ( This proved to be a disaster for me )
  2. Drivers download from NVIDIA's website are the latest ones and come with important bug fixes and updates ( even if they are minor, they increase your card's performance )
  3. Sometimes, you may want to install the drivers yourselves ( The geeky fellow )

So, how to install it ?

There are three steps in installing the driver downloaded from NVIDIA website :
  1. Download the driver from NVIDIA Drivers download page ( If you already have the driver, then make sure it is the latest one )
  2. Install dkms if not installed. You can do this by issuing the following command :
  3. sudo apt-get install dkms
  4. Deactivating the default driver ( This process is automatic, you don't need to break a sweat ) NOTE : Needs a restart
  5. Installing the driver NOTE : Needs a restart

Deactivating the default driver :

  1. Press 'Ctrl+Alt+F1'
  2. Now login using your username and password
  3. Enter the following :
    sudo telinit 3
    echo $XDG_CURRENT_DESKTOP ( Note the output for this command )
    sudo service DesktopManager stop
    ( NOTE : Replace DesktopManager with the replacement term from the following table
    )
    
    Replacement Terms
    Desktop Environment  Replacement Term
     Unity  lightdm
     GNOME  gdm
     KDE  kdm
     LXDE  lxdm
  4. Now press 'Ctrl + Alt + F2'
  5. Again login using your username and password
  6. Then enter the following :
    cd DriverPath ( Replace the DriverPath with the path to the driver file )
    [ For e.g  cd Downloads/ ]
    chmod +x driverfile ( Replace driverfile with the name of the driver file )
    [ For e.g. chmod +x NVIDIA-Linux-x86_64-331.20.run ]
    sudo ./driverfile
    [For e.g ./NVIDIA-Linux-x86_64-331.20.run ]
    
  7. Accept the license terms
  8. If the installation states something like 'Preinstallation script was not successful ' or something of similar sort, click on 'OK' and continue with the installation
  9. The installation will detect the default driver ( in my case , it was Nouvea ) and the installer will prompt to disable the default driver. Click on OK
  10. Again the installer will pop a message saying 'One or more files were created for disabling ***** /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Click on OK
  11. The installer will finish with a failure message. Dont panic. Click on OK. Then just reboot the system using
    sudo reboot now
    
After the reboot, the default driver would have been disabled. As a result, the graphics might seem awkward. Do not fret. Move on to the next step to complete the installation

Installing the Driver

Now its time to wrap things up and finish the game.
  1. Press 'Ctrl+Alt+F1'
  2. Now login using your username and password
  3. Enter the following :
    sudo telinit 3
    echo $XDG_CURRENT_DESKTOP ( Note the output for this command )
    sudo service DesktopManager stop
    ( NOTE : Replace DesktopManager with the replacement term )
    
  4. Now press 'Ctrl + Alt + F2'
  5. Again login using your username and password
  6. Then enter the following :
    cd DriverPath ( Replace the DriverPath with the path to the driver file )
    sudo ./driverfile ( Replace driverfile with the driver file name)
    
  7. Accept the license terms
  8. If the installation states something like 'Preinstallation script was not successful ' or something of similar sort, click on 'OK' and continue with the installation
  9. Then the Installation will compile the required kernel modules
  10. After that, the installer will prompt whether to replace 'Xorg' files. It is upto you to make that choice. I do not know what is the benefit in making either of the choices
Now the driver installation is complete. Restart the system for the changes to take effect

Posts you might like :

Stay tuned for more updates and information. See the right sidebar for links to our social networking profiles.

A LINUX enthusiast and tech passionate guy. Love to watch Anime and play cricket. Got extra bit of care in myself, guess that's what people call selfishness :-P Google+