LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-24-2009, 02:46 PM   #1
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Testing/Unstable Amd64
Posts: 1,476

Rep: Reputation: Disabled
How to install Nvidia drivers for Debian GNU/Linux.


How to install Nvidia drivers for Debian GNU/Linux

Disabling kernel mode setting.

For users of Squeeze and newer it has become necessary to disable KMS to install the Nvidia driver.
This is done with adding the following to /etc/default/grub :


Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
You should now run update-grub to save the changes.

This should be done before trying to install the Nvidia driver.
If the nouveau module is loaded it will cause the installation to fail.


I have written this how-to in response to many posts in the Debian forum regarding installing Nvidia's video drivers.
There are currently three main ways of installing the driver:

1,The 'debian method'.

2,Using the downloadable installer from Nvidia's website.

3,SMXI. A script run from the console which can automate the driver install process.

Let's start with method 1,the Debian way.

Method 1

This is the method i'd recommend if you have an older Nvidia card,such as a 4 or 5 series era card.
So you don't need the latest version driver.
Debian has already written a comprehensive install guide:

http://wiki.debian.org/NvidiaGraphicsDrivers

So i see little point in copying and pasting the relevant parts here.
If you decide this method is for you,read the guide and follow the instructions.
If you run into trouble,post on the Debian forum.
And don't forget to post as much detail as possible,ie: Which branch of Debian,what architecture you are using and what graphics card and driver you are trying to install etc.

Note

If you use the 'Debian method' and the install fails,and you then decide to try installing the driver downloaded from Nvidia.
You must purge all Debian Nvidia packages installed from the repositories.This must be done before trying to run the downloaded Nvidia installer.
Failing to do so will lead to problems later.

Method 2

This is the method to use if you have a recent graphics card or kernel,that isn't supported by the earlier drivers.
Here's how to install the driver downloaded from the Nvidia website.
First we need to install some packages from the Debian repositories.
I use aptitude,you can substitute apt-get if you are that way inclined.

Code:
aptitude install module-assistant build-essential
Next we need to run the following commands as root:

Code:
m-a update
m-a prepare
This will then install the appropriate kernel headers package etc for your current running kernel.
Now we need to download the driver from Nvidia,here's a link:

http://www.nvidia.com/Download/index.aspx?lang=en-us

Once the driver has finished downloading,put it in your /home directory.
Now we need to logout and stop the display manager,do this with:

Code:
ctrl-alt-f1
And now login as root.
We now need to stop the display manager with:

Code:
/etc/init.d/gdm stop
Or for GDM3:

Code:
/etc/init.d/gdm3 stop
Obviously you can substitute kdm or xdm as appropriate.
Now we need to navigate to where the downloaded driver resides,so from my example:

Code:
Pc1:~# cd /home/ade
Pc1:/home/ade#
Now run the installer with:

Code:
sh NVIDIA-Linux-x86_64-190.18-pkg2.run
Note:
The installer may need a different Gcc version to the one you have installed.Install the appropriate version with aptitude/apt-get and use the following to use this version temporarily:


Code:
export CC=gcc-4.3
The installer will now compile and install the module for you.
If you are installing on an amd64 machine,don't forget to install the 32 bit compat libraries when the installer prompts.
I also let the installer edit my /etc/X11/xorg.conf when prompted.
If all has gone well the driver is installed.
So now we need restart the display manager with:

Code:
/etc/init.d/gdm start
Now you should be back in the gui,but don't forget to logout as root.
Logout with:

Code:
ctrl-alt-f1
ctrl-d
ctrl-alt-f7
Make sure you have graphics acceleration working,with the following package:

Code:
aptitude install mesa-utils
And check with the following command:

Code:
glxinfo | grep "direct rendering"
It should say yes.

Method 3

The last method is Smxi:

http://smxi.org/

To install,do the following as root from a terminal:

Code:
cd /usr/local/bin && wget -Nc smxi.org/smxi.zip && unzip smxi.zip && smxi
The installer will now ask to stop X,say yes and then login as root.
To run smxi,just simply type smxi.
Work through the questions asked,like if you prefer to use aptitude or apt-get etc.
Eventually you will come to the menu where you can choose to install graphic drivers.
With smxi you have a choice of what drivers to install,from the 2d 'nv' driver to the latest beta driver from nvidia.
As it's a console application it's really as easy as pressing a number key and hitting enter.
Smxi can do a whole host of other tricks which i'm not going to go into here.
Try it,you might like it!.

I hope you find this how-to useful in someway.

The trooper.

Last edited by the trooper; 11-15-2010 at 09:53 AM.
 
Old 08-24-2009, 05:01 PM   #2
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,229

Rep: Reputation: 175Reputation: 175
Both seem overcomplicated (and why is m-a needed for the sh. driver?, m-a prepare will install a lot more than what you need).

I just do

#m-a a-i nvidia (the kernel part)
#aptitude install nvidia-glx (the user-space part, use nvidia-glx-legacy for old cards)
#aptitude install nvidia-settings nvidia-xconfig (X configuration)
#nvidia-xconfig

...never failed with any card I ever touched

Last edited by jens; 08-24-2009 at 05:15 PM.
 
Old 08-24-2009, 05:19 PM   #3
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Testing/Unstable Amd64
Posts: 1,476

Original Poster
Rep: Reputation: Disabled
Quote:
Both seem complicated (and why is m-a needed for the sh. driver?).
Okay,there's three methods here are you saying all three methods are complicated?
As regards to using module-assistant with the (sh) downloaded driver,it's a quick and easy way of installing the kernel headers and associated dependencies.
The same reason i install build-essential at the same time

Code:
#m-a a-i nvidia (the kernel part)
#aptitude install nvidia-glx (the user-space part)
#aptitude install nvidia-settings nvidia-xconfig (X configuration)
#nvidia-xconfig
Yes,that's fine for the Debian method.
Although personally i have no problems following the instructions in the Debian wiki i posted.And as always you are limited to what Debian has available in it's repos at the time.
If you don't like Debian's how-to,feel free to contact them and tell them how to improve it.

Last edited by the trooper; 09-02-2009 at 10:07 AM.
 
Old 08-24-2009, 06:07 PM   #4
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,229

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by the trooper View Post

Yes,that's fine for the Debian method.
Although personally i have no problems following the instructions in the Debian wiki i posted.And as always you are limited to what Debian has available in it's repos at the time.
I prefer the "debian way", but that wiki makes it more complicated than it is.

Debian repos might not have all versions, but most nvidia drivers are garbage anyway
 
Old 08-24-2009, 06:19 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by jens View Post
Debian repos might not have all versions, but most nvidia drivers are garbage anyway
Huh? This statement is completely at odds to the posts by most Nvidia users.
 
Old 08-24-2009, 06:37 PM   #6
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,229

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by Quakeboy02 View Post
Huh? This statement is completely at odds to the posts by most Nvidia users.
Most of those users probably prefer functionality over stability.
 
Old 08-24-2009, 07:41 PM   #7
rerushg
Member
 
Registered: Dec 2008
Location: South Carolina
Distribution: Debian testing
Posts: 57

Rep: Reputation: 16
Smile

Nice post Trooper. Thanks.
Just a thought.....
I just installed testing on my daughter's box today. Haven't gotten to the Nvidia driver yet. Are there any special considerations for the testing kernel (.30-1)?
 
Old 08-24-2009, 07:47 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by jens View Post
Most of those users probably prefer functionality over stability.
I think it has been more than 5 years since I've crashed my graphical interface due to anything I could pin on the nvidia driver.

It isn't perfect, and I do wish it behaved better when the video card runs out of memory, but it doesn't crash.
 
Old 08-24-2009, 08:44 PM   #9
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Indeed, jens' comments are at odds with my experiences with nVidia drivers on 4 or more Linux OS's over 3 years, scores of different kernels both 32 and 64 bit, and at least 3 different video cards, each of a different series. I cannot complain, and certainly haven't experienced 'garbage'.

Anyhow, driver quality, or lack thereof, isn't the topic at hand. Let's keep this thread on track:

Question: "If you run Debian, does this tutorial work for you? Does it enable you to install a working nVidia driver?"

Feedback is welcome, as are suggestions or whatever, to make the tutorial clearer, better, more comprehensive, or whatever you think it needs.

At some point, when it's proven to be useful and works for most folks, we may like it to be a Wiki page or Linux Answer article.

Thanks, Trooper.
Sasha

Last edited by GrapefruiTgirl; 08-24-2009 at 08:46 PM.
 
