This question already has an answer here:

I have an Ubuntu 17.10 64 bit with the default kernel.

I have update it right now and my NVIDIA Driver version is 384.90.

I want to use CUDA 9.1 but it needs NVIDIA Driver version r387. Doing this:

sudo ./cuda_9.1.85_387.26_linux.run -silent -driver

I can install that driver. But I get the following error:

ERROR: 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 move it to text mode running the command sudo init 4 but I get the same error.

I have the default kernel and maybe it doesn't support module unloading.

How can I know if kernel supports module unloading? or How can I enable it?

marked as duplicate by David Foerster, Fabby, Eric Carvalho, Ravan, George Udosen Dec 19 '17 at 19:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you use the CUDA 9.0, because that runs with the 384 driver? – ubfan1 Dec 14 '17 at 18:41
  • Are you trying to update your Nvidia Cuda driver a) out of your system package manager an b) while / after you had it loaded already (i.e. by running your graphic session with the Nvidia driver)? if so, possibly already asked and answered here: askubuntu.com/questions/830916/… – tuk0z Dec 14 '17 at 19:43
  • @ubfan1 I want to use CUDA 9.1. And I don't know where to download CUDA 9.0. – VansFannel Dec 14 '17 at 20:31
  • @tuk0z I think I can do it if I switch to runlevel 4 but I'm not sure if X server is stopped or not. – VansFannel Dec 14 '17 at 20:32
  • @DavidFoerster I don't think so. I have followed the answer and I can't logout from the GUI using Crtl.+Alt.+F2. – VansFannel Dec 14 '17 at 20:33

Easiest way to install nVidia 387.34

You are asking many different things in one question. You are also proposing different techniques and problems with them. I'll focus on the title of your question as others might be interested.

The easiest way to upgrade from nVidia 384.98 to 387.34 is to go to System Settings -> Software & Updates -> Additional Drivers and this screen appears

nVidia 387 install

Check the option for 387.34 and the current option for 384.98 will be unchecked automatically. Then save your changes and reboot.

Note: If you've manually installed nVidia bits and pieces you can run into complications requiring manual purges of older versions, etc. In that case check the Q&A database here for solutions. If a solution isn't found then post a new question.

  • Thanks but that screen doesn't appear on my PC. It only appears the first two options you show in your screenshot. – VansFannel Dec 15 '17 at 15:08
  • @VansFannel I think that happens when you manually setup nVidia ppa and install from there. IIRC the solution is to totally wipe the nVidia manual installation and then Ubuntu provides the option for automatic installation. – WinEunuuchs2Unix Dec 15 '17 at 22:41

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