The debian packages do not work well. Use NVidia Drivers from: http://www.nvidia.de/object/unix-de.html
Uninstall all other Drivers:
apt remove --purge nvidia-*
For older cards, you need older drivers! 304.135 OR Version 340.102 - depending on the series (check lspci)
If the module cannot be compiled, because of gcc version mismatches, install the correct version and set this one as default:
update-alternatives --config gcc # complains about missing alternatives. So install them: update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 20 update-alternatives --config gcc # should work now
In case the xserver still doesn't start, make sure nouveau drivers are uninstalled and blacklist them:
mcedit /etc/modprobe.d/blacklist-nouveau.conf blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off