Installer les drivers nVidia pour Debian
Moi même j’ai dû chercher un peu la première fois pour Debian, étant relativement différent des autres ditributions (avec Mandriva j’installais les drivers directement depuis le site nVidia et avec Ubuntu il y a avait un how-to très simple).
Pour ne pas réinventer la roue, je vais simplement fournir la référence du how-to qui m’a permis, contrairement à d’autres, d’installer et faire fonctionner les drivers nVidia pour Debian.
Référence du how-to: tinyplanet.ca/~lsorense/debian/d … -howto.txt
Il suffit de le suivre pas à pas, tel quel.
Juste une petite remarque pour les utilisateurs de Xorg et non de Xfree, tout comme moi, il suffit de remplacer les « xserver-xfree86 » rencontrés dans ce how-to par « xserver-xorg ».
[quote]Simple instructions on how to install nVidia drivers for X11 on
Debian written by Len Sorensen.
(LSorensen on irc.debian.org, lsorense -at- csclub.uwaterloo.ca)
Last updated September 7 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:
sarge: Debian 3.1 stable release
etch: 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.)
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. In fact the nvidia installer doesn’t agree with where Debian
installs files.
Step 1: Preparing your package sources
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. This should
not be a problem since all current Debian releases use either 2.4 or
2.6 kernels.
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. If you already had the current kernel, you can just
continue.
Step 3: Installing needed packages for building the nvidia kernel module.
Install a few packages needed:
apt-get install nvidia-kernel-common module-assistant
If you are running a debian kernel do this:
m-a -i prepare
If you built your own kernel, just make sure you know where the source
for it is located so you can pass the location to m-a.
Step 4: Building and installing the nvidia kernel module
Build the kernel module package:
m-a a-i -i -t -f nvidia-kernel
depmod -a
or if using your own kernel build:
m-a a-i -i -t -f -k /usr/src/kernelsourcepath nvidia-kernel
depmod -a
Where /usr/src/kernelsourcepath is the location of your kernelsource
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. If you ever edited the
XF86Config-4 file manually, the simplest way to overwrite it with one that
has the new values is to run ‹ dexconf ›. If you never edited it yourself,
it should just auto update with the new settings.
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.
Notes:
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 repeat step
4 again to build the nvidia kernel module to match the new driver and/or
new kernel. One potential solution to part of this (at least for a new
kernel version) would be to have something in the boot up scripts do:
modprobe nvidia || m-a a-i -i -t -f nvidia-kernel && depmod -a && modprobe nvidia
That should load the nvidia driver and if it fails, run the rebuild
command and then load it again. It won’t help if a new nvidia glx driver
is installed, since the old module will load fine, but the driver won’t
get along with it, and the boot scripts can’t detect the cause of X not
started (it probably won’t even know X failed to start).
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;
modprobe -r nvidia; modprobe nvidia; start X again.[/quote]
A titre d’exemple, voici le contenu de mon fichier /etc/X11/xorg.conf:
[code] (…)
Section « Module »
Load « bitmap »
Load « dbe »
Load « ddc »
Load « dri »
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "record"
Load "type1"
Load "v4l"
Load "vbe"
EndSection
(…)
Section « Device »
Identifier « NVIDIA Corporation NV34 [GeForce FX 5200] »
Driver « nvidia »
BusID « PCI:1:0:0 »
Option « UseFBDev » « true »
Option « NoLogo »
EndSection
Section « Monitor »
Identifier « CPD-E430 »
Option « DPMS »
EndSection
Section « Screen »
Identifier « Default Screen »
Device « NVIDIA Corporation NV34 [GeForce FX 5200] »
Monitor « CPD-E430 »
DefaultDepth 24
SubSection « Display »
Depth 1
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
SubSection « Display »
Depth 4
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
SubSection « Display »
Depth 8
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
SubSection « Display »
Depth 15
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
SubSection « Display »
Depth 16
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
SubSection « Display »
Depth 24
Modes « 1280x1024 » « 1024x768 » « 800x600 » « 640x480 »
EndSubSection
EndSection
(…)
#Section « DRI »
Mode 0666
#EndSection
[/code]
Et pour terminer, voici d’autres how-to concernant l’installation des drivers nVidia pour Debian: