Driver not working after installing CUDA 7

I recently installed CUDA 7.0 using the run file on Ubuntu 14.04. However, when I run the sample files, I get

modprobe: ERROR: could not insert ‘nvidia_331_uvm’: Invalid argument

I assume this is because the latest driver (346.46) is installed with CUDA 7. However, if I install the 331 driver, it is not compatible with the latest version of CUDA it seems.

Any help would be appreciated.


From log seems like you are using nvidia_331_uvm old module with latest driver 346.46. please completely clear/uninstall old driver and its components from your system and then test. Also make sure to run latest cuda samples with latest cuda sdk and latest cuda driver.

If issue still exist, Please reproduce the issue and provide nvidia-bug-report by running script as root user. The will collect information about your system and create the file ‘nvidia-bug-report.log.gz’ in the current directory.

I’m using the run installer and I don’t seem to have any files called Also, I used apt-get --purge remove nvidia-331-uvm, but the same error persists.

Sandipt’s suggestion is totally correct. I have figured it out by following a few steps. I met the same problem like you.

first of all. you need to uninstall all nVidia drivers, especially the culprit nvidia-331-uvm. 1) uninstall both cuda and nvidia driver by :
1)To uninstall the CUDA Toolkit, run the uninstallation script provided in the bin directory of the toolkit. By default, it is located in /usr/local/cuda-7.0/bin:

$ sudo /usr/local/cuda-7.0/bin/

2)To uninstall the NVIDIA Driver, run nvidia-uninstall:

$ sudo /usr/bin/nvidia-uninstall

  1. be sure to use apt-get to remove all nvidia-*
    sudo apt-get remove --purge nvidia-*

in step 3) because all your drivers have been removed, you might need a default driver for your X. refer to this thread for. You’d better confirm if it’s successfully removed by sudo find it from /.

during the uninstall of nvidia driver, you might need to consider of disable of nouveau, which is also the requirement of CUDA installation.

Be sure all the above jobs are done in text mode, including the reinstall of CUDA. refer to this blog on how to enter text mode, which is quite helpful.

don’t forget to update your grub by ‘sudo update-grub’

After all these jobs done, I believe you will have no any problem of CUDA, of course, those two environment variables and LD_LIBRARY_PATH need to be set up correctly.

then you can go to the folder where you deposit the 7.0 CUDA tools kits, it will also install the nvidia driver together. you can test the deviceQuery in text mode without reboot if you have pre-compiled them.

reinstall grub and update grub will get you back to X.

enjoy it.