There is a patch for NVIDIA drivers compatibility. I've tested it with 325.15 drivers from xorg-edgers PPA and it works although it needs some tweaking for Ubuntu. I also used it in the same way as the patches coming from PPA.
Make new file in /usr/src/nvidia-325-325.15/patches/ titled buildfix_kernel_3.12.patch like this:
Code:
sudo nano /usr/src/nvidia-325-325.15/patches/buildfix_kernel_3.12.patch
and paste the contents of the attached file. Save using CTRL + o shortcut. You can also copy the file instead to that directory (change it from txt to patch).
Then edit this file:
Code:
sudo nano /usr/src/nvidia-325-325.15/dkms.conf
and add this line at the end:
Code:
PATCH[1]="buildfix_kernel_3.12.patch"
save the file and reboot or install the kernel again to build the NVIDIA module.