Ubuntu 20.04 上的 Nvidia-smi

Ubuntu 20.04 上的 Nvidia-smi

我正在安装ubuntu 20.04 on asus tfu a15.。我已经安装了 cuda 工具包和驱动程序,但 nvidia-smi 仍然不起作用NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。请确保已安装并运行最新的 NVIDIA 驱动程序。

我认为问题出在安装了多个驱动程序版本。以下是dpkg -l | grep nvidia

rc  libnvidia-compute-390:amd64                390.138-0ubuntu0.20.04.1              amd64        NVIDIA libcompute package
rc  libnvidia-compute-390:i386                 390.138-0ubuntu0.20.04.1              i386         NVIDIA libcompute package
rc  libnvidia-compute-435:amd64                435.21-0ubuntu7                       amd64        NVIDIA libcompute package
ii  libnvidia-compute-440:amd64                440.100-0ubuntu0.20.04.1              amd64        NVIDIA libcompute package
ii  libnvidia-ml-dev                           10.1.243-3                            amd64        NVIDIA Management Library (NVML) development files
ii  nvidia-cuda-dev                            10.1.243-3                            amd64        NVIDIA CUDA development files
ii  nvidia-cuda-doc                            10.1.243-3                            all          NVIDIA CUDA and OpenCL documentation
ii  nvidia-cuda-gdb                            10.1.243-3                            amd64        NVIDIA CUDA Debugger (GDB)
ii  nvidia-cuda-toolkit                        10.1.243-3                            amd64        NVIDIA CUDA development toolkit
ii  nvidia-opencl-dev:amd64                    10.1.243-3                            amd64        NVIDIA OpenCL development files
ii  nvidia-prime                               0.8.14                                all          Tools to enable NVIDIA's Prime
ii  nvidia-profiler                            10.1.243-3                            amd64        NVIDIA Profiler for CUDA and OpenCL
ii  nvidia-utils-440                           440.100-0ubuntu0.20.04.1              amd64        NVIDIA driver support binaries
ii  nvidia-visual-profiler                     10.1.243-3                            amd64        NVIDIA Visual Profiler for CUDA and OpenCL

如何删除所有驱动程序并仅保留 440?

我尝试过sudo apt autoremove但没有删除任何包。

最后,我手动删除了它们并得到了以下列表:

ii  libnvidia-compute-440:amd64                440.100-0ubuntu0.20.04.1              amd64        NVIDIA libcompute package
ii  libnvidia-ml-dev                           10.1.243-3                            amd64        NVIDIA Management Library (NVML) development files
ii  nvidia-cuda-dev                            10.1.243-3                            amd64        NVIDIA CUDA development files
ii  nvidia-cuda-doc                            10.1.243-3                            all          NVIDIA CUDA and OpenCL documentation
ii  nvidia-cuda-gdb                            10.1.243-3                            amd64        NVIDIA CUDA Debugger (GDB)
ii  nvidia-cuda-toolkit                        10.1.243-3                            amd64        NVIDIA CUDA development toolkit
ii  nvidia-opencl-dev:amd64                    10.1.243-3                            amd64        NVIDIA OpenCL development files
ii  nvidia-prime                               0.8.14                                all          Tools to enable NVIDIA's Prime
ii  nvidia-profiler                            10.1.243-3                            amd64        NVIDIA Profiler for CUDA and OpenCL
ii  nvidia-utils-440                           440.100-0ubuntu0.20.04.1              amd64        NVIDIA driver support binaries
ii  nvidia-visual-profiler                     10.1.243-3                            amd64        NVIDIA Visual Profiler for CUDA and OpenCL

nvidia-smi仍然不起作用

答案1

除非你删除一些 dpkg -l 输出,否则你肯定会缺少一些 nvidia 软件包。在我的 Ubuntu 20.04 上,使用 CUDA 10.1,我有:

    ii  libnvidia-cfg1-440:amd64                           440.100-0ubuntu0.20.04.1            amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-440                               440.100-0ubuntu0.20.04.1            all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-440:amd64                        440.100-0ubuntu0.20.04.1            amd64        NVIDIA libcompute package
ii  libnvidia-decode-440:amd64                         440.100-0ubuntu0.20.04.1            amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-440:amd64                         440.100-0ubuntu0.20.04.1            amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-440:amd64                          440.100-0ubuntu0.20.04.1            amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-440:amd64                           440.100-0ubuntu0.20.04.1            amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-440:i386                            440.100-0ubuntu0.20.04.1            i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-440:amd64                             440.100-0ubuntu0.20.04.1            amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-440:i386                              440.100-0ubuntu0.20.04.1            i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-440:amd64                           440.100-0ubuntu0.20.04.1            amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ml-dev                                   10.1.243-3                          amd64        NVIDIA Management Library (NVML) development files
ii  nvidia-compute-utils-440                           440.100-0ubuntu0.20.04.1            amd64        NVIDIA compute utilities
ii  nvidia-cuda-dev                                    10.1.243-3                          amd64        NVIDIA CUDA development files
ii  nvidia-dkms-440                                    440.100-0ubuntu0.20.04.1            amd64        NVIDIA DKMS package
ii  nvidia-driver-440                                  440.100-0ubuntu0.20.04.1            amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-440                           440.100-0ubuntu0.20.04.1            amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-440                           440.100-0ubuntu0.20.04.1            amd64        NVIDIA kernel source package
ii  nvidia-prime                                       0.8.14                              all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                    440.64-0ubuntu1                     amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-440                                   440.100-0ubuntu0.20.04.1            amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                            0.18build1                          all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-440                      440.100-0ubuntu0.20.04.1            amd64        NVIDIA binary Xorg driver

相关内容