Old 08-24-2009, 09:01 PM   #10
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
Quote:
Originally Posted by jens View Post
Both seem overcomplicated (and why is m-a needed for the sh. driver?, m-a prepare will install a lot more than what you need).

I just do

#m-a a-i nvidia (the kernel part)
#aptitude install nvidia-glx (the user-space part, use nvidia-glx-legacy for old cards)
#aptitude install nvidia-settings nvidia-xconfig (X configuration)
#nvidia-xconfig

...never failed with any card I ever touched
Yes but on a fresh system you can't do:
m-a a-i nvidia

Why? Because you need to run prepare, m-a requires it, it installs build-essential the kernel headers and the other required programs for building kernel modules.

No you don't need to run m-a prepare if you do the sh method, but it's a lot easier than mucking through dependencies, and you might get an extra couple megs? If your that picky about the space then maybe you could post a list of the dependencies. This is a good quick tutorial, simple to understand and allows people to have easy straight forward instructions. I say good work.

[edit] I take back needing m-a prepare for the m-a i-a nvidia, if you have done the dependencies yourself there is no need for 'm-a prepare' but it's still good for a tutorial because some people won't know it.

[update for the tutorial]

Also on some new installs of debian you might want to install GCC... I had to on my net install, I would put it as a side note because without GCC it won't build. =P

Last edited by mushroomboy; 08-24-2009 at 09:06 PM.
 
Old 08-24-2009, 10:00 PM   #11
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
What's wrong with simply running the nvidia installer?
 
Old 08-24-2009, 10:12 PM   #12
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
http://www.linuxquestions.org/questi...river.-749519/

Jim, see this link for the lead-in to this thread.

Sasha
 
Old 08-24-2009, 10:36 PM   #13
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Don't forget if you try the Debian method using module-assistant and it fails to work, you MUST PURGE the Debian nvidia packages before attempting to install with the driver from the nVidia website or you will have issues...


maybe put that information as a footnote at the bottom of the tutorial.
 
Old 08-25-2009, 06:16 AM   #14
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
Quote:
Originally Posted by jiml8 View Post
What's wrong with simply running the nvidia installer?
Nothing, but you still need to get headers/build-essential/other muck.
 
Old 08-25-2009, 08:36 AM   #15
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Testing/Unstable Amd64
Posts: 1,476

Original Poster
Rep: Reputation: Disabled
Thanks for the mainly positive feedback people!.
I'll try and answer the questions in the order that they have been posted.

Quote:
I just installed testing on my daughter's box today. Haven't gotten to the Nvidia driver yet. Are there any special considerations for the testing kernel (.30-1)?
I am running the same kernel myself,with the driver downloaded from nvidia.
The one problem i had was running an amd64 machine,Debian has decided to move the location of it's 32bit libraries in Testing from /emul/ia32-linux/usr/lib to /usr/lib32.
So when the installer tries to install the 32bit compat libraries it cant find the right directory,and gives an error message.
Thanks to mushroomboy, we have a workable solution.
Just post if you need the details.

If you run i686 you should be just fine,try out the tutorial see how it works for you.

Quote:
Also on some new installs of debian you might want to install GCC...
That's why i install build-essential at the same time as module-assistant.

Quote:
Don't forget if you try the Debian method using module-assistant and it fails to work, you MUST PURGE the Debian nvidia packages before attempting to install with the driver from the nVidia website or you will have issues...
That's a good point Farslayer,i had forgotten that.
I will work that into the how-to somewhere.
Good to see you back on the Debian forum,by the way.

Edit:Keep the feedback coming,let me know what can be improved.

Last edited by the trooper; 08-25-2009 at 09:06 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i install Linux Nvidia drivers for a Geforce 6200 in Fedora 10? bullred Fedora 10 06-25-2009 02:29 AM
LXer: Install multimedia codecs, libdvdcss in Debian Etch GNU/Linux LXer Syndicated Linux News 0 04-14-2007 10:01 PM
How can I run multi user text mode in Debian to install Nvidia drivers?? doraimom Debian 40 04-14-2007 07:54 AM
Linspire is Debian,but how 2 Install Nvidia Drivers starfly Linux - Hardware 16 04-01-2005 03:04 PM


All times are GMT -5. The time now is 06:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration