2

Ubuntu 18.04 with 4.18.0-15-generic.

I've been following along https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-together-with-9-2-on-Ubuntu-18-04-with-support-for-NVIDIA-20XX-Turing-GPUs-1236/

After a bunch of issues and using lightdm, I was finally able to get a running system with CUDA and nvidia-smi... using the runfile. I did a sudo nvidia-uninstall and re-installed CUDA from the .deb in order to get prime-select. But then nvidia-smi fails with Failed to initialize NVML: Driver/library version mismatch?

$ dpkg -l | grep nvidia
ii  libnvidia-cfg1-418:amd64                        418.67-0ubuntu1                              amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-418                            418.67-0ubuntu1                              all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-418:amd64                     418.67-0ubuntu1                              amd64        NVIDIA libcompute package
ii  libnvidia-decode-418:amd64                      418.67-0ubuntu1                              amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-418:amd64                      418.67-0ubuntu1                              amd64        NVENC Video Encoding runtime library
ii  libnvidia-fbc1-418:amd64                        418.67-0ubuntu1                              amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-418:amd64                          418.67-0ubuntu1                              amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-418:amd64                        418.67-0ubuntu1                              amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-418                        418.67-0ubuntu1                              amd64        NVIDIA compute utilities
ii  nvidia-dkms-418                                 418.67-0ubuntu1                              amd64        NVIDIA DKMS package
ii  nvidia-driver-418                               418.67-0ubuntu1                              amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-418                        418.67-0ubuntu1                              amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-418                        418.67-0ubuntu1                              amd64        NVIDIA kernel source package
ii  nvidia-modprobe                                 418.67-0ubuntu1                              amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-prime                                    0.8.8.2                                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                 418.67-0ubuntu1                              amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-418                                418.67-0ubuntu1                              amd64        NVIDIA driver support binaries
ii  xserver-xorg-video-nvidia-418                   418.67-0ubuntu1                              amd64        NVIDIA binary Xorg driver

1 Answer 1

0

I'm not sure where this started working but!

  1. sudo prime-select nvidia and switch to nvidia graphics

If this doesn't work and you've used the runfile to install CUDA before, what I actually did was:

  1. Uninstall CUDA and all drivers with apt-get purge nvidia-* and something similar for cuda- I think. There might have been a random libcuda or something, I forget the name, sorry. Also go to /usr/local/cuda and try to find an uninstaller because there should be files left over, and run that script.

  2. Install CUDA from runfile again.

  3. Uninstall using nvidia-uninstall or whatever uninstall command it's supposed to be. Should be on PATH. Go through instructions and remove everything.

  4. Install CUDA from .deb. And do not update cuda or nvidia or whatever.

  5. Install prime-select, do step 0 and you should be okay.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .