On Debian, the recommended approach if you want to install the proprietary NVIDIA drivers is to enable the contrib
and non-free
repositories and install the packaged driver. Adapting the instructions for Debian 8 (do everything as root
or via sudo
):
add contrib non-free
to the appropriate line in /etc/apt/sources.list
, so you end up with something like
deb http://httpredir.debian.org/debian/ testing main contrib non-free
install the kernel headers (which you already have) and the driver's kernel module
aptitude update
aptitude -r install linux-headers-$(uname -r) nvidia-legacy-304xx-kernel-dkms
install and run nvidia-xconfig
to generate the appropriate configuration file
aptitude install nvidia-xconfig
nvidia-xconfig
Doing all this should also install nvidia-installer-cleanup
which will clean the remnants of NVIDIA's installer.
After doing all this, reboot and the new driver should be built (if it hasn't already been built) and loaded.
If you want to avoid installing other non-free packages, see How to block non-free with apt preferences?