1

I tried to install CUDA on Ubuntu but got errors.

I follow official guide for installation. And actually I succeed on my own mac. But on ubuntu 18.04 machine, when I tried to test those samples, it showed that no CUDA-capable device detected, but actually there is an nvidia GPU, GTX470. Also, "nvidia-smi" command doesn't work, saying can't find the CUDA driver, but actually, if we run apt-get install cuda driver, it showed that cuda driver is already installed. You may check the error image:

Error message

slava
  • 3,887
  • 1
    Don't use the Wayland login option, it switches the display to the integrated graphics. Even running Wayland, the non-graphics CUDA samples should still run. – ubfan1 Dec 06 '18 at 21:09
  • I agree with @ubfan1 above and make sure you are logging in using the XOrg option. Your graphics card is listed at using the 396.18 driver. If you follow the answer https://askubuntu.com/a/1086993/231142 but download CUDA 10 from here you should be able to step through and set it up correctly. I can try to write an answer later if that helps. – Terrance Dec 06 '18 at 21:45

1 Answers1

2

Use the installation guide provided here by eromod. This worked for me on 18.04 on different computers, other than the official version.

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt update

sudo ubuntu-drivers autoinstall

reboot

sudo apt install nvidia-cuda-toolkit gcc-6

nvcc --version