Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Debian Linux Help > install nvidia in debian the simple way

Forgot Password?
 Debian Linux Help   Discussions related to Debian GNU/Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 07-13-2005   #1 (permalink)
Just Joined!
 
Join Date: Mar 2005
Posts: 7
Send a message via ICQ to ptesone Send a message via AIM to ptesone Send a message via MSN to ptesone Send a message via Yahoo to ptesone
install nvidia in debian the simple way

I actually found this text on a google search for: debian nvidia install
and found it to be very useful. . .

Simple instructions on how to install nVidia drivers for XFree86 on
Debian written by Len Sorensen.
(LSorensen on irc.debian.org, lsorense -at- csclub.uwaterloo.ca)
Last updated March 23 2005.
Feel free to email reports on this information working or not working
and any suggestions you have on making it better.

Note:
At this time these are the debian versions:
woody: Debian 3.0 stable release
sarge: Debian testing release (will be next stable release when done)
sid: Debian unstable (will never be released, but provides packages for
testing after they have been tested for a while.)

Note: As of this time, there are NO nvidia drivers in sarge. You would
have to add sid sources to your sources.list and pin the system to sarge
to get access to the nvidia drivers. I will try to add this information
later. For now it still applies to woody and sid.

Step 0: Cleaning up the mess from nvidia's installer (if you used it first)

Make sure to remove all the garbage created by the nvidia installer,
since it places files in different locations, and may cause problems
even after following these instructions. It is supposed to have an
uninstall option. Something like: nvidia-installer --uninstall should
do it. I have not used it myself, since doing it this way is so simple
and works very well, and of course: It is `The Debian Way'. The
--uninstall option should remove everything it installed (At least I
hope so.)

Do NOT try to mix and match with the debian packages and the nvidia
installer. They do not get along, they don't agree on where files should
go or how just about anything should be done. It's one way or the other.
To do it right the Debian way, all traces of the nvidia installer has
to go.

Step 1: Preparing your package sources

For people running woody:
If you are running debian woody, which does not include the nvidia
drivers, add the following lines to your /etc/apt/sources.list file:

deb http://www.backports.org/debian woody nvidia-graphics-drivers dpatch
deb http://www.backports.org/debian woody nvidia-kernel-common xfree86

then run 'apt-get update' to update the package lists.

For people running sarge or sid:
Ensure you have main contrib non-free in your /etc/apt/sources.list since
the nvidia drivers are in non-free and some of the helpers are in contrib.

Step 2: Ensure your kernel is the right version.

The nvidia driver requries a 2.4 or 2.6 kernel at the moment.

For woody users:
If you are not running 2.4.18 on woody built for your cpu type, you
should fix that first. For Pentium Pro, Celeron, P2, P3 and P4
use the package 'kernel-image-2.4.18-686', for Duron and Athlon use
'kernel-uimage-2.4.18-k7', and for older pentium and k6 systems, use
'kernel-image-2.4.18-386' At some point soon, 2.4.24 might become
available for woody in which case you want to use that instead.

Remember to reboot after installing a new kernel so that you are running
the right one.

For people running sarge or sid:
For sarge and sid please make sure you are running an up to date kernel
so that the headers matching it can be installed. The simplest way to
do this is to do:
> apt-get install kernel-image-2.4-686
or
> apt-get install kernel-image-2.4-k7
or
> apt-get install kernel-image-2.6-686
or
> apt-get install kernel-image-2.6-k7

That will keep you running the latest kernel released (either 2.4.x
or 2.6.x). If the command to install kernel-headers fails later, you
didn't do this step right.

Remember to reboot after installing a new kernel so that you are running
the right one.

Step 3: Installing needed packages for building the nvidia kernel module.
Install a few packages needed:
> apt-get install nvidia-kernel-source nvidia-kernel-common

If you are running a debian kernel do this:
> apt-get install kernel-headers-`uname -r`
> export KVERS=`uname -r`
> export KSRC=/usr/src/kernel-headers-`uname -r`
Note that the two lines above are NOT single quotes. They are backticks
(on the same key as ~ on a US layout keyboard).

If you built your own kernel, just make sure you know where the source
for it is located so you can set KSRC variable to that location.
> export KVERS=`uname -r`
> export KSRC=location of your kernel sources or headers
Note that the two lines above are NOT single quotes. They are backticks
(on the same key as ~ on a US layout keyboard).

Step 4: Building and installing the nvidia kernel module
Build the kernel module package:
> cd /usr/src
> tar xvzf nvidia-kernel-source.tar.gz
> cd modules/nvidia-kernel
> debian/rules binary_modules
Then install it:
> cd ..
> dpkg -i nvidia-kernel-`uname -r`*deb
> depmod -a

Step 5: Installing and configuring the nvidia glx X driver
Install the last few packages:
> apt-get install nvidia-glx nvidia-glx-dev xserver-xfree86

Now you are ready to change X to use the new driver. Configure X
normally using:
> dpkg-reconfigure xserver-xfree86
And configure the monitor, resolution, mouse, etc settings as you need
and select nvidia instead of nv as your driver.

Note: Any user that wants to run 3D code must be in the video group.
To add a user to the video group do this:
> adduser youruser video
The next time they login to X they will have 3D access.

That's it. You should be running the new X. You should see the nvidia
logo when X starts if you are succesfully running the new driver.

Keep in mind that whenever a new version of the nvidia driver comes out,
or whenever you upgrade to a newer kernel, you will have to go through
these steps again to build the nvidia kernel module to match the new
driver and/or new kernel.

Notes:
If the nvidia modules doesn't load automatically and the X server
complains about it, add 'nvidia' to /etc/modules to make it auto load
on boot.

When upgrading, the simplest is to reboot afterwards to make sure X and
the kernel module are using the same version. You could also stop X,
rmmod nvidia, modprobe nvidia, start X again.
ptesone is offline  


Old 07-13-2005   #2 (permalink)
Super Moderantor
 
techieMoe's Avatar
 
Join Date: Aug 2004
Location: Texas
Posts: 9,258
IMO, that looks an awful lot more complicated than running one script from Nvidia and then editing a text file. I'll stick to my approach.
__________________
Registered Linux user #270181
TechieMoe's Tech Rants
techieMoe is offline  
Old 07-13-2005   #3 (permalink)
Banned
 
Join Date: Nov 2004
Location: Belgium
Posts: 1,121
Quote:
Originally Posted by techieMoe
IMO, that looks an awful lot more complicated than running one script from Nvidia and then editing a text file. I'll stick to my approach.
It's still a much cleaner way though (at least you know what happend with your system).
__________________
Those who can make you believe absurdities can make you commit atrocities.
--Voltaire
jens is offline  
Old 07-13-2005   #4 (permalink)
Super Moderantor
 
techieMoe's Avatar
 
Join Date: Aug 2004
Location: Texas
Posts: 9,258
Quote:
Originally Posted by jens
Quote:
Originally Posted by techieMoe
IMO, that looks an awful lot more complicated than running one script from Nvidia and then editing a text file. I'll stick to my approach.
It's still a much cleaner way though (at least you know what happend with your system).
Well, I'm more concerned with getting something working quickly and simply. I'm not terribly worried about what the Nvidia installer puts where.
__________________
Registered Linux user #270181
TechieMoe's Tech Rants
techieMoe is offline  
Old 07-13-2005   #5 (permalink)
Linux Enthusiast
 
Join Date: Feb 2005
Location: Luton, England, UK, Earth
Posts: 639
Send a message via MSN to onlinebacon
I agree with techieMoe cos half the time the words are going down so quick I cant read them anyway.
onlinebacon is offline  
Old 07-13-2005   #6 (permalink)
Linux Guru
 
kkubasik's Avatar
 
Join Date: Mar 2004
Location: Lat: 39:03:51N Lon: 77:14:37W
Posts: 2,397
Send a message via AIM to kkubasik
Sometimes I will go to great lenghts to try and keep everything managed by apt-get. On the current sarge release its just

apt-get install kernel-image-2.6-686-(smp)
*reboot*
apt-get install nvidia-kernel-source nvidia-kernel-common
Quote:
> apt-get install kernel-headers-`uname -r`
> export KVERS=`uname -r`
> export KSRC=/usr/src/kernel-headers-`uname -r`
> cd /usr/src
> tar xvzf nvidia-kernel-source.tar.gz
> cd modules/nvidia-kernel
> debian/rules binary_modules
Then install it:
> cd ..
> dpkg -i nvidia-kernel-`uname -r`*deb
> depmod -a
apt-get install nvidia-glx nvidia-glx-dev xserver-xfree86
dpkg-reconfigure xserver-xfree86
which could be lumped into one script (hmmmm... I might be writing my first metapackage soon.....) its not simple simple, but (to me at least) having apt aware of the drivers is a big pluse (especialy if it upgrades your kernel... imagine the fun that would ensue)
__________________
Avoid the Gates of Hell. Use Linux
A Penny for your Thoughts

Formerly Known as qub333
kkubasik is offline  
Old 07-14-2005   #7 (permalink)
Banned
 
Join Date: Nov 2004
Location: Belgium
Posts: 1,121
Quote:
Originally Posted by techieMoe
Quote:
Originally Posted by jens
Quote:
Originally Posted by techieMoe
IMO, that looks an awful lot more complicated than running one script from Nvidia and then editing a text file. I'll stick to my approach.
It's still a much cleaner way though (at least you know what happend with your system).
Well, I'm more concerned with getting something working quickly and simply. I'm not terribly worried about what the Nvidia installer puts where.
As you probably have noticed, this "clean" way always works wile the official nvidia installer doesn't...

An other thing, using the nvidia installer, it will drop many files on many places for no good reason...(After all this years, I still don't understand why it does that...).

PS: I highly recommend not using the nvidia installer in Debian.
They did a very good job for not needing to use it...
__________________
Those who can make you believe absurdities can make you commit atrocities.
--Voltaire
jens is offline  
Old 07-14-2005   #8 (permalink)
Super Moderantor
 
techieMoe's Avatar
 
Join Date: Aug 2004
Location: Texas
Posts: 9,258
Quote:
Originally Posted by jens
As you probably have noticed, this "clean" way always works wile the official nvidia installer doesn't...
Actually, no, I've not noticed that. I've never had any trouble installing the Nvidia drivers using their script in Debian, or SuSE for that matter. Fedora has issues sometimes, but there's another book on getting those working. Again, I simply see this method as an awful lot of unneeded work, but that's just my opinion.

Quote:
PS: I highly recommend not using the nvidia installer in Debian.
They did a very good job for not needing to use it...
Recommend away, I'm sticking to my way.
__________________
Registered Linux user #270181
TechieMoe's Tech Rants
techieMoe is offline  
Old 07-26-2005   #9 (permalink)
Just Joined!
 
Join Date: Jul 2005
Posts: 17
Quote:
Originally Posted by techieMoe
Quote:
Originally Posted by jens
As you probably have noticed, this "clean" way always works wile the official nvidia installer doesn't...
Actually, no, I've not noticed that. I've never had any trouble installing the Nvidia drivers using their script in Debian, or SuSE for that matter. Fedora has issues sometimes, but there's another book on getting those working. Again, I simply see this method as an awful lot of unneeded work, but that's just my opinion.

Quote:
PS: I highly recommend not using the nvidia installer in Debian.
They did a very good job for not needing to use it...
Recommend away, I'm sticking to my way.
try this

nVidia does not supply Open Source drivers for GNU/Linux. Thus some extra work is required to get nVidia graphics chips working. Bartok (98.5) has an nVidia Riva Ultra 64 graphics chip. The appropriate driver was installed and configured.

$ wajig install nvidia-kernel-2.4.25-1-686-smp nvidia-glx





Then edit Path[]/etc/X11/XF86Config-4 to remove the two lines:

Load "GLcore"
Load "dri"



and to replace:

Driver "nv"



with

Driver "nvidia"



The nVidia splash screen should then be displayed when X is started.

Compiling the Driver

If the package for your kernel is not available yo ucan compile your own. The process of installing the video drivers for GEForce 256 (Velox (98.30)) and TNT2 (Mint (98.31)) is straightforward. Note that this is no longer required for standard Debian kernels which supply the nvidia-kernel-2.4.25-1-686-smp and nvidia-glx packages. See section 93.1.1 for details.

Install the appropriate Debian packages (with the kernel-headers package that matches your installed kernel):

$ wajig install nvidia-kernel-src nvidia-glx-src
$ wajig install kernel-headers-2.4.20-686





Then, assuming you've installed a standard Debian kernel (e.g., kernel-image-2.4.20-686) go to the kernel source directory and unpack the downloaded archives:

# cd /usr/src
# tar zxvf nvidia-kernel-src.tar.gz





Debian packages are now generated from these sources with the following steps. First build the nvidia kernel package. As part of this step the file NVIDIA_kernel-1.0-4349.tar.gz (about 700K) will be downloaded from the nVidia archive:

# export KSRC=/usr/src/kernel-headers-2.4.20-686
# export KVERS=2.4.20-686
# cd modules/nvidia-kernel-1.0.4349
# CC=gcc-2.95 debian/rules binary_modules
# cd ../..
# wajig install nvidia-kernel-2.4.20-686_1.0.4349-1+_i386.deb





Next build and install the nVidia GLX package. Again, during this step the file NVIDIA_GLX-1.0-4349.tar.gz (about 4.2M) will be retrieved from the nNidia archive:

# cd nvidia-glx-1.0.4349
# dpkg-buildpackage -us -uc
# cd ..
# wajig install nvidia-glx_1.0.4349-1_i386.deb





If not already modified, edit /etc/X11/XF86Config-4 to replace

Driver "nv"

with

Driver "nvidia"




Remove from the Modules section the:

Load "GLcore"
Load "dri"





Make sure to load the new nVidia module:

modprobe NVdriver





To have this loaded at boot time add the following line to /etc/modules:

NVdriver





You can check that it all works by loading some of the GL graphics from xscreensaver. Or run them directly, e.g., "gears" or "evas-demo".

On Mint (98.31) with version 0.9.769 of the nVidia driver there were problems with system freezes. It generally happened in the xscreensaver preferences when trying some of the GL savers (in full screen mode). In window mode outside of xscreensaver they work just fine. Also freezes were occurring when switching between multiple X Window Sessions (C-A-F7 and C-A-F8, for example). The screen would go black. The problem appears to have gone away with version 1.0.2314 of the nVidia driver.

On Velox (98.30) with version 0.9.769 of the nVidia driver running the evas_test demo command crashed the xserver on exit from evas-demo!
wert91 is offline  
Old 07-26-2005   #10 (permalink)
Super Moderantor
 
techieMoe's Avatar
 
Join Date: Aug 2004
Location: Texas
Posts: 9,258
Quote:
Originally Posted by wert91
nVidia does not supply Open Source drivers for GNU/Linux. Thus some extra work is required to get nVidia graphics chips working.
The lack of open-source driver doesn't concern me. I like functional drivers; I couldn't care less whether or not the source is available. I'm sorry your nvidia card gave you trouble, but rest assured you're a vocal minority. I've heard very few people that have had issues installing an Nvidia graphics card in Linux.
__________________
Registered Linux user #270181
TechieMoe's Tech Rants
techieMoe is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:13 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2