NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。当笔记本电脑上有 2 个 gpu 时

NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。当笔记本电脑上有 2 个 gpu 时

我正在尝试为我的联想 Legion 笔记本安装 nvidia 驱动程序。我的 GPU 是 NVIDIA GeForce RTX3060,最后一个驱动程序是 470。因此,我尝试了不同的方法来安装驱动程序,从 NVIDIA 官方网站下载驱动程序 (.run),从软件和更新下载,从终端安装。但是当尝试时:

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.

我认为问题在于我的笔记本电脑中有 2 个 GPU。我运行:

sudo lspci -nnk | grep -iA3 vga

结果是:

00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:9a60] (rev 01)
    Subsystem: Lenovo Device [17aa:3f80]
    Kernel modules: i915
00:04.0 Signal processing controller [1180]: Intel Corporation Device [8086:9a03] (rev 05)
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:2560] (rev a1)
    Subsystem: Lenovo Device [17aa:3f80]
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:228e] (rev a1)

另一件事是,当我重新启动 Ubuntu (18.04) 时,它无法启动。出现以下消息:

/dev/nvme0n1p6: clean, 552599/6111232 files, 7119295/24414464 blocks

然后我按 Ctrl + Shift + F3:

sudo prime-select intel

之后笔记本启动了。启动后,我将主 gpu 更改为 nvidia:

sudo prime-select nvidia

尝试时错误相同nvidia-smi 所以问题是如何处理 PC 上的 2 个 GPU 的驱动程序?

答案1

问题出在内核版本上,内核是 5.4,但应该是 5.10 及以上版本。因此应该升级内核。

相关内容