系统更新后外接显示器停止工作

系统更新后外接显示器停止工作

今天我打开笔记本电脑,Ubuntu 要求我下载一些更新。我接受了,安装后弹出一个窗口要求我重新启动系统。

系统重启后,我发现外接显示器不再工作。进入屏幕设置后,似乎只检测到主(笔记本电脑)显示器。

然后我开始检查一些待处理的更新:

$ sudo apt update
Hit:1 https://brave-browser-apt-release.s3.brave.com stable InRelease
Hit:2 http://ppa.launchpad.net/aslatter/ppa/ubuntu focal InRelease
Hit:3 http://it.archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:5 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://packages.microsoft.com/repos/code stable InRelease
Hit:7 http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal InRelease
Hit:8 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:9 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal InRelease
Fetched 109 kB in 1s (146 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

$ sudo apt list --upgradable -a
Listing... Done
linux-modules-nvidia-460-generic-hwe-20.04/focal-updates 5.8.0-49.55~20.04.1+1 amd64 [upgradable from: 5.8.0-48.54~20.04.1]
linux-modules-nvidia-460-generic-hwe-20.04/focal-security,now 5.8.0-48.54~20.04.1 amd64 [installed,upgradable to: 5.8.0-49.55~20.04.1+1]

然后我运行了sudo apt upgrade,但什么也没改变,包更新仍然待定。然后我尝试手动安装包:

$ sudo apt install linux-modules-nvidia-460-generic-hwe-20.04
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:
 linux-modules-nvidia-460-generic-hwe-20.04 : Depends: linux-modules-nvidia-460-5.8.0-49-generic (= 5.8.0-49.55~20.04.1+1) but it is not going to be installed
                                              Depends: nvidia-kernel-common-460 (>= 460.56) but 460.39-0ubuntu0.20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

该问题是否可能是由最近的内核更新引起的?我猜是从 5.8.0.48 升级到 5.8.0.49:

$ find /boot/vmli*
/boot/vmlinuz
/boot/vmlinuz-5.8.0-48-generic
/boot/vmlinuz-5.8.0-49-generic
/boot/vmlinuz.old

我也尝试从 Grub 使用 5.8.0.48 启动,但我卡在登录屏幕,系统完全冻结。

有什么想法可以解决吗?

非常感谢!

答案1

您可以将linux-modules-nvidia-460-generic-hwe-20.04软件包(及其所有依赖项)降级到以前的版本(5.8.0-48.54~20.04.1)来解决该问题,这是因为软件包的依赖关系中断,linux-modules-nvidia-460-generic-hwe-20.04 (5.8.0-49.55~20.04.1+1)要求(依赖)nvidia-kernel-common-460软件包的版本大于或等于 460.56,但目前只有 460.39 版本可用。我希望软件包维护者能尽快解决此问题。

答案2

[编辑]:Ubuntu 已于当天晚些时候修复此问题。

Ubuntu 发布了新的内核包 linux-image-5.8.0-49-generic,但并未发布所有需要的 nvidia 内核驱动程序包(至少缺少 nvidia-kernel-common-460 (>= 460.56))。在 Ubuntu 修复此问题之前,Nvidia 驱动程序将无法与新内核配合使用。启动旧版 Linux linux-image-5.8.0-48-generic,它应该仍能正常工作。

答案3

更新系统后我遇到了同样的问题,运行后sudo apt list --upgradable,我注意到可升级包列表中的 nvidia 并且运行 sudo apt dist-upgrade -y 解决了我的问题(我原以为sudo apt update && sudo apt upgrade应该这样做,但没有。

答案4

您可以尝试运行以下命令:

  • sudo apt--fix-broken 安装
  • sudo apt 更新
  • sudo apt 升级

我在安装驱动程序和第三方应用程序时也遇到过类似的问题。大多数情况下我都可以修复,内核版本相同,Ubuntu 20.04。

相关内容