Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo
* * * * * 2 votes

How to install Nvidia Graphic Drivers (non repository install)


  • Please log in to reply
3 replies to this topic

#1 DeimosChaos

DeimosChaos

  • BC Advisor
  • 1,420 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States, Delaware
  • Local time:05:48 PM

Posted 07 July 2015 - 07:06 PM

How to install Nvidia Graphic Drivers (non repository install):

 

The following guide was performed on a clean install of Ubuntu 15.04

 

The following guide is an attempt to help you, the user, install the Nvidia Graphic drivers on your Linux system. Typically one would install the repository edition Nvidia drivers, but sometimes you just want the latest and greatest directly from Nvidia themselves (sometimes more latest than greatest....). Fortunately Nvidia has stepped up their game and made their Linux drivers much better than they have been in the past (anyone with the optimus setup, half integrated Intel half dedicated graphics, will understand what I am talking about... bumblebee drivers anyone?).

 

Enough of an intro, lets move on to the good stuff!

 

These install instructions assume a clean install of Linux and running the default. Most steps are the same even if it isn't a clean install and not running defaults.

 

Any code wrapped in a box, like so:

Code

Means to open a terminal command window and type those lines into there, or if you have already stopped the X server, type the commands into the tty terminal.

 

Step 1:

 

The first step is to navigate to the Nvidia driver page and picking the correct graphics driver download for you specific card. Don't forget to make sure you pick either "Linux 64-bit" for 64 bit Linux systems, and "Linux 32-bit" for the 32 bit systems.

 

Before continuing make sure you save off your "xorg.conf" configuration file just in case.

cp /etc/X11/xorg.conf /home/user/Documents/xorg.conf.backup
Step 2:

 

The next step is to stop the X window display server. This step is going to vary a bit depending on what Linux distro you are running.

 

Hit Ctrl + Alt + F1 (or F2, F3, F4, F5, F6). This will bring you to one of the "tty" screens, which is just a text based command line screen.

 

This part is the one that varies some.

 

If you are running Ubuntu 15.04 type in:

sudo service lightdm stop

You can use the above for Ubuntu all the way back to Ubuntu 12.04, before that it was running gdm.

 

If you are running Linux Mint 17 with Mate Desktop type in:

sudo service mdm stop

To make this tutorial more complete, if you know what the command is on your particular distro you run, please post it below. I will update the tutorial as needed. If you can't figure out how to stop your X server display please post a new topic in the "Linux" section of the forum, or if you have any problems trying to do this tutorial please post a topic in the "Linux" section.

 

Step 3:

 

Once the X server has been stopped (you can verify by hitting Ctrl + Alt + F7) you can now begin the Nvidia install.

 

Navigate to where your Nvidia file is located, change permissions, and run file.

cd NvidiaDirectory/

chmod 777 NVIDIA-Linux-x86_64-352.21.run

sudo ./NVIDIA-Linux-x86_64-352.21.run

This will start the Nvidia installer.

 

6U9e8q.png

 

The installer will then spit out some "Pre-install script failed" you can ignore this.

 

zoKK3u.png

 

Step 3 STOP, ERROR ALERT:

 

If you are on a clean install, you could possibly get the following error due to using the "Nouveau" drivers.

 

NcQfUU.png

 

All you should need to do is hit "ok" to allow the install script to add a file in the modprob configuration directory. This disables the Nouveau drivers so the Nvidia drivers can be used instead.

 

Smrk88.png

 

This will require a reboot of your system. Once you reboot start back at Step 2, and then skip past this error when you reach it.

 

Step 3 Continued:

 

Z0wwmc.png

 

Once the Nvidia script loads you will be asked if you want to run the "nvidia-xconfig utility". Go ahead and run this, if something goes wrong you made a backup of your xorg.conf file!

 

xPQbX4.png

 

Installation of the Nvidia Graphics drive is now complete! You can now restart your machine and everything should come up okay!

If something goes wrong see below for a couple possible scenarios. If one of them isn't your problem, please post a new topic in the "Linux" section with details of your problem.

 

Possible Issues:

 

Now that you have completed the install process, hopefully everything went okay! If not, here are a couple issues that I have ran into.

 

Screen size stuck at 800x600 resolution:

 

I had an issue (on my Lenovo Y580 laptop, running the optimus setup) where the screen size was stuck at 800x600 resolution and would not recognize my 1080p screen size. After a good hour of googling the issue I finally found someone with a similar problem. The solution was to edit the "HorizSync" and "VertRefresh" to the correct monitor settings in the xorg.conf file (I just plugged in some numbers that someone had posted and it worked, if anyone knows of a good way to find out monitor sync and refresh settings please post it).

 

BusyBox command line after reboot:

 

When I was installing Nvidia for this tutorial my computer booted into just a BusyBox command line screen after installing and rebooting. I rebooted the machine and it then came up fine, not sure if this was a fluke or not but if you get a BusyBox command line after installing just reboot again and see if it boots normally.

 

Well there you have it. This completes the tutorial on how to install the Nvidia Graphic Drivers. It isn't difficult, but can be a bit imposing for newer users, so hopefully this simplifies things a bit. There are easier ways, like installing from repository, but some people (like me) like to use the newest from Nvidia directly. Hopefully this helps you out on that quest!

 

:hello:


OS - Ubuntu 14.04/16.04 & Windows 10
Custom Desktop PC / Lenovo Y580 / Sager NP8258 / Dell XPS 13 (9350)
_____________________________________________________
Bachelor of Science in Computing Security from Drexel University
Security +


BC AdBot (Login to Remove)

 


#2 DeimosChaos

DeimosChaos
  • Topic Starter

  • BC Advisor
  • 1,420 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States, Delaware
  • Local time:05:48 PM

Posted 18 July 2015 - 11:33 PM

*Edit July 19th 2015

 

