我的系统变得非常慢 - 以前启动需要 15 秒。现在启动需要 3 分钟以上。我有一台双启动(ubuntu 和 windows)的戴尔电脑,我一直在阅读有关交换磁盘分配和其他 nvidia 相关问题的文章。似乎没有什么可以提高我的启动速度。
systemd-analyze time
启动用时 5.680 秒(固件)+ 3.578 秒(加载程序)+ 33.469 秒(内核)+ 3 分 475 毫秒(用户空间)= 3 分 43.204 秒 graphic.target 在用户空间中用时 1 分 36.087 秒达到
systemd-anlayze blame 的结果
5.105s nmbd.service
1.281s keyboard-setup.service
1.256s unifi.service
1.051s dev-sda5.device
1.049s snapd.service
816ms plymouth-start.service
815ms fwupd.service
805ms systemd-backlight@backlight:intel_backlight.service
764ms apparmor.service
689ms plymouth-read-write.service
610ms snapd.seeded.service
513ms systemd-journal-flush.service
463ms NetworkManager.service
355ms systemd-logind.service
330ms systemd-rfkill.service
295ms networkd-dispatcher.service
230ms upower.service
224ms udisks2.service
161ms systemd-resolved.service
159ms systemd-timesyncd.service
158ms snap-core-6964.mount
157ms snap-mailspring-277.mount
152ms accounts-daemon.service
142ms lightdm.service
140ms plymouth-quit-wait.service
129ms ModemManager.service
124ms snap-rclone-453.mount
122ms systemd-udevd.service
122ms thermald.service
120ms apport.service
115ms snap-rclone-466.mount
114ms grub-common.service
111ms systemd-udev-trigger.service
111ms systemd-tmpfiles-setup.service
108ms systemd-journald.service
106ms snap-mailspring-346.mount
97ms snap-core-5897.mount
93ms alsa-restore.service
93ms bluetooth.service
83ms pppd-dns.service
82ms avahi-daemon.service
78ms rsyslog.service
78ms gpu-manager.service
76ms systemd-fsck@dev-disk-by\x2duuid-4EF8\x2dD105.service
71ms dev-loop9.device
71ms snap-rclone-446.mount
69ms bolt.service
68ms dev-loop8.device
66ms systemd-modules-load.service
63ms dev-loop5.device
60ms systemd-tmpfiles-setup-dev.service
59ms snap-gtk\x2dcommon\x2dthemes-1198.mount
56ms [email protected]
55ms packagekit.service
52ms wpa_supplicant.service
51ms smbd.service
46ms dev-loop7.device
45ms colord.service
45ms binfmt-support.service
43ms speech-dispatcher.service
41ms dns-clean.service
40ms snap-mailspring-284.mount
34ms kerneloops.service
34ms systemd-remount-fs.service
33ms dev-loop6.device
28ms networking.service
26ms dev-loop3.device
26ms snap-core-6673.mount
25ms dev-loop0.device
23ms proc-sys-fs-binfmt_misc.mount
22ms geoclue.service
21ms polkit.service
21ms systemd-sysctl.service
20ms systemd-random-seed.service
19ms dev-loop1.device
18ms boot-efi.mount
14ms systemd-update-utmp.service
13ms dev-mqueue.mount
12ms ureadahead-stop.service
11ms resolvconf.service
11ms systemd-user-sessions.service
11ms console-setup.service
10ms sys-kernel-debug.mount
9ms ufw.service
9ms systemd-backlight@leds:dell::kbd_backlight.service
9ms sys-fs-fuse-connections.mount
8ms dev-hugepages.mount
7ms systemd-update-utmp-runlevel.service
6ms kmod-static-nodes.service
6ms resolvconf-pull-resolved.service
6ms rtkit-daemon.service
6ms dev-loop2.device
5ms snapd.socket
4ms sys-kernel-config.mount
4ms setvtrgb.service
1ms dev-loop4.device
我可以做些什么来缩短启动时间?
systemd-analyze critical-chain graphical.target @1min 36.189s └─multi-user.target @1min 36.189s └─smbd.service @1min 36.077s +111ms └─nmbd.service @1min 30.933s +5.143s └─network-online.target @1min 30.930s └─network.target @1min 30.928s └─NetworkManager.service @1min 30.485s +442ms └─dbus.service @1min 30.437s └─basic.target @1min 30.406s └─sockets.target @1min 30.405s └─snapd.socket @1min 30.401s +4ms └─sysinit.target @1min 30.400s └─apparmor.service @1.633s +630ms └─local-fs.target @1.630s └─run-user-1000-gvfs.mount @1min 43.717s └─run-user-1000.mount @1min 43.472s └─local-fs-pre.target @1.442s └─keyboard-setup.service @169ms +1.272s └─systemd-journald.socket @156ms └─system.slice @156ms └─-.slice @154ms
答案1
尝试检查您是否有交换分区,如果有,则尝试查看 /etc/fstab 中设置的 UUID 是否正确