在(几乎)无人值守的设置中运行 Ubuntu 20.04 LTS 桌面。该机器配有强大的 NVidia 显卡。我安装了驱动程序sudo ubuntu-drivers autoinstall
,一切运行良好。
apt
此后没人再跑。
几周后,当机器重新启动时,它仍然停留在黑屏并有闪烁的光标...我必须手动重新运行以下命令才能使其再次工作:
sudo apt -y purge ~nnvidia
sudo ubuntu-drivers autoinstall
如果我看一下/var/log/apt/history.log
,就会发现,在 nvidia 驱动程序自发停止工作的时候:
Start-Date: 2022-09-02 11:16:07
Commandline: /usr/bin/unattended-upgrade
Upgrade: libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.12, 7.68.0-1ubuntu2.13)
End-Date: 2022-09-02 11:16:08
Start-Date: 2022-09-02 11:16:11
Commandline: /usr/bin/unattended-upgrade
Upgrade: libcurl4:amd64 (7.68.0-1ubuntu2.12, 7.68.0-1ubuntu2.13), libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.12, 7.68.0-1ubuntu2.13), curl:amd64 (7.68.0-1ubuntu2.12, 7.68.0-1ubuntu2.13)
End-Date: 2022-09-02 11:16:13
我猜这unattended-upgrade
是原因,但为什么呢?我想禁用unattended-upgrade
是唯一的解决方案?
我还在中看到以下内容unattended-upgrades.log
:
2022-09-01 06:05:58,811 INFO Starting unattended upgrades script
2022-09-01 06:05:58,813 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2022-09-01 06:05:58,813 INFO Initial blacklist:
2022-09-01 06:05:58,813 INFO Initial whitelist (not strict):
2022-09-01 06:06:37,215 INFO No packages found that can be upgraded unattended and no pending auto-removals
2022-09-01 06:06:37,355 INFO Package libnvidia-cfg1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,356 INFO Package libnvidia-compute-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,358 INFO Package libnvidia-compute-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,360 INFO Package libnvidia-decode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,361 INFO Package libnvidia-decode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,363 INFO Package libnvidia-encode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,365 INFO Package libnvidia-encode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,367 INFO Package libnvidia-extra-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,369 INFO Package libnvidia-fbc1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,371 INFO Package libnvidia-fbc1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,373 INFO Package libnvidia-gl-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,375 INFO Package libnvidia-gl-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,450 INFO Package linux-modules-nvidia-510-generic-hwe-20.04 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,484 INFO Package nvidia-compute-utils-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,486 INFO Package nvidia-driver-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,488 INFO Package nvidia-kernel-common-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,490 INFO Package nvidia-kernel-source-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,492 INFO Package nvidia-utils-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:06:37,557 INFO Package xserver-xorg-video-nvidia-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-01 06:26:47,067 INFO Starting unattended upgrades script
2022-09-01 06:26:47,071 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2022-09-01 06:26:47,071 INFO Initial blacklist:
2022-09-01 06:26:47,071 INFO Initial whitelist (not strict):
2022-09-02 03:57:48,204 INFO Starting unattended upgrades script
2022-09-02 03:57:48,204 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2022-09-02 03:57:48,205 INFO Initial blacklist:
2022-09-02 03:57:48,205 INFO Initial whitelist (not strict):
2022-09-02 11:15:51,908 INFO Starting unattended upgrades script
2022-09-02 11:15:51,909 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2022-09-02 11:15:51,909 INFO Initial blacklist:
2022-09-02 11:15:51,909 INFO Initial whitelist (not strict):
2022-09-02 11:16:06,882 INFO Packages that will be upgraded: curl libcurl3-gnutls libcurl4 libcurl4-openssl-dev
2022-09-02 11:16:06,882 INFO Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2022-09-02 11:16:15,056 INFO All upgrades installed
2022-09-02 11:16:15,351 INFO Package libnvidia-cfg1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,352 INFO Package libnvidia-compute-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,353 INFO Package libnvidia-compute-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,355 INFO Package libnvidia-decode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,356 INFO Package libnvidia-decode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,357 INFO Package libnvidia-encode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,359 INFO Package libnvidia-encode-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,360 INFO Package libnvidia-extra-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,361 INFO Package libnvidia-fbc1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,362 INFO Package libnvidia-fbc1-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,364 INFO Package libnvidia-gl-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,365 INFO Package libnvidia-gl-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,402 INFO Package linux-modules-nvidia-510-generic-hwe-20.04 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,418 INFO Package nvidia-compute-utils-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,420 INFO Package nvidia-driver-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,421 INFO Package nvidia-kernel-common-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,422 INFO Package nvidia-kernel-source-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,424 INFO Package nvidia-utils-510 is kept back because a related package is kept back or due to local apt_preferences(5).
2022-09-02 11:16:15,454 INFO Package xserver-xorg-video-nvidia-510 is kept back because a related package is kept back or due to local apt_preferences(5).
谢谢你!