NVIDIA/nvidia-drivers/fr

nvidia est le pilote graphique propriétaire pour les cartes graphiques nVidia. nouveau est une alternative open source à ce pilote.

Les pilotes nVidia de l'arbre sont compilés pour une prise en charge par le noyau Linux. Ils contiennent un objet binaire (blob) qui fait l'essentiel du travail de discussion avec la carte. Ils comprennent deux parties, un module du noyau et un pilote X11. Les deux parties sont incluses dans un paquet unique. À cause de la manière dont nVidia empaquettent leurs pilotes, vous devrez fixer quelques options avant de les installer.

Le paquet nvidia-drivers  contient la dernière version des pilotes nVidia qui prennent en charge toutes les cartes, avec plusieurs versions disponibles selon l'âge de votre carte. Il a recours à une eclass pour détecter le type de carte que vous utilisez et installer ainsi la version adaptée.

Compatibilité du pilote
Le paquet prend en charge de nombreuses cartes nVidia. De multiples versions sont disponibles selon la (les) carte(s) que vous avez. Reportez-vous à la page Qu'est-ce qu'un Legacy GPU?,de la documentation officielle de nVidia pour déterminer la version du pilote que vous devriez utiliser.

Si vous avez identifiée votre carte comme étant une carte patrimoniale, vous devez masquer les versions plus récentes des, c'est à dire,

Notez bien que Gentoo ne fournit pas les versions 71.86.xx. Si votre carte requiert ces pilotes, nous vous conseillons d'utiliser le pilote nouveau.

Noyau
Comme nous l'avons mentionné plus haut, le pilote noyau nVidia s'installe et fonctionne en lien avec votre noyau courant. Il est compilé en tant que module, c'est pourquoi votre noyau doit prendre en charge le chargement de modules. Si vous avez utilisé genkernel all pour configurer votre noyau, c'est déjà le cas. Si vous avez procédé différemment, regardez attentivement votre configuration du noyau pour vérifier que cette prise en charge est activée :

Vous devez aussi activer Memory Type Range Register dans votre noyau :

De plus, si vous avez une carte graphique AGP, vous pouvez activer en option la prise en charge agpgart à votre noyau, soit incorporée au noyau, soit en tant que module. Si vous ne choisissez pas d'utiliser la version incorporée de agpgart, alors les pilotes utiliseront leur propre mise en œuvre de agpgart, appelée NvAGP. Sur certains systems, cela conduit à de meilleures performances, sur d'autres c'est l'inverse. Vous devrez apprécier cela vous-même sur votre système pour trouver ce qui apporte la meilleure performance. S'il vous reste un doute, utilisez la mise en œuvre incorporée au noyau :

A framebuffer alternative is uvesafb, which can be installed parallel to nvidia-drivers.

The nvidia-drivers ebuild automatically discovers your kernel version based on the symlink. Please ensure that you have this symlink pointing to the correct sources and that your kernel is correctly configured. Please refer to the "Configuring the Kernel" section of the Gentoo Handbook for details on configuring your kernel.

First, you'll need to choose the right kernel source using eselect. If you are using gentoo-sources-3.7.10, your kernel listing might look something like this:

In the above output, you'll notice that the linux-3.7.10-gentoo kernel is marked with an asterisk (*) to show that it is the symlinked kernel.

If the symlink is not pointing to the correct sources, you must update the link by selecting the number of your desired kernel sources, as in the example above.

Drivers
Now it's time to install the drivers. You can do this by first following the X Server Configuration HOWTO and setting VIDEO_CARDS="nvidia" in. When you install the X server, it will then install the right version of nvidia-drivers for you.

Once the installation has finished, run modprobe nvidia to load the kernel module into memory. If this is an upgrade, you should remove the previous module first.

To prevent you having to manually load the module on every bootup, you probably want to have this done automatically each time you boot your system, so edit and add nvidia to it.

The X Server
Once the appropriate drivers are installed you need to configure your X Server to use the nvidia driver instead of the default nv driver.

Run eselect so that the X Server uses the nVidia GLX libraries:

