Cuda 11.4 installer wants to install nvidia driver version incompatible with Tesla K40m

I’m trying to install CUDA 11.4 on my Ubuntu 21.04 machine, which has a Tesla K40m installed.

Because the K40 is so old, it is not supported by the latest Nvidia driver v495. I have driver 470 installed, which works well.

I’ve followed the directions to add the Ubuntu 20.04 Nvidia repo (Index of /compute/cuda/repos/ubuntu2004/x86_64) and tried sudo apt install cuda-11-4. This has a dependency on nvidia driver >=470.52.02 (the version I have installed) but tries to update to the latest version, 495. This driver is incompatible with my K40.

Is there any way to install cuda-11-4 without upgrading nvidia-driver-470 to nvidia-driver-495? Trying sudo apt-mark hold nvidia-driver-470 results in unmet dependencies issues.

The package “cuda” always also installs the driver from the repo, please try the “cuda-toolkit” meta package
sudo apt install cuda-toolkit-11-4

Thanks for your reply!

I got things working well enough by pulling one of the Nvidia CUDA/cuDNN Docker images.

I will be sure to try your suggestion if I need CUDA installed directly on my machine in the future.

Here installed driver 470 install CUDA 11.4 and for you is version 11.3 ?
Tesla K40m is Kepler.
GT 640 Kepler not is compatible with CUDA 11.3 and Tesla K40m being Kepler works with driver 470 and CUDA 11.4 ?

The CUDA release notes have a deprecation notice about sm_35, for sure. I’m using an 11.3 Docker image, it seems to be running just fine on the K40, so I guess 11 is the last version that will run.

CUDA 11.x versions are all compatible with one another, so I’m confused why you say 11.3+ specifically is not compatible with Kepler. Is 11.2 compatible?

Thanks for share the links above :)

I had tested in Ubuntu 20.04.3 and 21,04 64 bits both drivers below :

  • Driver 465.31 install CUDA runtime 11.3 compatible with Geforce 600 Kepler.
  • Driver 470 install CUDA runtime 11.4 not is compatible with Kepler thus not CUDA and NVENC are available.

I has reported that problem in Nvidia support.
Exactly in last driver for Kepler was done a wrong upgrade. Nvidia have breaked CUDA for Kepler in driver 470.
Driver 465.31 works fine.

I not has tested installing CUDA toolkit.