NVIDIA/nvidia-drivers/it

è il driver grafico proprietario per schede grafiche nVidia. Una alternativa open source è nouveau.

I drivers vengono rilasciati da nVidia e sono costruiti per il kernel di Linux. Essi contengono una parte binaria che fa il lavoro pesante per dialogare con la scheda video. I driver sono costituiti da due parti, un modulo del kernel, e un driver X11. Entrambe le parti sono incluse in un singolo pacchetto. A causa del modo in cui nVidia ha creato i suoi drivers, è necessario fare delle scelte prima di installarli.

Il pacchetto contiene i driver più recenti di nVidia con supporto per tutte le schede video, con diverse versioni disponibili a seconda dell'età della scheda. Si avvale di un eclass per rilevare che tipo di scheda è in esecuzione sul sistema, in modo che installi la versione corretta.

Compatibilità hardware
Il pacchetto supporta una vasta gamma di schede nVidia disponibili. Versioni multiple sono disponibili per l'installazione, a seconda della scheda video che ha il sistema. Consultare la documentazione ufficiale di nVidia, What's a legacy driver?, per scoprire che versione di dovrebbe essere installata. Un modo abbastanza buono per scoprirlo è attraverso an interactive form. Inserire la scheda grafica che viene utilizzata dal sistema (ricordare l'opzione Legacy nel campo 'Tipo di prodotto') e il form dirà qual'è la versione più supportata.

Se la scheda è stata identificata come legacy, mascherare le più recenti releases di, cioè

Si noti che Gentoo non fornisce la versione 71.86.xx. Se il sistema dispone di una scheda che ha bisogno di queste versioni di drivers, allora è consigliabile utilizzare il driver nouveau.

Kernel
Come accennato in precedenza, il driver del kernel nVidia installa ed esegue in opposizione al kernel corrente. Se costruito come modulo, il kernel deve supportare il caricamento dei moduli (vedi sotto).

Il modulo del kernel è costituito da una parte proprietaria (comunemente nota come "binary blob") che pilota il chip grafico, e una parte open source (detta "glue") che durante il fuzionamento opera come intermediario tra la parte proprietaria e il kernel. Questi tutti hanno bisogno di lavorare bene insieme, altrimenti l'utente potrebbe trovarsi di fronte alla perdita di dati (attraverso kernel panic, X server crashing con i dati non salvati nelle applicazioni X) e anche guasti hardware (surriscaldamento e altre questioni di alimentazione relative che potrebbero venire in mente).

Compatibilità del kernel
Di tanto in tanto, una nuova release del kernel cambia l'ABI interno per i drivers, il che significa che tutti i drivers che utilizzano tali ABI devono essere modificati di conseguenza. Per i drivers open source, in particolare quelli distribuiti con il kernel, questi cambiamenti sono banali da risolvere dal momento che l'intera catena di chiamate tra i drivers e le altre parti del kernel possono essere riviste abbastanza facilmente. Per i drivers proprietari come nvidia.ko, non è proprio la stessa cosa. Quando l'ABI interno viene cambiato non è possibile sistemare semplicemente il "glue", perché nessuno sa come tale "glue" (collante) è utilizzato dalla parte proprietaria. Anche dopo essere riusciti a sistemare le cose e anche dopo che queste sembra funzionino bene, l'utente rischia ancora l'esecuzione di nvidia.ko nel nuovo kernel non supportato, e ciò porterà alla perdita di dati e guasti hardware.

Quando una nuova incompatibile versione del kernel viene rilasciata, è probabilmente meglio attaccarsi per un po' al nuovo kernel supportato. Nvidia richiede solitamente un paio di settimane per preparare una nuova release e in genere pensano che questa sia adatta per un uso generale. Sii paziente. Se assolutamente necessario è possibile utilizzare il comando epatch_user con gli ebuild nvidia-drivers: questo permette all'utente di adattare in qualche modo i drivers nvidia con l'ultima versione del kernel non supportata. Da notare che né i manutentori dei drivers nvidia né Nvidia stessa sosterranno questa situazione. La garanzia hardware molto probabilmente sarà nulla, i manutentori di Gentoo non potranno iniziare a risolvere i problemi in quanto si tratta di un driver proprietario che solo Nvidia può correttamente mettere a punto, e i manutentori del kernel certamente non supportano i driver proprietari, o qualsiasi "sistema contaminato" che funziona in difficoltà.

If was used to configure the kernel, then everything is all set. If not, double check the kernel configuration so that this support is enabled:

Also enable Memory Type Range Register in the kernel:

If the system has an AGP graphics card, then optionally enable agpgart support to the kernel, either compiled in or as a module. If the in-kernel agpgart module is not used, then the drivers will use its own agpgart implementation, called NvAGP. On certain systems, this performs better than the in-kernel agpgart, and on others, it performs worse. Evaluate either choice on the system to get the best performance. When uncertain what to do, use the in-kernel agpgart:

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

For (U)EFI systems, uvesafb will not work. Be warned that enabling efifb support in kernel causes intermittent problems with the initialization of the nvidia drivers. There is no known alternative framebuffer for (U)EFI systems.

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

First, choose the right kernel source using. When using version 3.7.10 for instance, the kernel listing might look something like this:

In the above output, 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, update the link by selecting the number of the desired kernel sources, as in the example above.

Drivers
Now it's time to install the drivers. First follow the X Server Configuration Guide and set  in. During the installation of the X server, it will then install the right version of.

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

To prevent from having to manually load the module on every bootup, have this done automatically each time the system is booted, so edit and add   to it.

Kernel module signing (optional)
If you are using secure boot kernel signing then you will need to sign the Nvidia kernel modules before they can be loaded.

You do this by using the kernel provided script as follows.

As of driver version 358.09 a new module has been made to handle monitor mode setting and for this driver version this module must also be signed.

Once you have signed these modules then the driver will load as expected on boot up. This module signing method can be used to sign other modules not only your nvidia-drivers. You would have to modify the path and corresponding module accordingly.

The X server
Once the appropriate drivers are installed, configure the X server to use the  driver instead of the default   driver.

Run so that the X server uses the nVidia GLX libraries:

Enabling global nvidia support
Some tools, such as and, use a local USE flag called   which enables XvMCNVIDIA support, useful when watching high resolution movies. Add in  in the USE variable in  or add it as USE flag to  and/or  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  USE flag, so it might be a good idea to add it to.

Then, run to rebuild the applications that benefit from the USE flag change.

Using the nVidia settings tool
nVidia also provides a settings tool. This tool allows the user to monitor and change graphical settings without restarting the X server and is available through Portage as. As mentioned earlier, it will be pulled in automatically when installing the drivers with the  USE flag set in  or in.

Enable OpenGL/OpenCL
To enable OpenGL and OpenCL though the device, run:

Make sure that the Xorg server is not running during these changes.

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

To monitor the FPS, run.

Driver fails to initialize when MSI interrupts are enabled
The Linux NVIDIA driver uses Message Signaled Interrupts (MSI) by default. This provides compatibility and scalability benefits, mainly due to the avoidance of IRQ sharing. Some systems have been seen to have problems supporting MSI, while working fine with virtual wire interrupts. These problems manifest as an inability to start X with the NVIDIA driver, or CUDA initialization failures.

MSI interrupts can be disabled via the NVIDIA kernel module parameter. This can be set on the command line when loading the module, or more appropriately via the distribution's kernel module configuration files (such as those under ).

For instance:

Getting 2D acceleration to work on machines with 4GB memory or more
When nVidia 2D acceleration is giving problems, then it is likely that the system is unable to set up a write-combining range with MTRR. To verify, check the contents of :

Every line should contain  or. When a line shows up with  in it then it is necessary 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  to   and boot back into Linux. There is now no  entry anymore and 2D acceleration now works without any glitches.

"no such device" appears when trying to load the kernel module
This is usually caused by one of the following issues:


 * 1) The system does not have a nVidia card at all.  Check  output to confirm that the system has a nVidia graphics card installed and detected.
 * 2) The currently installed version of  does not support the installed 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.
 * 3) Another kernel driver has control of the hardware. Check  to see if another driver like "nouveau" is bound to the graphics card. If so, disable or blacklist this driver.

