If you have a very old nvidia card, you will want to use the FOSS nvidia driver (nouveau) as it is likely the only thing that will work for you. But realistically, if you have nvidia graphics on your system, you will want to use the binary driver. This is a quick guide to that. The nvidia driver is in the non-free repo, so make sure you have that added to your sources.list. Then you can do the following various things (as root, or sudo as necessary)
apt install nvidia-detect
nvidia-detect
It will tell you which nvidia driver you should run, e.g.
It is recommended to install the
nvidia-driver
package.
ok...
apt install nvidia-driver nvidia-xconfig nvidia-settings
nvidia-xconfig --composite --damage-events --flip --render-accel --render-extension --no-sli --no-stereo --ubb --use-events
Or similar, you might not want some of these --no options. For performance you also want to change a couple of other options manually in the newly created /etc/X11/xorg.conf:
Section "Screen"
Identifier "Screen0"
...
Option "ForceFullCompositionPipeline" "on"
Option "TripleBuffer" "on"
Option "AllowIndirectGLXProtocol" "off"
...
EndSection
The first of these options requires the other two. Triple Buffering alone improves performance, but this combination avoids tearing which is unavoidable any other way. If you want to run GLX programs remotely and display them on your local display (perhaps through a ssh tunnel) then instead of this, only set TripleBuffer to "on", and AllowIndirectGLXProtocol to "on" as well. Don't set ForceFullCompositionPipeline.