Problem installing cuda 9.1 on Ubuntu 16.04

I recently installed cuda 9.1 on my PC with GTX 1080 Ti and running Ubuntu 16.04

Upon installation, when i ran deviceQuery I’m encountering following error:

./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
→ CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

I tried to find the driver version and the runtime version separately.
I got:
CUDA Driver Version / Runtime Version 9.0 / 0.0

nvidi-smi shows the following:

±----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 108… Off | 00000000:01:00.0 Off | N/A |
| 20% 42C P8 14W / 250W | 385MiB / 11172MiB | 5% Default |
±------------------------------±---------------------±---------------------+

nvcc -V shows the following:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

Kindly assist me on how to proceed. Do let me know if any further information is required.

The problem appears to be that CUDA 9.1 requires the NVIDIA 387.26 driver. This is unfortunate for me because I have to use bumblebee on my NVIDIA Optimus laptop and the latest driver in that repo is 384.98. When installing from the CUDA repo I got these messages:

Error:
Problem: problem with installed package bumblebee-nvidia-384.98-1.fc27.x86_64

  • package bumblebee-nvidia-384.98-1.fc27.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-2:387.26-1.fc25.x86_64
  • package bumblebee-nvidia-375.66-1.fc27.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-2:387.26-1.fc25.x86_64
  • package bumblebee-nvidia-384.59-1.fc27.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-2:387.26-1.fc25.x86_64
  • package bumblebee-nvidia-384.69-1.fc27.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-2:387.26-1.fc25.x86_64
  • package bumblebee-nvidia-384.90-1.fc27.x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-2:387.26-1.fc25.x86_64
  • package cuda-drivers-387.26-1.x86_64 requires xorg-x11-drv-nvidia >= 2:387.26, but none of the providers can be installed
  • package cuda-runtime-9-1-9.1.85-1.x86_64 requires nvidia-drivers >= 387.26, but none of the providers can be installed
  • package cuda-9-1-9.1.85-1.x86_64 requires cuda-runtime-9-1 >= 9.1.85, but none of the providers can be installed
  • package cuda-9.1.85-1.x86_64 requires cuda-9-1 >= 9.1.85, but none of the providers can be installed
  • conflicting requests
    (try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–skip-broken’ to skip uninstallable packages)

You can download the driver directly from NVidia, but I had to search for drivers for a newer card than mine (I just searched for NVidia Titan V drivers at www.geforce.com ). It does list my card(s) as supported devices, but the driver does not show up if I select my card(s).

I don’t use Ubuntu, but there does seem to be a version for Ubuntu 16.04. I have no idea how hard it will be to install.

Meanwhile, I need to see about using the unmanaged bumblebee repo for Fedora to try to install the proper driver.

Hope this helps.

Yes, CUDA 9.1 requires a r387 driver.

follow the instructions in the linux install guide. Get your installers from:

[url]http://www.nvidia.com/getcuda[/url]

An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries

Is what happens when I use the install guide
Tried apt-get approach, but it still shows:

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

exported PATH[again]:

export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
CUDA compilation tools, release 9.1, V9.1.85
nvidia-smi
Sun Dec 24 08:11:25 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 387.34                 Driver Version: 387.34