Ubuntu 16.04. Cuda-8. CUDA driver version is insufficient for CUDA runtime version

Hi everybody,
I’m trying to install CUDA 8 on Ubuntu 16.04 with GeForce 940M and 361.77 driver version.Everything seemed to work ok (including compiling samples) but I get a “CUDA driver version is insufficient for CUDA runtime version” error when running deviceQuery:

$ ./deviceQuery 
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

$cat /proc/driver/nvidia/version 
NVRM version: NVIDIA UNIX x86_64 Kernel Module  361.77  Sun Jul 17 21:18:18 PDT 2016
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)

$ lspci | grep -i nvidia
0a:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev a2)

I can’t figure out what to do. Any help would be appreciated.
Thanks in advance,
Nina.

Your driver is probably not installed correctly. How did you install it? What is the result of running:

nvidia-smi

?

The result of nvidia-smi:

$ nvidia-smi
Mon Sep  5 14:40:04 2016       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 361.77                 Driver Version: 361.77                    |
|-------------------------------+----------------------+----------------------+
| 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 940M        Off  | 0000:0A:00.0     Off |                  N/A |
| N/A   34C    P8    N/A /  N/A |     84MiB /  2003MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      2651    G   /usr/lib/xorg/Xorg                              57MiB |
|    0      3506    G   ...slateUI2016Q2,UsePasswordSeparatedSigninF    27MiB |
+-----------------------------------------------------------------------------+

I’ve installed driver from official site Nvidia, when my version of Ubuntu was 15.10. But now it is Ubuntu 16.04.

The problem was in the NVIDIA driver. I’ve installed driver version 367.44 by this guide http://yangcha.github.io/GTX-1080/. And after reinstall CUDA 8.0.

@nina_t so what was your solution?