已安装 nvidia 驱动程序和 cuda 工具包,但 gpu 仍然不可用

已安装 nvidia 驱动程序和 cuda 工具包,但 gpu 仍然不可用

我在我的 Ubuntu 20.04 LTS 机器上安装了 Cuda 编译器和 Cuda 工具包。

$nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

$ sudo apt install nvidia-cuda-toolkit

Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-cuda-toolkit is already the newest version (10.1.243-3).
0 upgraded, 0 newly installed, 0 to remove and 273 not upgraded.

在此处输入图片描述

但当我尝试时:

$ 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.

答案1

假设已正确安装推荐的 Nvidia 驱动程序,并且只要 Ubuntu 是单一操作系统或与任何 Windows 10 或更早版本双启动,最简单的解决方案始终是在 UEFI 中禁用安全启动

相关内容