Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

nVIDIA drivers HowTo

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Wolven
Posts: 56
Joined: 2004-11-03 14:23
Location: Norway

nVIDIA drivers HowTo

#1 Post by Wolven »

All commands in this HowTo needs to be done as root.

First you need to add 'non-free contrib' to your sources.list so you can download the drivers.

Code: Select all

nano /etc/apt/sources.list
My sources.list looks like this:
deb ftp://ftp.no.debian.org/debian/ testing main non-free contrib
deb-src ftp://ftp.no.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/ testing/updates main
Then sync with the servers with:

Code: Select all

apt-get update
After apt-get has finished syncing, download and install the nVIDIA drivers:

Code: Select all

apt-get install nvidia-kernel-source nvidia-glx
When the drivers are installed, follow the instructions in: /usr/share/doc/nvidia-kernel-source/README.Debian

I'll paste the contence of the README here for your convenience.
nvidia-graphics-drivers for Debian
----------------------------------


INTRODUCTION:
-----------------------------------------------------------------------

Welcome to Debian NVIDIA packages. This document contains notes on the
kernel module interface for the NVIDIA driver offering.


KERNEL MODULE INSTRUCTIONS:
-----------------------------------------------------------------------

There are TWO ways to build the nvidia-kernel package. Which one depends on
your situation with your kernel.

METHOD #1: You are running a Debian suppiled kernel or built a
kernel-headers package along with your own self-built kernel.

METHOD #2: You are running your own self-built kernel built from kernel
source.

Which method you choose really depends on what kernel headers you wish to
use, those from a kernel-headers package or those from kernel
source (from which you built your own kernel).

As mentioned above, if you are running a Debian supplied kernel you will
probably want to choose METHOD #1. If you compile your own kernels, METHOD #2.



PRELIMINARY:
- Decide where you want to build your module. By default it
will build under /usr/src like other kernel modules but you may choose
to build it under your home directory as some people prefer and writing to
/usr violates the FHS.


SUPPORT FOR 2.6 KERNELS:
------------------------
As of 1.0.5336-1, NVIDIA includes support for a 2.6 kernel. No extra steps are
required.


HOTPLUG SUPPORT:
------------------------
As of version 1.0.5336-8 there is hotplug module loading support provided
in patches that are applied by default but by default, hotplug is set to
ignore PCI/AGP cards for display. To change this set IGNORE_PCI_CLASS_DISPLAY
to false in /etc/default/hotplug or run
dpkg-reconfigure -plow hotplug



METHOD #1 Using a kernel-headers package
***********************************************************************

As root (or using fakeroot)
1. cd /usr/src
tar xzvf nvidia-kernel-source.tar.gz -C <YOUR BUILD LOCATION>
(It will install in <YOU BUILD LOCATION>/modules)
- or -
tar xzvf nvidia-kernel-source.tar.gz (if building in /usr/src)

The standard build location is /usr/src

2. Find out your kernel version:

uname -r For example: 2.4.21-4-k7

3. Download and install package: kernel-headers-2.4.21-4-k7
It will install in /usr/src/

Make sure your kernel image and headers have matching release numbers to
avoid possible problems in packages built from different sources.

4. Set some environment variables (if bash is your shell):

export KSRC=/usr/src/kernel-headers-2.4.21-4-k7
export KVERS=2.4.21-4-k7

5. Then build nvidia-kernel package:

cd <YOUR BUILD LOCATION>/modules/nvidia-kernel
debian/rules binary_modules

(You can also combine step 4 and 5 into one line:
KSRC=/usr/src/kernel-headers-2.4.21-4-k7 KVERS=2.4.21-4-k7 debian/rules binary_modules)

6. Install nvidia-kernel-common:

If not installed already
apt-get install nvidia-kernel-common

7. Install the nvidia-kernel package:

dpkg -i ../nvidia-kernel-2.4.21-4-k7_1.0.6111-1+_.Custom_i386.deb
( or similar filename )

Now see GENERAL NOTES below method #2

METHOD #2: Using your own kernel source headers
***********************************************************************

To build the nvidia-kernel deb you need to first make sure you have
kernel-package installed, then do the following:

As root
1. cd /usr/src
tar xzvf nvidia-kernel-source.tar.gz -C <YOUR BUILD LOCATION>
(It will install in <YOU BUILD LOCATION>/modules)
- or -
tar xzvf nvidia-kernel-source.tar.gz (if building in /usr/src)

2. If you are NOT using the default modules location /usr/src/modules
then you must set an environment variable that points to your modules
location.

export MODULE_LOC=<YOUR BUILD LOCATION>/modules

This is needed by make-kpkg which is used later. If
<YOUR BUILD LOCATION> is /usr/src there is no need to set this.

3. Build the modules under MODULE_LOC i.e. <YOU BUILD LOCATION>/modules

cd linux (or your kernel source directory)
make-kpkg modules_image

4. Install nvidia-kernel-common:

apt-get install nvidia-kernel-common

5. Install the nvidia-kernel package:

cd <YOUR BUILD LOCATION> (e.g. /usr/src)
dpkg -i nvidia-kernel-KVER*.deb

Notes for method #2:

- It is advised not to clean the kernel source tree between
"make-kpkg kernel_image" and "make-kpkg modules_image".

- The Riva framebuffer is known to conflict with the nvidia X driver. If you
are using X it would be wise not to compile it in. The vesa framebuffer is
known to work slow but fine.

GENERAL NOTES:

Also you must add any users who wish to use OpenGL applications to the group
video. You can do this with:

adduser username video

Also note for AGP issues and further information please see the NVIDIA
README file (README.gz) in the nvidia-glx package

An old nvidia.o might be already loaded (run 'lsmod' to check) so
do 'rmmod nvidia.o' to remove the module from memory.


For any news on this package check http://people.debian.org/~rdonald and
http://bugs.debian.org/nvidia-kernel-source


-- Randall Donald <rdonald@debian.org>, Fri, 30 Apr 2004 19:02:04 -0700
Last edited by Wolven on 2005-01-23 07:52, edited 2 times in total.

yanik
Posts: 22
Joined: 2005-01-03 16:01
Location: Montreal, Québec, Canada

#2 Post by yanik »

This didn't worked for me, in the first method, the damn module wouldn't compile. But I managed to get the driver installed by following this

http://home.comcast.net/~andrex/Debian- ... ation.html

yanik
Posts: 22
Joined: 2005-01-03 16:01
Location: Montreal, Québec, Canada

Quick how-to for unstable kernel 2.6

#3 Post by yanik »

Code: Select all

apt-get install module-assistant nvidia-kernel-common

Code: Select all

module-assistant auto-install nvidia

Code: Select all

apt-get install nvidia-glx
Then edit /etc/X11/XFree86config-4 and comment out GLcore in the module section and make sure Load Glx is there. In the device section, replace the driver nv with nvidia. Restart X. Before rebooting add nvidia to /etc/modules.

supergringo
Posts: 8
Joined: 2005-05-18 03:06
Location: Vancouver Canada

#4 Post by supergringo »

I am running Sarge, these packages are apparently not in my distro. So I want to know what advantages there are if I get them from Sid? Specifically,
does it enable swsusp2 with the nvidia driver? Right now I have to use the nv driver if I want to suspend either to ram or disk. What else should I be aware of? My video card is GeForce4 Go. Thanx...
There he goes. One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die.
--HST

machiner
Posts: 95
Joined: 2004-12-19 13:46
Location: New England

#5 Post by machiner »

How about this tutorial. Basically the same as others have mentioned, but installing nvidia-glx from the repos did me no good.

http://www.debiantutorials.org/content/view/13/60/
Last edited by machiner on 2006-06-24 16:11, edited 1 time in total.

japetto
Posts: 5
Joined: 2004-12-06 17:13
Location: Cambridge, MA. U.S.A.

Re: Quick how-to for unstable kernel 2.6

#6 Post by japetto »

yanik wrote:

Code: Select all

apt-get install module-assistant nvidia-kernel-common

Code: Select all

module-assistant auto-install nvidia

Code: Select all

apt-get install nvidia-glx
Then edit /etc/X11/XFree86config-4 and comment out GLcore in the module section and make sure Load Glx is there. In the device section, replace the driver nv with nvidia. Restart X. Before rebooting add nvidia to /etc/modules.
I use the same method. Works with non-custom kernels at the least.
you are not what you own.

mark21

nvidia tutorials

#7 Post by mark21 »

nVidia Video Card Drivers Configuration in Debian

If you have previously installed NVidia drivers using the NVidia installer you need to remove it before continuing

#nvidia-installer --uninstall

Check that you have "main contrib non-free" in your /etc/apt/sources.list or you can enter the following source list and save the file

deb ftp://download.xs4all.nl/pub/mirror/debian/ stable main non-free contrib
deb-src ftp://download.xs4all.nl/pub/mirror/debian/ stable main non-free contrib

Now run the following command to take effect of your new source list

#apt-get update

The NVidia driver requires either a 2.4 or 2.6 Linux kernel. Check that you are running one of these kernels (all current Debian releases do):

#uname -a

Install the required packages as follows

#apt-get install nvidia-kernel-common module-assistant

If you are running a debian kernel also enter the following command

#m-a -i prepare

If you are running a kernel you built yourself ensure you know where the sources are located.

Build and install the kernel module

#m-a a-i -i -t -f nvidia-kernel
#depmod -a

Alternatively if you are using a kernel you built yourself

#m-a a-i -i -t -f -k /usr/src/sourcepath nvidia-kernel
#depmod -a

Replace /usr/src/sourcepath with the location of your kernel source

Install

#apt-get install nvidia-glx nvidia-glx-dev xserver-xfree86

or if you are running unstable

#apt-get install nvidia-glx nvidia-glx-dev xserver-xorg

Reconfigure X to use the new drivers. Ensure you select "nvidia" instead of "nv" when asked for your driver

#dpkg-reconfigure xserver-xfree86

Users that want to run 3D applications need to be added to the "video" group

#adduser user video

Restart X. If you see the NVidia logo when X restarts you have successfully installed the NVidia 3D drivers.

References

http://home.comcast.net/~andrex/Debian-nVidia/

Post Reply