Installation from nvidia repository fails due to wrong kernel version assumption

I’m running a new machine with Linux Mint 16 64bit (Ubuntu 13.10) and a GK104. I wanted to install cuda from the repository offered by nvidia.

I did the following steps:

  1. Installed the operating system
  2. Updated all packages
  3. Downloaded NVIDIA Repository (the 13.04 64bit one)
  4. Updated package list and called: 'sudo apt-get install cuda'
  5. It begins the installation, but the generation of the kernel module fails (see below)
derigs@cuda ~ $ sudo apt-get install --reinstall nvidia-331
[...]
INFO:Enable nvidia-331
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Loading new nvidia-331-331.62 DKMS files...
Building only for 3.11.0-12-generic
Building for architecture x86_64
Building initial module for 3.11.0-12-generic
Error! Application of patch buildfix_kernel_3.10.patch failed.

Obviously my kernel is ‘3.11.0-12-generic’ (this is true). However, the installation wants to apply the patch buildfix_kernel_3.10.patch.
I think this is why the installation fails.

What do I have to do in order to get everything running for CUDA development on this machine?

Look at posts #8 and #7 in this thread:

Different driver version, but same methodology to disable the patch (assuming you don’t need it)
If it doesn’t compile without the patch, you might have to hand edit the files with the changes in the patch.

Thank you. Solved it another way: Installed kernel v 3.13 where the installation worked out fine.