Debian nVidia setup

This entry was posted by Tuesday, 7 April, 2009
Read the rest of this entry »

you need a working network connection and contrib and non-free in your sources.list. Also you need unstable/sid sources for this to work currently.
Open a terminal, su to root and copy the following:

apt-get install build-essential module-assistant &&\
m-a a-i nvidia && apt-get install nvidia-glx nvidia-settings &&\
echo nvidia >> /etc/modules && modprobe nvidia && dpkg-reconfigure xserver-xfree86

— Edit by Pizbit, if you don’t actually want to reconfigure your whole xserver you can ignore the last part (&& dpkg-reconfigure xserver-xfree86 ) and follow the last section below.

done!
Thanks to dpkg on #debian irc.freenode.net

— The below is what I, Pizbit has written. 🙂

Or to use the official NVIDIA package. This will require a internet connection if you don’t already have your kernel headers and the nvidia driver although if you’re using the kernel off the cd and the cd has the kernel headers you’ll save yourself some of your precious BW because apt-get will get the package off the cd assuming it’s in your sources.list etc etc.

Note: If all else fails, read the NVIDIA README!
Go to: http://www.nvidia.com/object/linux.html and download the latest .run file for your CPU. (IA32 for most people). Take note of where you download it to!
Close your x server by logging out – or painfully with ctrl+alt+backspace.
Hit ctrl+alt+F1 , login as root or your normal user then use sudo or su.
You need to actually stop your x server first, this can usually be accomplished by: /etc/init.d/gdm stop Where gdm might be kdm or xdm .(It will only be one of these three)

Most likely you don’t have your kernel headers installed, no worries!:)
Run: apt-cache search `uname -r` header This should return just one package, if it returns more, then, erm, to continue. For example: kernel-headers-2.6.10-3-386 – Linux kernel headers 2.6.10 on 386

Install the kernel headers by: apt-get install ThePackgeName
Chances are you will also need to make a symlink in /usr/src/ cd to this location and: ln -s (I believe it’s always the name of the package you downloaded, in either case it’ll be something clearcut, use uname -r to guide you, the directory should contain this string) linux

eg. cd /usr/src
ln -s kernel-headers-2.6.10-3-386/ linux

Note: If there is already such a symlink it may either have been created for you and you can miss this step or from an older kernel and set of headers, in any case use ls -l linux to see where it comes from, write this down somewhere, rm linux and attempt to make the symlink again.

You may need to: apt-get install build-essential

Run the nvidia installer by going: sh nvidiafile.run
Follow the instructions, it rather easy:) Just say ‘yip’ to everything.
Assuming all goes well, any errors on building the kernel module if it needs too are probably because you don’t have the build-essential package installed or the kernel headers, install it and run the installer again.

Now you need to configure your x server to actually use the driver. If you use xorg you will want to edit: /etc/X11/xorg.conf If you use xfree edit: /etx/X11/XF86Config-4.conf
Where you see all the Load “blah” lines(near the top), put a # at the begining of these lines if you have them(Doesn’t matter if you don’t have them)

Load “dri”

Load “GLcore”

After that, make sure there is in the same section:

Load “glx”

The next step is to actually use the driver, scroll down to where it mentions your video card, it probably already has:

Driver “nv”

Change this to:

Driver “nvidia”

Load up your xserver again. /etc/init.d/gdm (or kdm, xdm) start
The nvidia installer puts it’s README into /usr/share/doc/NVIDIA_GLX-1.0/ , if you get lost have a peek. 🙂 Last-Modified: 2007-03-07 19:38:50

Be Sociable, Share!

Leave a Reply



Time limit is exhausted. Please reload CAPTCHA.