I have downloaded and installed CUDA several times, and every time it fails to pass the test samples deviceQuery and checkBandwidth. Also tensorflow is never listing the GPU between accessible devices, only the CPU.

My current nvidia driver is 384.111, where as the upgraded version 384.130 always generates a library mismatch on nvidia-smi and makes ubuntu unbootable.

Every time I try to install CUDA 9.0 with the .run file, which is the only way to install it without upgrading the nvidia drivers, it finishes with an "incomplete install message.". Runs on the tests are always negative, with the following output:

enter image description here

Installing CUDA 9.0 .deb with dpkg from the nvidia website https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1710&target_type=deblocal it also upgrades the nvidia driver.

How can I install CUDA 9.0 for Ubuntu 17.10, with nvidia 384.111 without upgrading to 384.130, so that it correctly performs on the sample tests and allows tensorflow-gpu to access the graphic-card?

PS: Whenever I say "it fails", the error message is always "UNKNOWN ERROR"

The graphics card in my system is a NVIDIA GeForce GTX 1080

  • 1
    CUDA 9.2 which is the most recent installs the 396.26 drivers automatically. You might need to test and see if those drivers will work for you. See: developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/… for all the files. – Terrance May 31 '18 at 22:49
  • After installing CUDA 9.2 it installs 396.26, but nvidia-smi outputs Failed to initialize NVML: Driver/library version mismatch. Do I really need to reboot the computer? Because whenever I do and it fails, its a nightmare to reset to the old drivers back... – hirschme May 31 '18 at 22:56
  • Have you tried setting the nomodeset for the kernel line in grub? See askubuntu.com/a/747429/231142 as it is only needed for the installation of the NVIDIA drivers and looks like it can be removed after the installation is completed. – Terrance May 31 '18 at 23:00
  • I also just updated this answer for the installation of CUDA 9.2 in Ubuntu 17.10 askubuntu.com/a/1025949/231142 – Terrance May 31 '18 at 23:01
  • 1
    I am out of ideas. You have not done the nomodeset for your kernel for installing the NVIDIA drivers. So, without doing that we cannot test if any new driver will work with your system. I don't run non-LTS releases of Ubuntu so I have never had to run a nomodeset on my kernel to install the driver. But, that could also be because I don't run UEFI either on my system. Maybe try this installation. ubuntuforums.org/showthread.php?t=1613132 – Terrance Jun 1 '18 at 1:27

I too have gone thru similar struggles. After trying to install CUDA 9.0, 9.1, 9.2 I found each toolkit requires a specific Nvidia driver version.

The official Nvidia CUDA installation guide calls for you to uninstall your Nvidia drivers. I think it's unavoidable if you want to do a local machine install unless you use Docker + Nvidia Docker.

This will allow your local machine to keep the same Nvidia drivers, and you install your specific CUDA toolkit in different container images.

This is the approach I went with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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