我最近从 Windows 迁移到了 Ubuntu 20.04,我很喜欢它!但是在安装 Nvidia 驱动程序时我遇到了一个问题。我尝试使用软件和更新 GUI 进行安装,并使用命令行按顺序编写以下内容:
$ ubuntu-drivers devices
我从列表中选择了推荐的一个
$ sudo apt install nvidia-driver-495
并重新启动系统,但是当我输入以下命令时:
$ 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.
我必须再说一条信息。这是在安装 Steam 后发生的,我必须安装以下内容才能使其正常工作:
$ sudo apt-get install libnvidia-gl-440:i386 [reference][1]
但即使卸载了所有 nvidi 驱动程序
$ sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')\
按照我上面提到的方法重新安装后,我仍然遇到无法找到 Nvidia 驱动程序的问题
编辑: 当我打印以下命令时,似乎有多个版本:
$ dpkg -l | grep nvidia
rc libnvidia-compute-455:amd64 455.45.01-0ubuntu1 amd64 NVIDIA libcompute package
rc libnvidia-compute-460:amd64 460.106.00-0ubuntu1 amd64 NVIDIA libcompute package
rc libnvidia-compute-465:amd64 465.19.01-0ubuntu1 amd64 NVIDIA libcompute package
rc libnvidia-compute-470:amd64 470.82.00-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-495:amd64 495.29.05-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-ml-dev 10.1.243-3 amd64 NVIDIA Management Library (NVML) development files
rc linux-modules-nvidia-470-5.11.0-27-generic 5.11.0-27.29~20.04.1 amd64 Linux kernel nvidia modules for version 5.11.0-27
rc linux-objects-nvidia-470-5.11.0-40-generic 5.11.0-40.44~20.04.2+1 amd64 Linux kernel nvidia modules for version 5.11.0-40 (objects)
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-profiler 10.1.243-3 amd64 NVIDIA Profiler for CUDA and OpenCL
ii nvidia-utils-495 495.29.05-0ubuntu1 amd64 NVIDIA driver support binaries
ii nvidia-visual-profiler 10.1.243-3 amd64 NVIDIA Visual Profiler for CUDA and OpenCL
我之前尝试的命令无法删除这些内容,如果这实际上是问题的根源,我该如何手动删除它们?
编辑 这是我打开附加驱动程序时看到的内容,我可以手动删除所有 nvidia 软件包,仅保留 nvidia-driver-495