How do I speed up Ubuntu 20.04 boot time
Booting up into Ubuntu 20.04 takes a long time for me. I ran the systemd-analyze
command and this is what I get.
Startup finished in 5.533s (kernel) + 1min 40.647s (userspace) = 1min 46.181s
graphical.target reached after 1min 40.553s in userspace
How do I reduce the userspace time and can someone explain what it is.
The following is the output of systemd-analyze blame
systemd-analyze blame
1min 12.349s plymouth-quit-wait.service
15.221s snapd.service
13.732s networkd-dispatcher.service
13.096s dev-sda4.device
10.283s NetworkManager-wait-online.service
8.650s udisks2.service
8.511s gpu-manager.service
7.907s NetworkManager.service
7.089s dev-loop0.device
7.089s dev-loop1.device
7.015s dev-loop3.device
6.753s dev-loop6.device
6.645s dev-loop9.device
6.614s accounts-daemon.service
6.603s dev-loop18.device
6.552s dev-loop8.device
6.467s dev-loop12.device
6.361s dev-loop13.device
6.257s dev-loop14.device
6.193s dev-loop15.device
6.149s dev-loop17.device
6.139s dev-loop16.device
5.774s polkit.service
lines 1-23...skipping...
1min 12.349s plymouth-quit-wait.service
15.221s snapd.service
13.732s networkd-dispatcher.service
13.096s dev-sda4.device
10.283s NetworkManager-wait-online.service
8.650s udisks2.service
8.511s gpu-manager.service
7.907s NetworkManager.service
7.089s dev-loop0.device
7.089s dev-loop1.device
7.015s dev-loop3.device
6.753s dev-loop6.device
6.645s dev-loop9.device
6.614s accounts-daemon.service
6.603s dev-loop18.device
6.552s dev-loop8.device
6.467s dev-loop12.device
6.361s dev-loop13.device
6.257s dev-loop14.device
6.193s dev-loop15.device
6.149s dev-loop17.device
6.139s dev-loop16.device
5.774s polkit.service
4.736s avahi-daemon.service
4.735s bluetooth.service
4.312s switcheroo-control.service
4.281s dev-loop11.device
4.259s systemd-journal-flush.service
4.246s dev-loop4.device
4.191s dev-loop10.device
4.070s bolt.service
4.062s dev-loop5.device
4.041s fwupd.service
3.943s dev-loop7.device
3.503s thermald.service
3.500s wpa_supplicant.service
3.500s systemd-logind.service
3.300s systemd-resolved.service
3.217s grub-common.service
3.142s apport.service
3.072s e2scrub_reap.service
2.712s systemd-udevd.service
2.582s grub-initrd-fallback.service
2.193s secureboot-db.service
2.165s ModemManager.service
1.813s rsyslog.service
1.798s gdm.service
1.556s systemd-tmpfiles-setup.service
1.432s apparmor.service
1.424s pppd-dns.service
1.232s systemd-modules-load.service
1.156s snapd.apparmor.service
1.082s snap-vlc-1700.mount
1.056s snap-gnome\x2d3\x2d34\x2d1804-36.mount
I am using a Dell G7 17
i7 9750H
Nvidia RTX 2070 MaxQ
16GB 2666 RAM
256GB SSD + 1TB HDD
Thanks
Edit #1
I have reinstalled Ubuntu 20.04 but my time has not changed even though I did a minimal installation. I did install VLC, Terminator and Jupyter Notebooks to carry out my tasks.
Here are the new times.
nova@G7:~$ systemd-analyze blame
37.821s plymouth-quit-wait.service
13.609s dev-sda4.device
13.119s networkd-dispatcher.service
11.606s NetworkManager-wait-online.service
10.705s systemd-journal-flush.service
9.914s udisks2.service
8.143s accounts-daemon.service
8.063s dev-loop1.device
8.008s dev-loop2.device
7.920s fwupd.service
7.846s dev-loop4.device
7.665s dev-loop10.device
7.654s dev-loop11.device
7.082s dev-loop8.device
6.791s dev-loop5.device
6.660s NetworkManager.service
6.494s dev-loop9.device
5.541s polkit.service
5.309s dev-loop7.device
5.224s dev-loop12.device
5.154s dev-loop13.device
4.965s gpu-manager.service
4.951s bluetooth.service
4.949s avahi-daemon.service
4.766s dev-loop0.device
4.418s switcheroo-control.service
4.414s thermald.service
4.413s wpa_supplicant.service
4.412s systemd-logind.service
4.344s dev-loop6.device
4.251s ModemManager.service
4.035s apport.service
3.922s grub-common.service
3.853s dev-loop3.device
3.341s bolt.service
3.033s secureboot-db.service
2.699s rsyslog.service
2.370s systemd-resolved.service
2.183s systemd-udevd.service
1.818s gdm.service
1.783s grub-initrd-fallback.service
1.695s systemd-modules-load.service
1.309s keyboard-setup.service
1.219s plymouth-start.service
1.138s systemd-random-seed.service
1.135s apparmor.service
1.093s snapd.seeded.service
1.000s snapd.apparmor.service
945ms colord.service
872ms systemd-sysusers.service
852ms systemd-tmpfiles-setup-dev.service
801ms systemd-backlight@backlight:intel_backlight.service
760ms [email protected]
708ms e2scrub_reap.service
678ms systemd-rfkill.service
671ms snap-telegram\x2ddesktop-2064.mount
658ms snap-vlc-1700.mount
585ms snapd.service
572ms snap-canonical\x2dlivepatch-95.mount
524ms systemd-tmpfiles-setup.service
514ms upower.service
504ms systemd-udev-trigger.service
493ms swapfile.swap
484ms snap-spotify-42.mount
467ms snap-jupyter-6.mount
443ms systemd-journald.service
438ms snap-core20-634.mount
422ms pppd-dns.service
407ms kerneloops.service
406ms systemd-fsck@dev-disk-by\x2duuid-E2FE\x2dB8EE.service
371ms snap-gnome\x2d3\x2d34\x2d1804-24.mount
353ms openvpn.service
345ms snap-gnome\x2d3\x2d28\x2d1804-128.mount
339ms snap-snap\x2dstore-433.mount
321ms setvtrgb.service
307ms ufw.service
291ms [email protected]
280ms snap-gtk\x2dcommon\x2dthemes-1506.mount
279ms systemd-remount-fs.service
266ms snap-snapd-7264.mount
261ms systemd-sysctl.service
242ms systemd-timesyncd.service
227ms snap-core-9993.mount
194ms console-setup.service
177ms systemd-update-utmp.service
154ms plymouth-read-write.service
146ms snap-discord-115.mount
132ms snap-core18-1705.mount
128ms snap-snapd-9279.mount
103ms dev-hugepages.mount
102ms dev-mqueue.mount
102ms sys-kernel-debug.mount
101ms sys-kernel-tracing.mount
99ms systemd-tmpfiles-clean.service
99ms kmod-static-nodes.service
88ms snap-gnome\x2d3\x2d34\x2d1804-36.mount
77ms snap-snap\x2dstore-467.mount
60ms rtkit-daemon.service
48ms boot-efi.mount
46ms systemd-user-sessions.service
33ms snap-core18-1885.mount
20ms dev-loop16.device
14ms dev-loop15.device
9ms [email protected]
7ms dev-loop14.device
7ms systemd-update-utmp-runlevel.service
6ms alsa-restore.service
3ms dev-loop17.device
1ms sys-fs-fuse-connections.mount
1ms sys-kernel-config.mount
478us snapd.socket
Edit #2
After the install I have noticed apps like the Ubuntu Software and other inbuilt apps also take time to load.
Ubuntu is loaded on a partition of my HDD
A few things that helped me speed up my PC.
1. Reinstalling Ubuntu.
While reinstalling make sure you choose the minimal installation option as this will reduce the number of applications and packages installed on your PC. You can always manually add whatever is needed using the terminal.
2. Use an SSD.
On my PC Ubuntu is installed on my Hard drive which makes the bootup time slower
3. When Dual Booting a PC use the First Partition of the drive.
When I first Dual Booted Ubuntu on my HDD the first partition was for storing the data used by Windows. After this, there were some necessary portions created by Windows and at last the partition for Ubuntu. The computer scans all the partitions in order and then boots into Ubuntu when it reaches the Ubuntu drive (sdb4 in my case).
Doing all this now my boot time has reduced significantly.