Installation of NVIDIA driver for Quadro k5200 on Ubuntu 18.04

Hi there,

I have a Dell desktop machine with Quadro k5200 graphics card and I have installed Ubuntu 18.04 on this machine.
I want to install NVIDIA drivers on this machine before I install CUDA and cuDNN on this machine.

when I run nvidi-smi it complains that it is not able to communicate with the driver indicating it is not installed yet.
I have good and found commands like:

sudo apt-get install nvidia-352

or

sudo apt-get install nvidia-XXXX

in this link https://askubuntu.com/questions/1054954/how-to-install-nvidia-driver-in-ubuntu-18-04

but I am not sure what those numbers (XXXX) should be for this Quadro k5200?
Can you please help me with that?

Also can you provide the me the instruction how to install CUDA and cuDNN?

Thanks
Amin

start over with a clean install of ubuntu

get your cuda installers from http://www.nvidia.com/getcuda

follow the instructions in the CUDA linux install guide linked from the above page
for cudnn, google nvidia cudnn and download it from developer.nvidia.com, there are install instructions there as well

Hi Robert,

Thanks for your reply.
I think I need to install NVIDIA driver before installation of CUDA? Is it correct?
My issue is related to installation of driver for Quadro k5200.

when I run

$nvidia-smi

I get the error:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

I have tried to installed using

sudo apt-add-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-384

But it does not resolve the issue.
How can I resolve this ?

Thanks

CUDA installers include a bundled driver installer, which will work fine with your GPU.

You have not shown any indication that you have attempted to read and follow my instructions.

I won’t be able to help with ppa installs. ppa is not provided or managed by NVIDIA

Good Luck!

Hi Robert,

I followed your instructions.
First I reinstalled Ubuntu fresh from beginning.

I also followed the instruction for installation of CUDA for x86, Linux, Ubuntu
by downloading cuda:

wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run

Then installation :

sudo sh cuda_10.1.243_418.87.00_linux.run

it gave an error regarding gcc

Failed to verify gcc version. See log at /var/log/cuda-installer.log for details.

which I installed gcc using

sudo apt install gcc

The again I tried to install CUDA:

sudo sh cuda_10.1.243_418.87.00_linux.run

I again the error:

Installation failed. See log at /var/log/cuda-installer.log for details.

Here is the content of /var/log/cuda-installer.log:

[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc

[INFO]: gcc version: gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)

[INFO]: Initializing menu
[INFO]: Setup complete
[INFO]: Components to install:
[INFO]: Driver
[INFO]: 418.87.00
[INFO]: Executing NVIDIA-Linux-x86_64-418.87.00.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed.
[ERROR]: Install of 418.87.00 failed, quitting

I now fully followed your instructions.
Could you please advise how to resolve this?

Thanks
Could you please

Hi Robert,

I used the other option of installation of CUDA using deb file locally:

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
$ sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
$ wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
$ sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb 
$ sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pubsudo apt-get update 
$ sudo apt-get -y install cuda

The steps were done without any error.
Now how can I verify the installation.

I tried running nvidia-smi and I get the same error:

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Any thoughts? Thanks

It’s quite evident you didn’t do this:

Hi Robert

I definitely fully followed the instructions on the mentioned page:

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal

I do not know how to upload image here, otherwise, I would attach here for a reference.

Please have a look and give your thoughts.

Thanks

Hi Robert,

I have read the following link
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html which I think you are referring to.

It mentions about pre-installation actions:
which include
1-Verify You Have a CUDA-Capable GPU, I have already done it.

$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation GK110GL [Quadro K5200] (rev a1)
03:00.1 Audio device: NVIDIA Corporation GK110 HDMI Audio (rev a1)

2-determining supported version:

$ uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

4-Verify the System Has gcc Installed

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

5-Verify the System has the Correct Kernel Headers and Development Packages Installed

$ sudo apt-get install linux-headers-$(uname -r)
[sudo] password for amin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-4.15.0-29-generic is already the newest version (4.15.0-29.31).
0 to upgrade, 0 to newly install, 0 to remove and 537 not to upgrade.

For section of 2.5. Choose an Installation Method, I have chosen distribution specific using .deb

I have downloaded the CUDA:

~/NVIDIA_CUDA_installation$ ls
cuda_10.1.243_418.87.00_linux.run
cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb

Using Package Manager Installation, I have followed Ubuntu section:

1-Install repository meta-data
which suggests:

$ sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb

and I have done:

sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb

2-Installing the CUDA public GPG key
which suggests:

$ sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub

and I have done:

$ sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub

and then Update the Apt repository cache
which suggests and I have done

sudo apt-get update

and finally installation which suggests to do :

$ sudo apt-get install cuda

and I have done:

sudo apt-get -y install cuda

And the installation has finished successfully without error.

In section 7.2.3. Verify the Installation and subsection 7.2.3.1. Verify the Driver Version
it suggests:

$ cat /proc/driver/nvidia/version

but when I run I get error:

cat: /proc/driver/nvidia/version: No such file or directory

in fact nvidia folder has not been created in driver folder.

If I missed any step please let me know.
Your help is appreciated.

I am working for Gunnebo Entrance Control and this is for training some model to be used in Jetson Nano.
and we are going to use 16000 Jetson Nano a year depending on this.

Thanks
amin

As the provided answers in this thread did not resolve my issue, I searched and found an NVIDIA representative in Reading UK.

He advised me to use the instructions in this link:
https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/

which I followed the installation via Software Update GUI, pressing Settings button, Additional drivers tab and choose nvidia-driver-430 proprietry and tested and then pressed Apply changes. It successfully installed the driver.

I verfied the installation by running the command

$nvidia-smi

I then followed the instructions for CUDA and cuDNN and managed to install them successfully.
This proves the point that you DO need to install drivers before installing CUDA.