Which cards will this work for?
I have not tested this on any graphics card except for the GTX 750 TI, but it should work for any NVidia card that is based on the Maxwell architecture. I recommend starting this tutorial with the GPU not installed.
Which kernel versions will this work for?
I had installed the newest Linux kernel at the time (v3.17) and it did not work with this installation. I would strongly recommend using the generic Linux image provided by Canonical. Newer kernel versions might yet be supported by DKMS and will cause a crash during the driver installation phase. I have tested this with
3.13.0-39-generic in Ubuntu 14.04 Trusty Tahr and it worked great. Use newer kernel versions at your own risk.
If you are running Ubuntu 14.04 with the default kernel, you shouldn't have any problems.
Step 1: Download the GeForce 343.22 driver
You can find it here. You MUST install this version of the driver or a newer one if available even if it is not technically supported for your card.
Any driver from the GTX 700 Series might work, but your card will not run smoothly. I tried using the GeForce 700 Series 340.58 driver and it worked for my card, but it was not perfect.
Step 2: Graphical part of the install
This part of the install can be done in Unity without any problems. Before you start this, make sure the driver has finished downloading, just in case. Just a warning, if you restart your computer during this part of the tutorial, you might mess up your graphics environment and you will have to start in safe-graphics mode to fix it. I have based this part of the tutorial on this answer to a similar question.
Remove any NVidia drivers that might have been installed with apt-get
sudo apt-get remove nvidia* && sudo apt-get autoremove
Prevent nouveau from starting at boot
sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
Append these lines to the end:
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Disable kernel support for nouveau
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
Step 3: Non-graphical part of the install
You may want to print out this part of the tutorial or open it on a separate computer, because you will not be able to view this webpage once you enter TTY mode.
At this point, you must enter TTY mode. You can do this by pressing Ctrl+Alt+F1. You can also get to other terminals by using the F2-F6 keys. Press Ctrl+Alt+F7 if you need to get back into graphics mode.
Stop the lightdm service
sudo lightdm stop
sudo service lightdm stop
Install for the GeForce driver
sudo bash ./NVIDIA-Linux-x86_64-343.22.run
This will probably tell you that a supported graphics card is not installed. We don't care, install anyways.
Make sure to answer yes to all prompts, even when it asks you if you want to enable 32-bit compatibility.
If the driver install has successfully completed, it is safe shutdown your computer.
sudo shutdown -h now
Make sure that the graphics card is properly seated in the motherboard, and turn your computer back on. Everything should now be working properly. Please comment if you run into problems with this.