install nvidia in debian the simple way
I actually found this text on a google search for: debian nvidia install
and found it to be very useful. . . Simple instructions on how to install nVidia drivers for XFree86 on Debian written by Len Sorensen. (LSorensen on irc.debian.org, lsorense -at- csclub.uwaterloo.ca) Last updated March 23 2005. Feel free to email reports on this information working or not working and any suggestions you have on making it better. Note: At this time these are the debian versions: woody: Debian 3.0 stable release sarge: Debian testing release (will be next stable release when done) sid: Debian unstable (will never be released, but provides packages for testing after they have been tested for a while.) Note: As of this time, there are NO nvidia drivers in sarge. You would have to add sid sources to your sources.list and pin the system to sarge to get access to the nvidia drivers. I will try to add this information later. For now it still applies to woody and sid. Step 0: Cleaning up the mess from nvidia's installer (if you used it first) Make sure to remove all the garbage created by the nvidia installer, since it places files in different locations, and may cause problems even after following these instructions. It is supposed to have an uninstall option. Something like: nvidia-installer --uninstall should do it. I have not used it myself, since doing it this way is so simple and works very well, and of course: It is `The Debian Way'. The --uninstall option should remove everything it installed (At least I hope so.) Do NOT try to mix and match with the debian packages and the nvidia installer. They do not get along, they don't agree on where files should go or how just about anything should be done. It's one way or the other. To do it right the Debian way, all traces of the nvidia installer has to go. Step 1: Preparing your package sources For people running woody: If you are running debian woody, which does not include the nvidia drivers, add the following lines to your /etc/apt/sources.list file: deb http://www.backports.org/debian woody nvidia-graphics-drivers dpatch deb http://www.backports.org/debian woody nvidia-kernel-common xfree86 then run 'apt-get update' to update the package lists. For people running sarge or sid: Ensure you have main contrib non-free in your /etc/apt/sources.list since the nvidia drivers are in non-free and some of the helpers are in contrib. Step 2: Ensure your kernel is the right version. The nvidia driver requries a 2.4 or 2.6 kernel at the moment. For woody users: If you are not running 2.4.18 on woody built for your cpu type, you should fix that first. For Pentium Pro, Celeron, P2, P3 and P4 use the package 'kernel-image-2.4.18-686', for Duron and Athlon use 'kernel-uimage-2.4.18-k7', and for older pentium and k6 systems, use 'kernel-image-2.4.18-386' At some point soon, 2.4.24 might become available for woody in which case you want to use that instead. Remember to reboot after installing a new kernel so that you are running the right one. For people running sarge or sid: For sarge and sid please make sure you are running an up to date kernel so that the headers matching it can be installed. The simplest way to do this is to do: > apt-get install kernel-image-2.4-686 or > apt-get install kernel-image-2.4-k7 or > apt-get install kernel-image-2.6-686 or > apt-get install kernel-image-2.6-k7 That will keep you running the latest kernel released (either 2.4.x or 2.6.x). If the command to install kernel-headers fails later, you didn't do this step right. Remember to reboot after installing a new kernel so that you are running the right one. Step 3: Installing needed packages for building the nvidia kernel module. Install a few packages needed: > apt-get install nvidia-kernel-source nvidia-kernel-common If you are running a debian kernel do this: > apt-get install kernel-headers-`uname -r` > export KVERS=`uname -r` > export KSRC=/usr/src/kernel-headers-`uname -r` Note that the two lines above are NOT single quotes. They are backticks (on the same key as ~ on a US layout keyboard). If you built your own kernel, just make sure you know where the source for it is located so you can set KSRC variable to that location. > export KVERS=`uname -r` > export KSRC=location of your kernel sources or headers Note that the two lines above are NOT single quotes. They are backticks (on the same key as ~ on a US layout keyboard). Step 4: Building and installing the nvidia kernel module Build the kernel module package: > cd /usr/src > tar xvzf nvidia-kernel-source.tar.gz > cd modules/nvidia-kernel > debian/rules binary_modules Then install it: > cd .. > dpkg -i nvidia-kernel-`uname -r`*deb > depmod -a Step 5: Installing and configuring the nvidia glx X driver Install the last few packages: > apt-get install nvidia-glx nvidia-glx-dev xserver-xfree86 Now you are ready to change X to use the new driver. Configure X normally using: > dpkg-reconfigure xserver-xfree86 And configure the monitor, resolution, mouse, etc settings as you need and select nvidia instead of nv as your driver. Note: Any user that wants to run 3D code must be in the video group. To add a user to the video group do this: > adduser youruser video The next time they login to X they will have 3D access. That's it. You should be running the new X. You should see the nvidia logo when X starts if you are succesfully running the new driver. Keep in mind that whenever a new version of the nvidia driver comes out, or whenever you upgrade to a newer kernel, you will have to go through these steps again to build the nvidia kernel module to match the new driver and/or new kernel. Notes: If the nvidia modules doesn't load automatically and the X server complains about it, add 'nvidia' to /etc/modules to make it auto load on boot. When upgrading, the simplest is to reboot afterwards to make sure X and the kernel module are using the same version. You could also stop X, rmmod nvidia, modprobe nvidia, start X again. |
I'm wondering why Debian users have such a struggle with nVidia drivers? I just installed Sarge last week and had no problems getting it working the same way I have done in the past with Mandrake/Suse/Slackware. I've noticed various posts/solutions and they seem very complex. I don't know, maybe I just got lucky with it or something. If I ever have to install them again I'll try to make a tutorial for how I did it
|
I had no such luck
but I had also upgraded my kernel to 2.6.8 too. . . |
install nvidia in debian the simple way
Ah,the infamous Len Sorensen method.Works easily and beautifuly.I never had luck with Nvidia installer,always complained that x was running when it wasn't or couldn't compile because of headers.
as long as you don't desperately need the latest drivers,L.S. is the way to go. |
One of the main reasons I put this post on here (mostly for myself for future refernce of course) Is that there are more people trying out or using Linux exclusivley now then ever before. . .There are so many, in fact that there is not enough support it seems to keep up with them, so I thought I'd put this out there to help others with the same problem. . .It's not a big deal I just like helping people figure this stuff out (and I didn't even write it). . .
In fact, I used to be a heavy ubuntu and mepis user and longed for the speed of gentoo when I realized hey, I could compile my own kernel using debian and complile my own programs for my system just as gentoo does. . .Granted, it will never be as fast as a genuine stage 1 gentoo install, but it's fast enough for me and I like the way that debian strictly adheres to it's packaging system. . .I can still install and run the same things that run in gentoo using debian and get it on. . . |
Or you can try to install the nvidia drivers the Debian way --> Debian-nVidia HOWTO
|
The safe way !
Quote:
Thgank you. |
One reason people might be having problems is if their video card is too old. I, for instance, and running a Riva TNT 16 MB nvidia card. This is way too old to get the new nvidia drivers working. There is a solution though. darkleaf gave me this link: http://home.comcast.net/~andrex/Debi...tallation.html
This link explains how to install nvidia drivers on systems with older cards. I followed the instructions using module assistant. It installed first time, and now I am running nvidia drivers on my system. And it makes a huge difference from using the VESA driver. Anyone running older nvidia cards, or just having trouble getting the nvidia drivers working should check out this link and give it a go. Good Luck! :study: |
Quote:
Anyways, you got that howto to do it the debian way, or you can find some repo someplace where somebody maintaints debs for you. Or you can just do it the normal way by installing kernel-headers-<your kernel version 'uname -r' goes here> and running the nvidia driver .run file. If something happens like the drivers from nvidia are for gcc-3.2 and 3 and you have gcc 4.0 like unstable right now. Then you just 'export CC=gcc-3.3' to trick them into thinking you have gcc 3.3 and install away. |
Nvidia drivers are easy to setup from the bin file. It won't work for old video cards though then you need to compile it with nvidia-glx.
|
All times are GMT -5. The time now is 11:12 AM. |