我定期运行 systemd-analyze 来检查启动时间。我最近注意到 snapd 服务比以前耗费的时间太多了。请提出解决方案以减少耗费的时间。
PS 我也很感激有关减少下面提到的其他服务的启动时间的建议。
以下是 systemd-analyze critical-chain 的输出
graphical.target @24.395s
└─multi-user.target @24.392s
└─snapd.service @13.856s +10.534s
└─basic.target @13.193s
└─sockets.target @13.187s
└─snapd.socket @13.149s +28ms
└─sysinit.target @13.039s
└─apparmor.service @11.445s +1.589s
└─local-fs.target @11.425s
└─run-user-1000.mount @23.575s
└─local-fs-pre.target @3.494s
└─systemd-remount-fs.service @3.380s +74ms
└─system.slice @2.104s
└─-.slice @2.030s
以下是 systemd-analyze --blame 的输出
10.534s snapd.service
7.678s dev-sda6.device
7.608s ModemManager.service
6.233s accounts-daemon.service
6.085s udisks2.service
4.706s grub-common.service
4.325s apport.service
3.809s systemd-logind.service
3.642s networking.service
3.590s alsa-restore.service
3.536s pppd-dns.service
3.531s bluetooth.service
3.523s thermald.service
3.483s avahi-daemon.service
3.364s NetworkManager.service
3.355s NetworkManager-wait-online.service
3.004s speech-dispatcher.service
2.906s rsyslog.service
2.636s gpu-manager.service
1.994s fwupd.service
1.951s polkit.service
1.706s systemd-fsck@dev-disk-by\x2duuid-EE66\x2d6196.service
1.589s apparmor.service
1.232s mnt-7C5CC02A5CBFDCD8.mount
1.068s keyboard-setup.service