LinuxQuestions.org
Visit Jeremy's Blog.
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 07-13-2005, 10:23 AM   #1
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Rep: Reputation: 15
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.
 
Old 07-14-2005, 11:49 PM   #2
Bluenoser
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada
Distribution: Ubuntu 8.04 LTS
Posts: 138

Rep: Reputation: 15
I'm wondering why Debian users have such a struggle with nVidia drivers? I just installed Sarge last week and had no problems getting it working the same way I have done in the past with Mandrake/Suse/Slackware. I've noticed various posts/solutions and they seem very complex. I don't know, maybe I just got lucky with it or something. If I ever have to install them again I'll try to make a tutorial for how I did it
 
Old 07-15-2005, 11:22 PM   #3
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Original Poster
Rep: Reputation: 15
I had no such luck
but I had also upgraded my kernel to 2.6.8 too. . .
 
Old 07-16-2005, 01:19 AM   #4
mofungo
LQ Newbie
 
Registered: May 2005
Location: cleveland
Distribution: debian/sid
Posts: 6

Rep: Reputation: 0
install nvidia in debian the simple way

Ah,the infamous Len Sorensen method.Works easily and beautifuly.I never had luck with Nvidia installer,always complained that x was running when it wasn't or couldn't compile because of headers.
as long as you don't desperately need the latest drivers,L.S. is the way to go.
 
Old 07-16-2005, 11:03 AM   #5
ptesone
Member
 
Registered: Nov 2003
Location: USA
Distribution: Debian Sarge
Posts: 77

Original Poster
Rep: Reputation: 15
One of the main reasons I put this post on here (mostly for myself for future refernce of course) Is that there are more people trying out or using Linux exclusivley now then ever before. . .There are so many, in fact that there is not enough support it seems to keep up with them, so I thought I'd put this out there to help others with the same problem. . .It's not a big deal I just like helping people figure this stuff out (and I didn't even write it). . .

In fact, I used to be a heavy ubuntu and mepis user and longed for the speed of gentoo when I realized hey, I could compile my own kernel using debian and complile my own programs for my system just as gentoo does. . .Granted, it will never be as fast as a genuine stage 1 gentoo install, but it's fast enough for me and I like the way that debian strictly adheres to it's packaging system. . .I can still install and run the same things that run in gentoo using debian and get it on. . .
 
Old 07-17-2005, 08:48 PM   #6
OmegaBlac
Member
 
Registered: Aug 2003
Location: California
Distribution: Ubuntu
Posts: 172

Rep: Reputation: 31
Lightbulb

Or you can try to install the nvidia drivers the Debian way --> Debian-nVidia HOWTO
 
Old 07-23-2005, 01:34 AM   #7
tompravi
Member
 
Registered: Jun 2004
Posts: 37

Rep: Reputation: 15
The safe way !

Quote:
Originally posted by OmegaBlac
Or you can try to install the nvidia drivers the Debian way --> Debian-nVidia HOWTO
This is the simpler and the more safe way.
Thgank you.
 
Old 07-23-2005, 11:16 AM   #8
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382

Rep: Reputation: 37
One reason people might be having problems is if their video card is too old. I, for instance, and running a Riva TNT 16 MB nvidia card. This is way too old to get the new nvidia drivers working. There is a solution though. darkleaf gave me this link: http://home.comcast.net/~andrex/Debi...tallation.html
This link explains how to install nvidia drivers on systems with older cards. I followed the instructions using module assistant. It installed first time, and now I am running nvidia drivers on my system. And it makes a huge difference from using the VESA driver.
Anyone running older nvidia cards, or just having trouble getting the nvidia drivers working should check out this link and give it a go.

Good Luck!

 
Old 07-23-2005, 02:23 PM   #9
jeru
Member
 
Registered: Feb 2003
Location: Arizona
Distribution: Debian Sid
Posts: 57

Rep: Reputation: 15
Quote:
Originally posted by Bluenoser
I'm wondering why Debian users have such a struggle with nVidia drivers? I just installed Sarge last week and had no problems getting it working the same way I have done in the past with Mandrake/Suse/Slackware. I've noticed various posts/solutions and they seem very complex. I don't know, maybe I just got lucky with it or something. If I ever have to install them again I'll try to make a tutorial for how I did it
I wonder the same thing but I think I have the answer. Look around at the posts about nvidia installation here. Then read the replys people give about how to do it. Its blatently obvious that most people just like to see themselves replying about something they know nothing about. I thought it was obvious that if somebody was asking about nvidia driver installation, they would only want responses from people who have actually installed/seen the drivers before.

Anyways, you got that howto to do it the debian way, or you can find some repo someplace where somebody maintaints debs for you. Or you can just do it the normal way by installing kernel-headers-<your kernel version 'uname -r' goes here> and running the nvidia driver .run file. If something happens like the drivers from nvidia are for gcc-3.2 and 3 and you have gcc 4.0 like unstable right now. Then you just 'export CC=gcc-3.3' to trick them into thinking you have gcc 3.3 and install away.
 
Old 07-23-2005, 03:43 PM   #10
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
Nvidia drivers are easy to setup from the bin file. It won't work for old video cards though then you need to compile it with nvidia-glx.
 
  


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
trying to install nvidia on debian 3.1 walterbyrd Debian 14 07-09-2005 08:20 PM
Linspire is Debian,but how 2 Install Nvidia Drivers starfly Linux - Hardware 16 04-01-2005 02:04 PM
Can't build nvidia.ko on MEPIS3.3. Read /usr.../nvidia-kernelsource/README.debian digorykirke Linux - Software 0 03-16-2005 02:10 AM
yet another NVIDIA install problem on Debian alirezan1 Linux - Newbie 6 02-08-2005 12:20 PM
Nvidia driver install in Debian Woody nrunge Linux - Software 5 10-08-2003 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration