How to install the Nvidia proprietary drivers in LinuxMint

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
McLovin

How to install the Nvidia proprietary drivers in LinuxMint

Post by McLovin »

If you are having trouble with drivers that are installed using the "Addition Drivers" tool included in LinuxMint, that is when you should try this method, if the drivers installed using that tool work for you, there is no reason to do this. Also if you are an eperiencedlinux user, and want to experiment with the latest Nvidia drivers, then this is for you.
This is for current Nvidia graphics card support only, this will not work for legacy cards.
This also will not work on "Hybrid" (laptops that have both an Intel ow power GPU, and an Nvidia discrete/standard GPU) tose require you to use a seperate method, or change settings in you BIOS


Ok, a lot of people seem to be having major issue getting their Nvidia gfx card drivers installed, so I decided to write up a little tutorial on how to get them installed, and working, the best way that I have found.
1: First, identify you Nvidia card, for me, it's an Nvidia GTX460-OC, so I can use the latest and greatest. Next thing you have to do is go http://www.nvidia.com/content/global/global.php, and select your country/region, for me, it's "USA/Canada". Or, if you like, you can just skip all the crap, and go directly to the drivers download site, which is located here at the Nvidia driver download section. This will bring you to the Nvidia "Manual Driver Search"
Image
Once you are here, all you have to do is use the dropdown selection to select your card, 32, or, 64 bit Linux, and your language, click on start search, and select the most recent driver for your card. Download the file to someplace easy to get to, I would recommend downloading it to your users home folder, (/home/<your_user_name>), as you're going to have to get to this folder from a command line.

2: Once you have the driver downloaded you need to make it executable, to do this, just right click on the file, and select "properties"
Image
this will open the properties dialog window, once that window is open, go to the "permissions" tab, and click to add a "check mark" to the "Allow executing file as program"
Image
This is going to allow you to execute the installer. At this point, I would also recommend renaming the file to something that is both easy to remember, as well as type into a command, I personally usually rename it to n.run, you can rename it to whatever you like.

3: Now this is where things start to get slightly more difficult, but don't worry, it's really not that complicated at all, but from this point on I am not going to be able to show you screen shots due to the fact that the rest of the install has to be done in in a command line interface. To get to a cli, (command line interface), all you have to do is press ctrl+alt+f1 at the same time, this will take to what is called "tty1", once you are there, you will see something telling you to login, you can easily login as your normal user, just type your username, hit anter, and then it will ask you for your password, enter it, and press enter, and then you will be logged in.

4: Now that you are logged in, you have to shut down the Display Manager. If you are using a recent version of LinuxMint, such as Mint 14, you are most likely using MDM, or Mate Display Manager, (if you're using KDE, then you're most likely using kdm, or K Display Manager), for this tutorial, we will be using MDM. Now, to shutdown mdm, you ust have to enter the command

Code: Select all

sudo /etc/init.d/mdm stop
this will shut down MDM, and you can now go on with beginning of the driver install.

5: Now you have to go to the directory where you downloaded the driver, if you downloaded it to your users home folder, you are already there, so you can go on the next step, however, if you downloaded it to someplace else, you need to "CD", or change directory, to where you downloaded it, so if you downloaded it to say /home/<your_username>/Downloads, then you would issue the command

Code: Select all

cd /home/<your_username>/Downloads
remember that the directory names are case sensitive.

6: Now we need to start the install, to do this we issue the command to run the Nvidia driver installer, for this tutorial we are going to use the name that I showed you earlier, "n.run", if you named it something else, you would use that name in place of it. The command you need to run is

Code: Select all

sudo ./n.run

Again, remember that the names are case sensitive. Once the installer starts, you will be given a license agreement, use you arrow keys to select "Accept", and hit enter. At this point you are going to see some things about modules and other messages, just select "yes" or "continue" or whatever it is asking you do. Now things start to get interesting, because Mint, and most other distros come with the free open source nouveau nvidia driver, it has to be blacklisted before you will able to install, and use the Nvidia driver, but the Nvidia driver installer has a nice little feature, it will try to do it for you, and it will ask if you want it to do so, select yes, and it should take of it for you. Unfortunately, at this point you need to reboot, so that the system can unload the nouveau nvidia driver module from the kernel, which will allow you to continue, so reboot the system, and when it comes back one, one of two things will happen, either you will 1: be in a cli with a login prompt, or 2: be in a low graphics mode, in which case, you will need to hit ctrl+alt+f1 at the same time to get to tty1, and then login there. Either way, you are going to have to once again shut down MDM by issuing the command

Code: Select all

sudo /etc/init.d/mdm stop
now that all that is done, we can get on with the actual install of the driver.

7: Now that the nouveau nvidia driver module has been blacklisted, and everything is ready, you will once again go to the directory where you downloaded the driver by following the instructions outlined earlier in the tutorial. Once there, you will once again issue the command

Code: Select all

sudo ./n.run
to start the driver install. Again you're going to go through the install using the arrow keys to select Accept to the license agreement, and continue, and follow the instructions, and the driver will install. Now that the driver is installed, there is one more step before your driver will be ready to work on your system.

8: Now that the driver is installed, you have to configure the system to use the driver, luckily, once again, Nvidia has a tool to do this for you. At this point you need to issue the command

Code: Select all

sudo nvidia-xconfig
this will create a /etc/X11/xorg.conf configuration for the system to use, that tells the system to use the Nvidia driver you just installed.

9: Now that all this is complete, just issue the command to start your display manager once again,

Code: Select all

sudo /etc/init.d/mdm start
This will start your display manager, and, if everything went as it should have, you will be presented with your login screen, allowing you to login to your desktop, with full hardware accelerated 3D support for your full enjoyment. :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
RodneyLee

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by RodneyLee »

I get to the part where I shut down MDM, then get nothing but a blank screen, no command line to type in commands at all, woul dlove to get my gt 430 working fully
thanks
McLovin

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by McLovin »

hit ctrl+alt+f1, that will make sure you get back to the tty1, sometimes when you shut down the Xserver, it switches you to the tty7, not sure why it does it sometimes, but it's easy to just get back to tty1.
Enkidu
Level 1
Level 1
Posts: 33
Joined: Sat Apr 14, 2012 7:58 am

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by Enkidu »

When you get this error message
WARNING: The modprobe configuration file to disable Nouveau, /etc/modprobe.d/nvidia-installer-disable-nouveau.conf, is already
present. Please be sure you have rebooted your system since that file was written. If you have rebooted, then
Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X
configuration file. Please consult the NVIDIA driver README and your Linux distribution's documentation for details
on how to correctly disable the Nouveau kernel driver.
after you have rebooted your system, do the following steps:

Code: Select all

sudo apt-get purge xserver-xorg-video-nouveau libdrm-nouveau1a nvidia*
sudo update-initramfs -u -k all
and reboot again.

Enkidu
Linux Mint 16, 64bit, Cinnamon, fully encrypted (luks) on Lenovo Thinpad T520 (Intel i7, 16GB RAM, 750GB SSHD)
devenroy

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by devenroy »

Thanks alot worked 100%
voodoodoc2

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by voodoodoc2 »

I thought part of the appeal (maybe I've been misinformed) of Linux Mint is that you get the proprietary drivers by default, or at least just checking some box to install them. Is there no package for the proprietary drivers? So now what happens if you update the kernel? When you reboot X is gonna crash so you gotta go re-build a new kernel interface? This is why I gave up on 3D acceleration years ago and just used the open source drivers.

Edit: Went ahead and installed the drivers from Nvidia and it looks like it built/installed something that will supposedly take care of kernel updates. I also had to tweak a setting in the BIOS to use "Discrete" graphics rather than "Nvidia Optimus" there was also another setting that said OS will detect and set to Optimus, so I disabled that too and it works swimingly.
Steamix

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by Steamix »

Great thread. Found out very useful stuff but a bit too late :( I already spent like a full day with these drivers. I would like to add some extra info.
1)

Code: Select all

sudo /etc/init.d/mdm stop
Alternatively to the above command you can use

Code: Select all

sudo service mdm stop
Man, I took me a good 40 minutes to figure out it was "mdm". When I googled, all I got was lightdm and/or gdm. Maybe we should make a thread that explicitly states that its 'mdm' in Cinnamon? What about Mate, lighdm probably?!

2) When I installed the latest 3.7 kernel my 304.xx driver was unrecognised so I had to delete all files associated with the old driver and go through the steps given in this thread. 310.xx has no issues, so far, with the 3.7 kernel.