Xorg says it can't find any screens
When after booting the system, it ends up with a black screen or a console prompt instead of the GUI; then press ++ to bring up a virtual console. Next, run:

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

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

But if that doesn't work, run and notice that the video card starts off like this:

Take the first bit,  and put it in the  file with the   option:

Direct rendering is not enabled
If direct rendering does not work, it may be because the kernel has Direct Rendering Manager enabled, which conflicts with the driver. See the direct rendering status by following instructions in the section Testing the card.

First, disable Direct Rendering Manager in the kernel :

Next, rebuild since the driver may have built against the kernel DRM symbols. It should fix the problem.

Video playback stuttering or slow
Lately there seems to be some breaking with playback of some types of video with the NVidia binary drivers, causing slow video playback or significant stuttering. This problem seems to be occurring within the Intel CPU Idle replacement instead of the common ACPI CPU idling method for certain CPU's.

Disable the Intel CPU idling method using  on the kernel command line boot method, which should cause the kernel to automatically fall back to the normal or older ACPI CPU idling method. Also, disabling the NVidia Powermizer feature, or setting Powermizer to maximum performance within has been said to help. Although the Intel CPU idling method recently was introduced as the default CPU idling method for i5 and i7 CPUs (versus using ACPI CPU idling) is the root cause here. This idling method significantly solves the problem, however some minimal stuttering or slow video is encountered if deinterlacing was enabled; this is when the video is likely already deinterlaced (ie. alias  with something similar to   as a work around.)

No vertical synchronization (no VSync, tearing) in OpenGL applications
Adding the following option to the screen section prevents tearing on GTX 660, 660 Ti, and probably some other GPUs (reference):

Documentation
The package also comes with comprehensive documentation. This is installed into and can be viewed with the following command:

Kernel module parameters
The  kernel module accepts a number of parameters (options) which can be used 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. Remember to run after modifying this file, and bear in mind to reload the   module before the new settings take effect.

Edit :

Update module information:

Unload the  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.

To use any of these options, list them in the relevant Device section of the X config file (usually ). For example, to disable the splash logo: