NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.

Configuration: Centos7
GPU:Getforce 940M
installed driver version 375.39
nvidia-smi gives me following error
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.
deviceQuery returns:

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

cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL

Hey Dattatray_Sawat,
Did you get any progress so far? I am having a similar issue.

Hi Vicky_123,

I was able to solve this problem. In my case the secure boot option was enabled, because of that kernel was not able to load signed module by Nvidia installer.

Workaround:
disable secure boot option in BIOS(if enabled)

and then check if that solves your problem.

Hi Dattatray,
Secure boot option is disabled. But, it is still not working. I don’t know what is going on? Everytime I reinstall the drivers and toolkit, it works for few days and then suddenly it stops working and “nvidia-smi” gives the same error, i.e. “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.”… :(