NVIDIA 驱动程序突然失败 (20.04 LTS)

ale*_*xwh 6 display nvidia xorg graphics 20.04

几个月前,我将笔记本电脑双启动到 Ubuntu 20.04 LTS。Ubuntu 安装默认为我安装了 NVIDIA 驱动程序,因此我可以无缝地使用 NVIDIA 驱动程序和经过 GPU 训练的模型。

一切都很好,直到几天前我在执行时突然出现以下错误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.
Run Code Online (Sandbox Code Playgroud)

从那以后,我无法正确打开我的 NVIDIA X Server GUI,如下所示: 在此处输入图片说明

它还带来了其他烦人的显示问题,例如:

  • 即使屏幕变黑,屏幕背光仍然亮着
  • 屏幕从挂起模式唤醒后无法恢复
  • 屏幕亮度无法调节

过去安装 Ubuntu 20.04 时,所有这些显示问题都没有发生。

检查软件和更新时,我发现驱动程序奇怪地回退到 Nouveau 显示驱动程序(如附件所示): 英伟达

我无法切换回上面列出的 NVIDIA 驱动程序。每当我尝试切换时,都会出现以下错误:

在此处输入图片说明

我对发生的事情感到非常沮丧。我没有做任何软件更新,以尽量减少搞乱NVIDIA驱动程序的风险,但它最终还是发生了......

最后,我将重新安装 Ubuntu,但在此之前我想寻找其他替代方案。如果您有可能的解决方案,真的很感激!

安装 nvidia-driver-450-server 时出错

sudo apt-get install nvidia-driver-450-server

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-driver-450-server : Depends: libnvidia-gl-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-compute-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-extra-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: nvidia-compute-utils-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-decode-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-encode-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: nvidia-utils-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: xserver-xorg-video-nvidia-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-cfg1-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-ifr1-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Depends: libnvidia-fbc1-450-server (= 450.51.06-0ubuntu0.20.04.2) but it is not going to be installed
                            Recommends: libnvidia-compute-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
                            Recommends: libnvidia-decode-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
                            Recommends: libnvidia-encode-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
                            Recommends: libnvidia-ifr1-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
                            Recommends: libnvidia-fbc1-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
                            Recommends: libnvidia-gl-450-server:i386 (= 450.51.06-0ubuntu0.20.04.2)
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

规格
笔记本电脑:Lenovo Legion Y740
操作系统:Ubuntu 20.04
内核:5.4.0-48-generic
GPU:RTX 2070 Max-Q

Nik*_*y R 6

作为临时解决方案,如果之前一切正常,请尝试引导以前的内核版本。就我而言,工作内核是 5.4.0-47(*-48 已损坏)。希望这是包依赖项的一些临时问题,很快就会解决。

更新:我已经修复了新内核版本 (5.4.0-48) 的问题aptitude install nvidia-driver-450。有很多关于一些冲突和删除 nvidia-*-440 软件包的警告,但最终安装了新版本并且新内核使用 nvidia 驱动程序启动,到目前为止一切看起来都很好。