type to search

How Can I Install NVIDIA Drivers?

Asked by

Hey… How can I install the NVIDIA drivers?
(I had tried some games on friends' computer before, but forgot to ask how they installed the drivers)

or Cancel

6 answers


amlj [ Editor ]

Hey… Try what’s here, and then thank Debian! :)

Happy gaming!

By the way, I just did the first part, and used nvidia-xconfig command... You may try this first, and if it didn't work, remove the /etc/X11/xorg.conf, or /etc/X11/XF86Config.

NN comments

XF86Config belongs to the old, abandoned XServer (XFree).

New Xorg versions don’t need xorg.conf because they support auto-configuration; you need it only if you want to override specific parameters.

I know…Just one thing I’m not sure about, perhaps you can help mate…I thought when you run ‘nvidia-xconfig’ it’ll be created anyway, right?

Yeah, it will be created but if you’re running a recent version of Debian (Squeeze, for example) and you don’t need specific options for Xorg, then you can simply install the kernel/xorg modules. No need for xorg configuration

But I tried in Squeeze… Didn’t work unless ‘nvidia-xconfig’… However, as I mentioned, I didn’t do some of the things in that tutorial.


i dont have the folder X11 :S 

or Cancel

depaloan [ Editor ]

You have three options:

  1. install package nvidia-kernel; it's a pre-compiled kernel module and works automagically with default debian kernels. You need only a reboot to be sure the proper video driver is picked up by Xorg.
  2. install package module-assistant, then execute m-a a-i nvidia; it will download every package needed and then create a custom kernel module. Useful if you are running a non-standard kernel. You could also enable testing/unstable/experimental repositories to get a more updated nvidia-source package.
  3. use the binary installer offered on; useful if your hardware is extremely recent.
or Cancel

thomasrutter [ Editor ]

Here’s how I do it.  First make sure “contrib non-free” are in your sources.list and then run a “aptitude update”.

aptitude install nvidia-kernel-2.6-amd64 nvidia-glx

That’s all there is to it, hopefully!  Switch amd64 with i386 if you are not 64-bit

If you are using the Lenny kernel, which is a bit older, but the nvidia drivers from that are too old for your card, (or if you are using some other kernel) then you'll need to add a testing or unstable repository into your sources.list, and then:

aptitude install module-assistant nvidia-glx
m-a a-i nvidia-kernel-source

Then cross your fingers.

More detailed instructions at:
or Cancel


I have tried all of the install methods at one time or another.   Kudos to the Debian NVidia team for making each time easier than the last.  I have less total experience with the ATI cards, also kudos to that team.

If you are running unstable or testing, the *-dkms packages (nvidia-kernel-dkms, nvidia-kernel-legacy-173xx-dkms, or fglrx-modules-dkms) make life really easy – even as you change kernel versions.   That is the first recommended solution – if appropriate to your install and hardware – note the drivers only currently support the newest generations of hardware.

Today at work I just used the packages (nvidia-kernel-2.6-686, nvidia-kernel-legacy-96xx-2.6-686) + nvidia-glx + mesa-utils to configure 4 workstations in a few minutes and following the instuctions at for “Configure X to use the nvidia driver” .   The only trick is figuring out which version you want for your card.   These 4 were all built with Debian Lenny – aka 5.0.

I have previously used the instructions for module-assistant with success.   There were more details there than a beginner would be comfortable with, but not near as bad as doing it yourself.

I did try the steps including downloading the driver from NVidia, but was unsuccessful at that.   It is worth trying all of the other solutions first before trying to puzzle through building it yourself.    Among other things the other solutions are less likely to break with patching or upgrades (or at least break as messily).
or Cancel


I would suggest the proprietary kernel from the Nvidia site (free software gives me the freedom to run non-free binary blobs)

Some of the below steps are probably force of habit fueled my desire to be able to find/organize things, so there are probably some pointless steps below.

  1. you should be in (Debian) run level 2
  2. disable X (/etc/init.d/kdm stop) (if you use gdm or some other X manager, then substitute appropriately)
  3. Download the appropriate driver from and put it in /usr/src/
  4. make certain that you have your kernel’s header package installed, it’ll install a directory named /usr/src/linux-headers-{whatever}.
  5. make a symbolic link named /usr/src/linux linking to the above-named directory
  6. while in the above listed headers directory, run sh ../NVIDIA-Linux-{whatever}
  7. answer a few questions and let it do its magic
  8. re-enable X (/etc/init.d/kdm start)
  9. Go play a game, now
  • changes/updates to your X-server, kernel, or kernel-headers will require you to reinstall the driver. This is the downside of running the non-free driver.
  • If your game requiring the Nvidia card doesn’t run or runs in a crappy manner, run it under a terminal and if you get some error message that looks vaguely like a graphic-related or rendering-related message…. reinstall the driver
  • Since I customize and compile my kernels rather than use them as-is, the additional step of reinstalling the driver is not bothersome to me. You might think it’s a hassle, but the proprietary Nvidia driver does work better than the free version
  • let’s be pragmatic here, if running a proprietary binary blob is what it takes to get you to use Linux, I’m OK with that, and much of the Linux community is probably OK with that…. maybe even some people who choose to say “GNU+Linux” rather than just “Linux”
  • Why are you still reading this? Go play a game!
or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.