3) When I used the virtual console, or CLI mode, to install the drivers my screen would constantly fade to black when in any tty. I tried everything out there. Playing with grub, installing additional software, deleting all graphics-associated files etc. In the end, probably by simple curiosity, I changed the colour modes on my display "Asus VE247H" from "Scene Mode" to "Standard Mode" and what do you know? No more fading! I was about to punch a hole in the freakin' screen. :evil: Ohh well, If someone out there has a display like mine and a similar problem, try this out. My monitor is connected through HDMI so results might vary.

Cheers
voodoodoc2

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by voodoodoc2 »

Steamix wrote: Man, I took me a good 40 minutes to figure out it was "mdm". When I googled, all I got was lightdm and/or gdm. Maybe we should make a thread that explicitly states that its 'mdm' in Cinnamon? What about Mate, lighdm probably?!
I think mdm is the fork of the old gnome display manager that was created as part of the MATE project. It's the GUI that lets you log in and starts up your desktop environment.
McLovin

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by McLovin »

mdm is what is used in Mint for Cinnamon, and MATE. I think Clem may be going for XDM for the XFCE build when he does it, and KDE obviously uses KDM.
Steamix wrote:Great thread. Found out very useful stuff but a bit too late :( I already spent like a full day with these drivers. I would like to add some extra info.
3) When I used the virtual console, or CLI mode, to install the drivers my screen would constantly fade to black when in any tty. I tried everything out there. Playing with grub, installing additional software, deleting all graphics-associated files etc. In the end, probably by simple curiosity, I changed the colour modes on my display "Asus VE247H" from "Scene Mode" to "Standard Mode" and what do you know? No more fading! I was about to punch a hole in the freakin' screen. :evil: Ohh well, If someone out there has a display like mine and a similar problem, try this out. My monitor is connected through HDMI so results might vary.

Cheers
This is due to a power saving feature built into most LCD/LED monitors and TVs, it fades out to save power not lighting pixels that are going to be black, the issue with that in CLI is that most of the screen is black, causing issues with the lighting of the screen.
zerozero

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by zerozero »

McLovin wrote: I think Clem may be going for XDM for the XFCE build when he does it,
it's done and uses mdm http://blog.linuxmint.com/?p=2246
McLovin

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by McLovin »

zerozero wrote:
McLovin wrote: I think Clem may be going for XDM for the XFCE build when he does it,
it's done and uses mdm http://blog.linuxmint.com/?p=2246
Jeez, I've been sick for way too long
zerozero

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by zerozero »

i'm terrible sorry to hear that, sincerely hope you are felling better :)
RodneyLee

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by RodneyLee »

RodneyLee wrote:I get to the part where I shut down MDM, then get nothing but a blank screen, no command line to type in commands at all, woul dlove to get my gt 430 working fully
thanks
OK I got past that part, printing instructions helpped, now I have bailed out of install because of distribution provided "Pre-install" script not working, continue or exit, I exited
coul dI have gone on/, was this a needed component?

-R
McLovin

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by McLovin »

there is no pre install script for any distribution, justcontinue
RodneyLee

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by RodneyLee »

McLovin wrote:there is no pre install script for any distribution, justcontinue
thanks will give it another go
RodneyLee

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by RodneyLee »

RodneyLee wrote:
McLovin wrote:there is no pre install script for any distribution, justcontinue
thanks will give it another go
Got it thanks, now some of my Secondlife Viewers work.....
lemonickous

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by lemonickous »

I'm using Asus N61J laptop with GT325M. I tried installing these drivers and only had one "error" which I didn't think was a major one:
The NVIDIA 32-bit compatibility OpenGL libraries are to be installed relative to the top-level prefix (chroot) '/emul/ia32-linux'; however, this directory does not exist. Please consult your distribution's documentation to confirm the correct top-level installation prefix for 32-bit compatiblity libraries.

Do you wish to install the 32-bit NVIDIA OpenGL compatibility libraries anyway? (Answer: Yes)

But then after restarting mdm my screen shrunk to 640x480 (like safe mode Windows) or something just like it had when I'd tried to install nvidia via the package manager. Is there a way to undo this without having to reinstall mint? I just want to do software dev in linux and I swear I won't bother about stupid video drivers that I've wasted 2 days on.

Edit: In addition, now when I try to sudo mdm stop from tty1, the laptop just goes into a blank screen with a blinking cursor and I have to press the power button to halt and restart it.

Halp please :(
voodoodoc2

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by voodoodoc2 »

lemonickous wrote:I'm using Asus N61J laptop with GT325M. I tried installing these drivers and only had one "error" which I didn't think was a major one:
The NVIDIA 32-bit compatibility OpenGL libraries are to be installed relative to the top-level prefix (chroot) '/emul/ia32-linux'; however, this directory does not exist. Please consult your distribution's documentation to confirm the correct top-level installation prefix for 32-bit compatiblity libraries.

Do you wish to install the 32-bit NVIDIA OpenGL compatibility libraries anyway? (Answer: Yes)

But then after restarting mdm my screen shrunk to 640x480 (like safe mode Windows) or something just like it had when I'd tried to install nvidia via the package manager. Is there a way to undo this without having to reinstall mint? I just want to do software dev in linux and I swear I won't bother about stupid video drivers that I've wasted 2 days on.

Edit: In addition, now when I try to sudo mdm stop from tty1, the laptop just goes into a blank screen with a blinking cursor and I have to press the power button to halt and restart it.

Halp please :(
Give your bios settings a look. See my earlier post for more info. I seen the same thing with the optimus settings. Changed to discrete and works flawlessly.
Jon723

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by Jon723 »

My apologies for my previous post which I am now editing (i was half asleep).I'm on an Acer M4810-TG and I downloaded the latest nvidioa driver from the website as stated in the beginning of the thread. I went through with the install but this has somehow gotten rid of the GLX extensions that are needed to run the Cinnamon Desktop. My resolution is really really small and it looks like I'm in the Gnome desktop. My laptop has both an on board video card and an Nvidia 640M LE video card. I'm at a loss as to how to get the extensions installed again. When I look at the settings to see which driver is running it says "fallback". I've gone through the package manager to see if there was anything to download that would work bu, no such luck. Is this something where I need to re-download the drivers for the onboard video card (4000M series)? :cry: :cry: :cry:
tany3450

Re: How to install the Nvidia proprietary drivers in LinuxMi

Post by tany3450 »

i am writing this post from linux mint with half screen :D everthing done without problem, until "sudo /etc/init.d/mdm stop" which is just before step 7. when i run this command i get nothing but black screen and cursor. when i run this command on the previous steps there were no problems. need to use windows till you help me . thanks

edit : solution for this problem was mentioned on the first page . i look to bios but i couldnt find anything useful :( pls help me i dont wanna format my mint :(

i am using gt 540m with optimus technology. i installed bumblee project a month ago but just before installing nvidia driver today , i've deleted it from package manager. recovering my system is more important for me now than install nvidia driver :cry:

--edit2---

solved by myself :D
If you are installing the Nouveau drivers after uninstalling the Nvidia ones, be sure to delete the /etc/X11/xorg.conf file that the Nvidia driver created (or undo the changes), or else X will fail to properly load the Nouveau driver.
Install the DDX driver with the xf86-video-nouveau package.
Also make sure you have Xorg properly installed.
If you want hardware-accelerated 3D support (to run GNOME Shell or KWin's effects, for instance), install the DRI driver with the nouveau-dri package. For Arch x86_64, install lib32-nouveau-dri from the Multilib repository, as well.
this worked for me finally i get my full screen back ! and i decide to use primus for bumblebee :D
Locked

Return to “Graphics Cards & Monitors”