Testing your Card
To test your nVidia card, fire up X and run glxinfo, which is part of the mesa-progs package. It should say that direct rendering is activated:

To monitor your FPS, run glxgears.

Enabling nvidia Support
Some tools, such as mplayer and xine-lib, use a local USE flag called xvmc which enables XvMCNVIDIA support, useful when watching high resolution movies. Add in xvmc in your USE variable in or add it as USE flag to media-video/mplayer and/or media-libs/xine-lib in.

GeForce 8 series and later GPUs do come with VDPAU support which superseded XvMCNVIDIA support. See the VDPAU article for enabling VDPAU support.

There are also some applications that use the nvidia USE flag, so you may want to add it to.

Then, run emerge -uD --newuse @world to rebuild the applications that benefit from the USE flag change.

Using NVidia Settings Tool
nVidia also provides you with a settings tool. This tool allows you to monitor and change graphical settings without restarting the X server and is available through Portage as media-video/nvidia-settings. As mentioned earlier, it will be pulled in automatically if you install the drivers with the gtk USE flag set in or in.

Enable Opengl/Opencl
To enable opengl and opencl.

Setting opengl will require your systems x11 to not be running.

Getting 2D to work on machines with 4Gb or more memory
If you are having troubles with the nVidia 2D acceleration it is likely that you are unable to set up a write-combining range with MTRR. To verify, check the contents of :

Every line should contain "write-back" or "write-combining". If you see a line with "uncachable" in it you will need to change a BIOS setting to fix this.

Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU Settings"). Change the setting from "continuous" to "discrete" and boot back into Linux. You will now find out that there is no "uncachable" entry anymore and 2D acceleration now works without any glitches.

When I attempt to load the kernel module, I receive a "no such device"
This is usually caused by one of the following issues:

1. You don't have an nVidia card at all. Check lspci output to confirm that you have an nVidia graphics card installed and detected.

2. The currently installed version of x11-drivers/nvidia-drivers does not support your graphics card model. Check the README file in /usr/share/nvidia-drivers-*/ for a list of supported devices, or use the driver search at http://www.geforce.com/drivers. See the Which Version section above.

3. Another kernel driver has control of the hardware. Check lspci -k to see if another driver like "nouveau" is bound to the graphics card. If so, you will need to disable or blacklist this driver.

Xorg says it can't find any screens
When you boot up your computer and end up with a black screen or a console prompt instead of your GUI; you can press Ctrl+Alt+F2 to bring up a console prompt if you don't already have one. Then you can run:

to see the output of Xorg. If one of the first errors is that Xorg can't find any screens, then follow these steps to resolve your issue.

It should be enough to run the following command before rebooting:

But if that doesn't work, run lspci and you'll find your video card starts off like this: 01:00.0 VGA compatible controller: make and model of videocard

Take the first bit, 01.00.0 and put it in your /etc/X11/xorg.conf with the BusID option:

Documentation
The nVidia driver package also comes with comprehensive documentation. This is installed into /usr/share/doc and can be viewed with the following command:

Kernel module parameters
The nvidia kernel module accepts a number of parameters (options) which you can use to tweak the behaviour of the driver. Most of these are mentioned in the documentation. To add or change the values of these parameters, edit the file /etc/modprobe.d/nvidia.conf. Remember to run update-modules after modifying this file, and bear in mind that you will need to reload the nvidia module before the new settings take effect.

Edit /etc/modprobe.d/nvidia.conf in your favourite editor:

Update module information:

Unload the nvidia module...

...and load it once again:

Advanced X configuration
The GLX layer also has a plethora of options which can be configured. These control the configuration of TV out, dual displays, monitor frequency detection, etc. Again, all of the available options are detailed in the documentation.

If you wish to use any of these options, you need to list them in the relevant Device section of your X config file (usually /etc/X11/xorg.conf). For example, suppose I wanted to disable the splash logo:

Acknowledgements
We would like to thank the following authors and editors for their contributions to this guide: Sven Vermeulen, Joshua Saddler, M Curtis Napier and Chris Gianelloni.