I hit ctrl alt f2 to go to terminal
I got rid of everything nvidia by sudo apt-get --purge remove nvidia-
stopped lightdm by sudo service lightdm stop
cleaned some stuff up with:
sudo apt-get autoclean
sudo apt-get clean
audo apt-get autoremove
Disabled nouveau as per cuda installation instutions:
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
Added the following lines to the file:
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Saved it.
Sudo update-initramfs -u
Then then the run file from the nvidia cuda website (I renamed it before to cuda.run for easy typing)
sudo chmod +x cuda.run
sudo sh cuda.run
After accepting the agreement, it failes to install the nvidia 346.46 driver with the following error message:
"The driver installation is unable to locate the kernal source. Please make sure that the kernel source packages are installed and set up correctly. If you know the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag."