Reputation: 75
I'm trying to install CUDA 9.2 on Ubuntu 18.04, following this website:
I've downloaded the NVIDIA CUDA Toolkit, (the shell script cuda_9.2.88_396.26_linux), but when I run it ($sudo sh cuda_9.2.88_396.26_linux), this is what I get :
Installing the NVIDIA display driver...
A system reboot is required to continue installation. Please reboot then run the installer again.
An attmept has been made to disable Nouveau.
If this message persists after reboot, please see the display driver log file at /var/log/nvidia-installer.log for more information.
So, I reboot and I run again the shell script ($sudo sh cuda_9.2.88_396.26_linux), and I got the same message. This is what the nvidia-installer.log says:
ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your system since these files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
-> For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for you? (Answer: Yes)
-> One or more modprobe configuration files to disable Nouveau have been written. For some distributions, this may be sufficient to disable Nouveau; other distributions may require modification of the initial ramdisk. Please reboot your system and attempt NVIDIA driver installation again. Note if you later wish to reenable Nouveau, you will need to delete these files: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I've already installer my nvidia drivers.
Upvotes: 3
Views: 4936
Reputation: 644
First, I would follow the official guide including pre-installation instructions. Read through every line, you'll save yourself time if you're thorough from the beginning.
"The lazy man works twice"
Second: Here are the instructions for disabling Nouveau in Ubuntu if you're following the Runfile installation.
Check if the Nouveau drivers are loaded. The Nouveau drivers are loaded if the following command prints anything
$ lsmod | grep nouveau
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
Regenerate the kernel initramfs:
$ sudo update-initramfs -u
Be sure to go all the way through the post-installation actions when you're done.
Finally: Make sure the version of Ubuntu you're using is listed as supported by the version of CUDA you're trying to install !!!! When I first installed, I assumed the latest version of everything would be the best, but the latest version of CUDA doesn't necessarily run on the latest version of Ubuntu. Some more advanced users can make it work, but I can't guide you there. Check the supported versions for CUDA toolkit and cuDNN (if you're using it).
Good luck. Installing cuda can be a bit of a pain, its necessary to not skim through any of the installation steps. There are also some helpful videos on youtube that may be useful if you get stuck.
Upvotes: 3