升级到 20.04,启动速度太慢

升级到 20.04,启动速度太慢

Ubuntu 版本:20.04
磁盘类型:硬盘

Startup finished in 5.137s (firmware) + 3.525s (loader) + 4.109s (kernel) + 1min 13.665s (userspace) = 1min 26.438s 
graphical.target reached after 1min 12.518s in userspace

42.842s plymouth-quit-wait.service                                             >
22.628s NetworkManager-wait-online.service                                     >
21.565s udisks2.service                                                        >
18.962s snapd.service                                                          >
18.125s [email protected]                                             >
18.018s [email protected]                                             >
15.183s systemd-journal-flush.service                                          >
11.914s networkd-dispatcher.service                                            >
11.435s [email protected]                                                      >
10.914s dev-sda1.device                                                        >
 9.903s accounts-daemon.service                                                >
 8.082s apport-autoreport.service                                              >
 7.637s teamviewerd.service                                                    >
 7.254s polkit.service                                                         >
 6.908s NetworkManager.service                                                 >
 6.889s avahi-daemon.service                                                   >
 6.885s bluetooth.service                                                      >
 6.517s switcheroo-control.service                                             >
 6.511s thermald.service                                                       >
 6.509s systemd-logind.service                                                 >
 6.508s wpa_supplicant.service                                                 >
 6.245s dev-loop6.device                                                       >
 6.073s dev-loop8.device 

关键链的输出

graphical.target @1min 12.518s
└─multi-user.target @1min 12.518s
  └─postfix.service @1min 3.835s +5ms
    └─[email protected] @52.394s +11.435s
      └─network-online.target @52.204s
        └─NetworkManager-wait-online.service @29.574s +22.628s
          └─NetworkManager.service @22.659s +6.908s
            └─dbus.service @22.656s
              └─basic.target @22.625s
                └─sockets.target @22.625s
                  └─snapd.socket @22.624s +773us
                    └─sysinit.target @22.421s
                      └─systemd-timesyncd.service @22.023s +397ms
                        └─systemd-tmpfiles-setup.service @20.116s +1.777s
                          └─local-fs.target @20.112s
                            └─home-xpt1x-data.mount @16.307s +3.805s
                              └─dev-sda5.device @16.275s

我还注意到,制造商的徽标首先出现约 6-7 秒,然后制造商徽标再次出现,底部的 Ubuntu 徽标与加载旋转器一起出现,甚至在此之后,需要花费太多时间才能到达主屏幕。我发现有些服务花费的时间太长了,请提出解决方案。

相关内容