4

I am attempting to install CUDA 8.0 within Ubuntu 16.04 for the Nvidia GeForce GTX 1080. I had CUDA 7.5 installed, but it did not appear to be compatible with the GTX 1080. I downloaded the .run installer from Nvidia's developer page, but the installation fails and outputs the following to a nvidia-installer.log

   An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in

   your kernel.  This may be because it is in use (for example, by an X

   server, a CUDA program, or the NVIDIA Persistence Daemon), but this

   may also happen if your kernel was configured without support for

   module unloading.  Please be sure to exit any programs that may be

   using the GPU(s) before attempting to upgrade your driver.  If no

   GPU-based programs are running, you know that your kernel supports

   module unloading, and you still receive this message, then an error

   may have occured that has corrupted an NVIDIA kernel module's usage

   count, for which the simplest remedy is to reboot your computer.

I have rebooted the computer, but that did not resolve the problem. How do I unload the 'nvidia-drm' module so that I can install the 8.0 CUDA?

8

From reading your log, it appears you are attempting to install your Cuda driver whilst your start X is running and thus using your gpu.

You need to stop it from using your GPU first:

  • Remove the current drivers: sudo apt-get purge nvidia-cuda*

  • (optional) - If you want to install the drivers too, then run: sudo apt-get purge nvidia-*

  • Logout from your GUI(Your not logging out is the reason you are getting the error message). To logout, press ctrl + alt + F2.

  • Stop lightdm: sudo service lightdm stop

  • Now you can go ahead and install the drivers, in your case you will have to run something like: sudo sh cuda_8.0.18_linux.run (replace cuda_8.0.18_linux.run with your .run file's name).

  • NB: You need to make sure that you select/agree the option to create a symbolic link.

  • when the installation finishes, reboot your machine: sudo reboot

  • 2
    I can't logout pressing Ctrl.+Alt.+F2. It doesn't do anything. – VansFannel Dec 14 '17 at 20:34
  • You may need to do apt-get auto-remove when suggested – Saravanabalagi Ramachandran Nov 26 '18 at 16:01
2

I had a similar issue. Turns out there was an Xorg process running on the GPU which I discovered using nvidia-smi. After killing this process, things installed fine.

0

To see who are using nvidia: sudo lsof | grep nvidia
then stop services or processes using nvidia

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.