我目前正在尝试在 Ubuntu 22.04 5.19.0-41-generic RTX 3080 上设置 nvidia 驱动程序
我在安装 NVidia 驱动程序时遇到了困难(可能每个 Linux 用户都遇到过这种情况)
首先,我删除了所有以前的 nvidia 软件包,并安装了nvidia-driver-470
$ dkms status
nvidia/470.182.03, 5.19.0-41-generic, x86_64: installed
r8168/8.049.02, 5.15.0-71-generic, x86_64: installed
r8168/8.049.02, 5.19.0-40-generic, x86_64: installed
r8168/8.049.02, 5.19.0-41-generic, x86_64: installed
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] (rev a1)
$ 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.
$ dpkg -l | grep nvidia-driver
ii nvidia-driver-470 470.182.03-0ubuntu0.22.04.1 amd64 NVIDIA driver metapackage
我也尝试过nvidia-driver-525, nvidia-driver-530, nvidia-driver-530-open
,行为是一样的。
有人知道这是什么问题吗?
答案1
就我的情况而言,启动的内核不是内核,dkms 构建了模块,因此查看“uname -r”后会显示 oem 内核。在这种情况下,我需要启动到正确的内核(提示 grub_default),然后卸载 oem 内核。此后,nvidia-smi 就可以正常工作了。