尽管有 CUDA 兼容 GPU、Ubuntu 版本和最新的 Nvdia 驱动程序,但无法让 GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 与 NVIDIA 驱动程序通信

尽管有 CUDA 兼容 GPU、Ubuntu 版本和最新的 Nvdia 驱动程序,但无法让 GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 与 NVIDIA 驱动程序通信

我有一台配备以下 GPU 的 GP66 Leopard:

anto@anto-GP66-Leopard-11UH:~$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)

根据NVDIA 文档

我的ubuntu版本支持CUDA开发工具:

anto@anto-GP66-Leopard-11UH:~$ uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

我不知道我是否有正确的标题和开发包:

anto@anto-GP66-Leopard-11UH:~$ uname -r
5.11.0-40-generic

但我安装了最新的 Nvidia 驱动程序:

anto@anto-GP66-Leopard-11UH:~$ apt list --installed 'nvidia*'
Listing... Done
nvidia-container-toolkit/now 1.6.0-1 amd64 [installed,local]
nvidia-docker2/now 2.7.0-1 all [installed,local]
nvidia-utils-460-server/focal-updates,now 460.106.00-0ubuntu0.20.04.1 amd64 [installed]

但当我验证安装时

anto@anto-GP66-Leopard-11UH:~$ 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.

那么,如何让 GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 与 NVIDIA 驱动程序通信

N0rbert 的更新

anto@anto-GP66-Leopard-11UH:~$ dpkg -l | grep -i nvidia
ii  libnvidia-cfg1-460-server:amd64            460.106.00-0ubuntu0.20.04.1           amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-compute-460-server:amd64         460.106.00-0ubuntu0.20.04.1           amd64        NVIDIA libcompute package
ii  libnvidia-container-tools                  1.6.0-1                               amd64        NVIDIA container runtime library (command-line tools)
ii  libnvidia-container1:amd64                 1.6.0-1                               amd64        NVIDIA container runtime library
ii  nvidia-container-toolkit                   1.6.0-1                               amd64        NVIDIA container runtime hook
ii  nvidia-docker2                             2.7.0-1                               all          nvidia-docker CLI wrapper
ii  nvidia-utils-460-server                    460.106.00-0ubuntu0.20.04.1           amd64        NVIDIA Server Driver support binaries
ii  xserver-xorg-video-nvidia-460-server       460.106.00-0ubuntu0.20.04.1           amd64        NVIDIA binary Xorg driver
anto@anto-GP66-Leopard-11UH:~$ lspci -k | grep -i nvidia -A3
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 12fb
    Kernel driver in use: nouveau
    Kernel modules: nvidiafb, nouveau
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 12fb
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
anto@anto-GP66-Leopard-11UH:~$ 
anto@anto-GP66-Leopard-11UH:~$ sudo ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-dkms-460-server : Depends: nvidia-kernel-common-460-server (<= 460.106.00-1) but it is not installable
                          Depends: nvidia-kernel-common-460-server (>= 460.106.00) but it is not installable
 nvidia-driver-460-server : Depends: nvidia-kernel-common-460-server (<= 460.106.00-1) but it is not installable
                            Depends: nvidia-kernel-common-460-server (>= 460.106.00) but it is not installable
                            Recommends: nvidia-settings but it is not going to be installed
                            Recommends: nvidia-prime (>= 0.8) but it is not going to be installed
                            Recommends: libnvidia-compute-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
                            Recommends: libnvidia-decode-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
                            Recommends: libnvidia-encode-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
                            Recommends: libnvidia-ifr1-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
                            Recommends: libnvidia-fbc1-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
                            Recommends: libnvidia-gl-460-server:i386 (= 460.106.00-0ubuntu0.20.04.1)
E: Unable to correct problems, you have held broken packages.

答案1

实际上,您没有安装正确的专有 Nvidia 驱动程序。
正在使用的驱动程序显示在lspci -k输出中 -“正在使用的内核驱动程序:nouveau”

首次运行sudo apt-get update时,您可以使用以下方法之一:

  • 使用nvidia-drivers工具自动安装

    sudo ubuntu-drivers autoinstall
    
  • 使用 GUI 安装驱动程序 - 启动软件和更新(software-properties-gtk)并从安装 Nvidia 驱动程序附加驱动程序标签

  • 使用强力手段安装最新的 470 :)

    sudo apt-get install nvidia*470 cuda*470 nvidia-cuda-toolkit
    

然后重新启动。


请注意,apt search nvidia-driver将显示搜索结果列表,而不仅仅是已安装的软件包(已安装的软件包标记为... now ... [installed],但很难找到)。
要获取已安装软件包的列表,您必须使用apt list --installed 'nvidia*'dpkg -l | grep -i nvidia

相关内容