CUDA 安装在 ubuntu 18.04 中移除了 Nvidia 驱动程序

CUDA 安装在 ubuntu 18.04 中移除了 Nvidia 驱动程序

安装 CUDA 11 后,它删除了我的 Nvidia 驱动程序。

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

$nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0

$uname -r
5.4.0-47-generic

它不允许我从软件和更新中心选择 Nvidia。这是为什么? png

我应该手动安装 Nvidia 驱动程序吗?因为之前我手动安装 Nvidia 驱动程序后出现了黑屏问题。我需要你的建议。我该怎么办?

看起来,CUDA 11 与 不兼容Nvidia 340.108,这就是为什么当我安装 CUDA 时,它会安装nvidia-driver-450并删除nvidia 340.108

Tue Sep 22 11:52:40 2020       
+------------------------------------------------------+                       
| NVIDIA-SMI 340.108    Driver Version: 340.108        |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 820M        Off  | 0000:03:00.0     N/A |                  N/A |
| N/A   49C    P0    N/A /  N/A |    212MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+

哪个 Cuda 工具包与上述驱动程序兼容?

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0 ==
modalias : pci:v000010DEd00001140sv000017AAsd0000380Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
driver   : nvidia-driver-450 - distro non-free recommended
driver   : nvidia-340 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

安装后nvidia-driver-450

dmesg |grep -i nvidia
[   17.274190] nvidia: loading out-of-tree module taints kernel.
[   17.274202] nvidia: module license 'NVIDIA' taints kernel.
[   17.283429] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[   17.292951] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
[   17.293403] NVRM: The NVIDIA GeForce GT 820M GPU installed in this system is
               NVRM:  supported through the NVIDIA 390.xx Legacy drivers. Please
               NVRM:  visit http://www.nvidia.com/object/unix.html for more
               NVRM:  information.  The 450.66 NVIDIA driver will ignore
[   17.293404] NVRM: No NVIDIA graphics adapter found!
[   17.293527] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237
[   17.372253] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
[   17.372708] NVRM: The NVIDIA GeForce GT 820M GPU installed in this system is
               NVRM:  supported through the NVIDIA 390.xx Legacy drivers. Please
               NVRM:  visit http://www.nvidia.com/object/unix.html for more
               NVRM:  information.  The 450.66 NVIDIA driver will ignore
[   17.372710] NVRM: No NVIDIA graphics adapter found!
[   17.372844] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237
[   43.172017] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
[   43.173631] NVRM: The NVIDIA GeForce GT 820M GPU installed in this system is
               NVRM:  supported through the NVIDIA 390.xx Legacy drivers. Please
               NVRM:  visit http://www.nvidia.com/object/unix.html for more
               NVRM:  information.  The 450.66 NVIDIA driver will ignore
[   43.173633] NVRM: No NVIDIA graphics adapter found!
[   43.173822] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237
pranto@pranto-Lenovo-Z40-70:~$ lsmod | grep nvidia

相关内容