Installing CUDA 10.1 Update 2 in elementary OS Juno / ubuntu 18.04.1

Hello there,

I am trying to install CUDA 10.1 update 2 from the official .deb (network) package. It is weird I have been able to install CUDA many times and this is the first time that this issue comes up.

The issue is that when I try to run a program I get the following:

CUDA driver version is insufficient for CUDA runtime version

Ok, I thought that the driver version mismatches CUDA runtime version, but when I saw the table on https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#major-components I realized that for CUDA 10.1 I need a driver >= 418.39.

Ok, then I checked the nvidia-smi output:

Fri Nov  8 17:34:05 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 950M    On   | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P0    N/A /  N/A |    259MiB /  2004MiB |     64%      Default |
+-------------------------------+----------------------+----------------------+

So Driver Version: 418.87.01 > 418.39…

What I have also checked is the driver version with

cat /proc/driver/nvidia/version

The output is:

NVRM version: NVIDIA UNIX x86_64 Kernel Module  418.87.01  Wed Sep 25 06:00:38 UTC 2019
GCC version:  gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)

What did I do wrong?
Is there a way to fix and to run CUDA applications on my laptop?

Cheers,

This is a broken driver installation. The fact that nvidia-smi indicates N/A for the CUDA version is a clue to this.

A proper driver install requires understanding the history of the machine. I don’t know the history of your machine so I’m not sure there is anything else I can say.

If you reload the OS, then you can establish a known “history” that way, or else clean up/clean out all old driver installs from whichever sources (nvidia, ubuntu, ppa, etc.) and try again.