I have Ubuntu 18.04 installed on ASUS laptop with GEFORCE 940MX GPU card. I have tried everything using proprietary drivers or using NVIDIA run file to install cuda drivers. Finally, I was able to install NVIDIA and CUDA drivers using cuda run file. OpenGL and NVIDIA-X-config were not installed during this installation. Also, secure boot is disabled prior to installation.
Now, nvidia-smi works after this installation, but whenever I reboot system it gives error: "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running."
It will be really helpful if experts can comment how to overcome this issue. Thanks in advance