Thanks to marcoose777 (post #32 in "What Tutorials would you like to see in the Linux-how-to section") for reminding me about dkms.

I ran into problems with my own Nvidia install on a new installation of Ubuntu 15.04, did some searching on it and looking through the help menu of the Nvidia drivers I found that there is a "--dkms" option for it. Which, turns out it is as simple as installing dkms on your system then running that option when installing the drivers. I was able to run the Ubuntu updates (which had kernel updates) and had no problems booting into the desktop (which I did previously when not running the dkms option).

Added in a better way to blacklist the Nouveau drivers.

Added to the bottom how to uninstall the Nvidia drivers.

 

How to install Nvidia Graphic Drivers (non repository install):

 

The following guide was performed on a clean install of Ubuntu 15.04

 

The following guide is an attempt to help you, the user, install the Nvidia Graphic drivers on your Linux system. Typically one would install the repository edition Nvidia drivers, but sometimes you just want the latest and greatest directly from Nvidia themselves (sometimes more latest than greatest....). Fortunately Nvidia has stepped up their game and made their Linux drivers much better than they have been in the past (anyone with the optimus setup, half integrated Intel half dedicated graphics, will understand what I am talking about... bumblebee drivers anyone?).

 

Enough of an intro, lets move on to the good stuff!

 

These install instructions assume a clean install of Linux and running the default. Most steps are the same even if it isn't a clean install and not running defaults.

 

Any code wrapped in a box, like so:

Code

Means to open a terminal command window and type those lines into there, or if you have already stopped the X server, type the commands into the tty terminal.

 

Step 1:

 

The first step is to navigate to the Nvidia driver page and picking the correct graphics driver download for you specific card. Don't forget to make sure you pick either "Linux 64-bit" for 64 bit Linux systems, and "Linux 32-bit" for the 32 bit systems.

*NEW STEP*

After the Nvidia drivers are downloaded lets install dkms and blacklist the Nouveau drivers.

sudo apt-get install dkms 
sudo vi /etc/modprobe.d/blacklist.conf 

Add the following to the end of the blacklist.conf file you just opened up in vi (or vim if you have that installed). Taken from here

blacklist amd76x_edac

blacklist vga16fb

blacklist nouveau

blacklist rivafb

blacklist nvidiafb

blacklist rivatv 

Before continuing make sure you save off your "xorg.conf" configuration file just in case.

cp /etc/X11/xorg.conf /home/user/Documents/xorg.conf.backup

 

Restart your PC. When it comes back up the Nouveau drivers should be blacklisted allowing you to install the Nvidia drivers without any errors or warnings regarding them.

 

Step 2:

 

The next step is to stop the X window display server. This step is going to vary a bit depending on what Linux distro you are running.

 

Hit Ctrl + Alt + F1 (or F2, F3, F4, F5, F6). This will bring you to one of the "tty" screens, which is just a text based command line screen.

 

This part is the one that varies some.

 

If you are running Ubuntu 15.04 type in:

sudo service lightdm stop

You can use the above for Ubuntu all the way back to Ubuntu 12.04, before that it was running gdm.

 

If you are running Linux Mint 17 with Mate Desktop type in:

sudo service mdm stop

To make this tutorial more complete, if you know what the command is on your particular distro you run, please post it below. I will update the tutorial as needed. If you can't figure out how to stop your X server display please post a new topic in the "Linux" section of the forum, or if you have any problems trying to do this tutorial please post a topic in the "Linux" section.

 

Step 3:

 

Once the X server has been stopped (you can verify by hitting Ctrl + Alt + F7) you can now begin the Nvidia install.

 

Navigate to where your Nvidia file is located, change permissions, and run file.

cd NvidiaDirectory/

chmod 777 NVIDIA-Linux-x86_64-352.21.run
sudo ./NVIDIA-Linux-x86_64-352.21.run
sudo ./NVIDIA-Linux-x86_64_352.21.run --dkms 

This will start the Nvidia installer and also register the Nvidia kernel module sources. This will allow you to update the kernel without (hopefully) any negative side effects, like not being able to boot into the desktop.

 

6U9e8q.png

 

The installer will then spit out some "Pre-install script failed" you can ignore this.

 

zoKK3u.png

 

Step 3 STOP, ERROR ALERT:

 

If you are on a clean install, you could possibly get the following error due to using the "Nouveau" drivers. (If you have already blacklisted the Nouveau drivers in the above step, then you will not get this error)

 

 

NcQfUU.png

 

All you should need to do is hit "ok" to allow the install script to add a file in the modprob configuration directory. This disables the Nouveau drivers so the Nvidia drivers can be used instead.

 

Smrk88.png

 

This will require a reboot of your system. Once you reboot start back at Step 2, and then skip past this error when you reach it.

 

Step 3 Continued:

 

Z0wwmc.png

 

Once the Nvidia script loads you will be asked if you want to run the "nvidia-xconfig utility". Go ahead and run this, if something goes wrong you made a backup of your xorg.conf file!

 

xPQbX4.png

 

Installation of the Nvidia Graphics drive is now complete! You can now restart your machine and everything should come up okay!

If something goes wrong see below for a couple possible scenarios. If one of them isn't your problem, please post a new topic in the "Linux" section with details of your problem.

 

Possible Issues:

 

Now that you have completed the install process, hopefully everything went okay! If not, here are a couple issues that I have ran into.

 

Screen size stuck at 800x600 resolution:

 

I had an issue (on my Lenovo Y580 laptop, running the optimus setup) where the screen size was stuck at 800x600 resolution and would not recognize my 1080p screen size. After a good hour of googling the issue I finally found someone with a similar problem. The solution was to edit the "HorizSync" and "VertRefresh" to the correct monitor settings in the xorg.conf file (I just plugged in some numbers that someone had posted and it worked, if anyone knows of a good way to find out monitor sync and refresh settings please post it).

 

BusyBox command line after reboot:

 

When I was installing Nvidia for this tutorial my computer booted into just a BusyBox command line screen after installing and rebooting. I rebooted the machine and it then came up fine, not sure if this was a fluke or not but if you get a BusyBox command line after installing just reboot again and see if it boots normally.

 

Well there you have it. This completes the tutorial on how to install the Nvidia Graphic Drivers. It isn't difficult, but can be a bit imposing for newer users, so hopefully this simplifies things a bit. There are easier ways, like installing from repository, but some people (like me) like to use the newest from Nvidia directly. Hopefully this helps you out on that quest!

 

Uninstalling Nvidia drivers:

If you wish to uninstall the Nvidia drivers it is as simple as running the following command:

./Linux-Nvidia-driver --uninstall

Don't forget to un-blacklist the Nouveau drivers!

 

:hello:


Edited by DeimosChaos, 19 July 2015 - 05:31 PM.

OS - Ubuntu 14.04/16.04 & Windows 10
Custom Desktop PC / Lenovo Y580 / Sager NP8258 / Dell XPS 13 (9350)
_____________________________________________________
Bachelor of Science in Computing Security from Drexel University
Security +


#3 TheJokerz

TheJokerz

  • Members
  • 286 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:05:48 PM

Posted 12 August 2015 - 03:12 PM

Awesome thank you so much!!! :thumbup2:


utl8q0-5.png


#4 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 7,015 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:05:48 PM

Posted 30 August 2015 - 12:42 AM

Great Tutorial, DC! :thumbup2:

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users