Slow startup 18.04 on an SSD
I've been having a lot of trouble lately with startup time. I'm running Kubuntu 18.04, and startup always takes more than a minute on an SSD.
I have a swapfile set to be used, and it shows up when I run
sudo swapon --show
I have the blame output here
systemd-analyze blame
34.052s systemd-timesyncd.service
33.978s systemd-resolved.service
2.518s NetworkManager-wait-online.service
676ms dev-sda5.device
585ms systemd-logind.service
364ms udisks2.service
347ms nvidia-persistenced.service
312ms swapfile.swap
300ms mpd.service
223ms upower.service
188ms NetworkManager.service
133ms systemd-journal-flush.service
120ms systemd-modules-load.service
119ms snapd.service
107ms systemd-hostnamed.service
94ms networkd-dispatcher.service
70ms keyboard-setup.service
67ms systemd-fsck@dev-disk-by\x2duuid-D653\x2dC926.service
61ms systemd-udev-trigger.service
55ms accounts-daemon.service
47ms apport.service
47ms grub-common.service
42ms systemd-udevd.service
39ms systemd-journald.service
39ms ModemManager.service
36ms systemd-tmpfiles-setup-dev.service
35ms thermald.service
Before it was taking 30s to mount my HDD, but I removed that from my fstab since.
Here's my time to boot
systemd-analyze time
Startup finished in 7.746s (firmware) + 4.859s (loader) + 35.728s (kernel) + 37.950s (userspace) = 1min 26.285s
graphical.target reached after 37.946s in userspace
Any idea what I should be doing?
Little update: I rebooted again, and here are my new blames and times
systemd-analyze blame
2.510s NetworkManager-wait-online.service
961ms dev-sda5.device
619ms systemd-logind.service
358ms nvidia-persistenced.service
348ms swapfile.swap
262ms udisks2.service
254ms NetworkManager.service
223ms upower.service
185ms mpd.service
184ms systemd-fsck@dev-disk-by\x2duuid-D653\x2dC926.service
167ms systemd-timesyncd.service
154ms systemd-resolved.service
144ms snapd.service
128ms systemd-journal-flush.service
127ms systemd-modules-load.service
124ms networkd-dispatcher.service
103ms apparmor.service
80ms systemd-tmpfiles-setup.service
76ms systemd-udev-trigger.service
74ms grub-common.service
65ms keyboard-setup.service
47ms ModemManager.service
46ms apport.service
42ms systemd-journald.service
42ms accounts-daemon.service
41ms wpa_supplicant.service
37ms systemd-udevd.service
.
systemd-analyze time
Startup finished in 10.518s (firmware) + 4.899s (loader) + 35.676s (kernel) + 38.337s (userspace) = 1min 29.432s
graphical.target reached after 38.333s in userspace
Ok, I set the grub to noresume
, and here are the new numbers on that reboot.
systemd-analyze blame
33.853s systemd-fsck@dev-disk-by\x2duuid-D653\x2dC926.service
2.543s NetworkManager-wait-online.service
1.157s dev-sda5.device
606ms systemd-logind.service
542ms snapd.service
385ms dev-loop0.device
358ms udisks2.service
358ms nvidia-persistenced.service
343ms dev-loop1.device
318ms swapfile.swap
298ms mpd.service
286ms systemd-journal-flush.service
226ms upower.service
195ms NetworkManager.service
189ms systemd-resolved.service
144ms systemd-timesyncd.service
118ms systemd-modules-load.service
107ms media-ku\x2dgames.mount
82ms networkd-dispatcher.service
72ms systemd-udevd.service
68ms snap-discord-79.mount
65ms keyboard-setup.service
58ms grub-common.service
54ms ModemManager.service
52ms systemd-udev-trigger.service
44ms accounts-daemon.service
39ms apparmor.service
.
systemd-analyze time
Startup finished in 10.680s (firmware) + 3.405s (loader) + 3.226s (kernel) + 38.169s (userspace) = 55.482s
graphical.target reached after 38.165s in userspace
Solution 1:
The problem was my nvidia drivers I removed my nvidia drivers Then I added them back again, but using the .run from nvidia It's fixed now.