Cooking with UNIX/Linux
Cooking with UNIX/Linux > nvidia drivers

nvidia drivers

NVIDIA RECIPE by Frederik Dannemare

# Make sure contrib and non-free are included in your
# /etc/apt/sources.list. E.g.:
#
deb http://ftp.dk.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.dk.debian.org/debian/ testing main contrib non-free


# Update available package list.
#
sudo apt-get update


## If kernel 2.4.x
#
# No need to build anything.
apt-get install kernel-image-2.4.27-1-686 nvidia-kernel-2.4.27-1-686 nvidia-glx


## If kernel 2.6.x
#
# Get the packages needed for building the nvidia driver.
# In this example I assume that you already run the 2.6.7 kernel
# (-1-386 revision) and therefore must choose the 2.6.7 kernel sources.
#
sudo apt-get install build-essential kernel-package kernel-source-2.6.7 \
        nvidia-glx nvidia-glx-dev nvidia-kernel-common nvidia-kernel-source


# Make yourself owner of everything in /usr/src. Make it a
# habbit not compiling as root, since you don't really need to.
#
chown -R frederik:frederik /usr/src  (execute as root)
cd /usr/src
tar jxvf kernel-source-2.6.7.tar.bz2
tar zxvf nvidia-kernel-source.tar.gz
ln -sf kernel-source-2.6.7 linux
cd linux
cp /boot/config-2.6.7-1-386 .config
fakeroot make-kpkg --append-to-version -1-386 modules_clean
fakeroot make-kpkg --append-to-version -1-386 modules_image
sudo dpkg -i ../nvidia-kernel-2.6.7-1-386_1.0.6111-1+10.00.Custom_i386.deb
depmod -a  (execute as root)


## Post-install
#
# Configure the X server
# - deselect the 'GLcore' and 'dri' modules
# - make sure 'glx' is being loaded
# - use 'nvidia' as driver instead of 'nv'