NVIDIA drivers mysteriously disappearing

My operating system is Ubuntu 16.04. My graphics card is NVIDIA GeForce GTX 960M. I recently installed CUDA 9.0 driver and toolkit. I successfully compiled and ran CUDA applications. However, upon reboot, the drivers seem to have disappeared, and it is like I never installed them.

The result of nvcc -v is

The program 'nvcc' is currently not installed. You can install it by typing:
sudo apt install nvidia-cuda-toolkit

cat /proc/driver/nvidia/version gets me

cat: /proc/driver/nvidia/version: No such file or directory

The directory indeed does not exist. dev/nvidia also has disappeared. My CUDA samples folder still exists though.

This is the second time this has happened, both times within a day or two of installing CUDA. Everything works fine, I can run applications, and poof it’s gone. I read some threads blaming updates for a similar problem, but I have automatic updates disabled.

Any insight is highly appreciated.

Same thing happens to me as well. I’m on Ubuntu 14.04 LTS

Aight so I’ve (kind of) figured out the problem. The drivers disappear whenever I install any type of new software whatsoever, not just system updates. Getting adobe flash player will do it. I haven’t figured out any solution, other than disabling all updates and never installing any new software.

Got the same problem, and my system is Ubuntu 16.04LTS,After I installed nvidia-driver it worked well, But some days later it suddenly disappeared without warning. I don’t know why, So don’t know how to find it back. And when I installed again, when installing, it will tell me that nvidia-driver is exist in my system and ask me to remove it or not. But I can’t find it throuh the settings or command with ‘nvidia-smi’ in the terminal.

This just happened to me on Ubuntu 18.04, CUDA 10 and an Nvidia Quadro K5000. Worked well for weeks, now I just came into office, started the computer and it booted in low resolution. nvcc doesn’t work and the graphics driver seemingly just disappeared.

having auto-updates enabled on Ubuntu can break the driver install, if an update that is applied (usually when you reset or power-cycle the machine) affects the kernel configuration.

DKMS is designed to help in this situation, but it may or may not be installed or enabled in your configuration.