Terminal freezing after performing any CUDA related operation after updating the recent drivers

I have Titan X in my system and recently updated my NVIDIA drivers using NVIDIA-Linux-x86_64-352.79.run and cuda_7.5.7_rc_linux.run. I want to use my GPU for research purpose so I installed it without opengl:

sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-352.79.run --no-opengl-files
sudo ./cuda_7.5.18_linux.run

But now whenever I try to use my GPU either through Torch7 (say: require ‘cunn’) or for any other system related application (say: nvidia-smi); my terminal freezes. I tried to uninstall and reinstall but now when I try to run the same above script, I get the error “Unable to load kernel module”

I performed the following steps for uninstalling and reinstalling.

sudo /usr/local/cuda-7.5/bin/uninstall_cuda_7.5.pl
sudo apt-get remove --purge nvidia-* && apt-get autoremove


sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-352.79.run --no-opengl-files

So now I am not even able to complete my installation. Can anyone help me in finding a solution to this?


The cuda 7.5.18 runfile has a driver (352.39, I believe) in it. So installing 352.79 driver followed by the cuda 7.5.18 installer is not sensible, unless you decline the driver install in the cuda package. If you didn’t decline the driver install, then the driver bundled with the cuda 7.5.18 package probably installed the opengl files that you were trying to avoid installing.

While using cuda 7.5.18 installer I did decline installation of opengl files and installed rest of it. Atleast for now I just need a clean way to completely uninstall all of the NVIDIA drivers and then reinstall them.

To uninstall the NVIDIA Driver, run nvidia-uninstall: $ sudo /usr/bin/nvidia-uninstall

Read more at: