Extremely slow ubuntu 18.04 boot time

So I have looked at a lot of suggestions from this website already and tried quite a few of them, but they all differ and I get a feeling these are very specific problems for which I lack the expertise to find which exact case applies to me.

Here is my result for systemd-analyze blame

1min 59.160s plymouth-quit-wait.service
     33.950s apt-daily.service
      7.276s NetworkManager-wait-online.service
      2.292s apt-daily-upgrade.service
       754ms fwupd.service
       397ms dev-sda6.device
       375ms systemd-logind.service
       362ms plymouth-start.service
       230ms NetworkManager.service
       209ms udisks2.service
       169ms networkd-dispatcher.service
       160ms systemd-timesyncd.service
       147ms systemd-resolved.service
       135ms ModemManager.service
       123ms apparmor.service
       104ms accounts-daemon.service
       100ms keyboard-setup.service
        99ms systemd-journal-flush.service
        91ms systemd-udevd.service
        75ms upower.service
        71ms systemd-udev-trigger.service
        69ms plymouth-read-write.service
        62ms systemd-rfkill.service

And this is what I get from systemd-analyze critical-chain:

graphical.target @2min 330ms
└─multi-user.target @2min 330ms
  └─kerneloops.service @8.446s +7ms
    └─network-online.target @8.441s
      └─NetworkManager-wait-online.service @1.164s +7.276s
        └─NetworkManager.service @932ms +230ms
          └─dbus.service @877ms
            └─basic.target @872ms
              └─sockets.target @872ms
                └─uuidd.socket @872ms
                  └─sysinit.target @868ms
                    └─systemd-timesyncd.service @707ms +160ms
                      └─systemd-tmpfiles-setup.service @672ms +31ms
                        └─local-fs.target @671ms
                          └─run-user-122.mount @1.340s
                            └─swap.target @623ms
                              └─dev-disk-by\x2duuid-19af8e87\x2d864e\x2d4148\x2d
                                └─dev-disk-by\x2duuid-19af8e87\x2d864e\x2d4148\x

These were a few things I noticed were added to most of these questions, so I thought they might help as well.

I run ubuntu 18.04 LTS in a dual boot configuration using GRUB. My grub version is 2.02-2ubuntu8.9.


You can improve your boot time by:

  1. Move the update check from boot to sometime later by running sudo systemctl edit apt-daily.timer and changing to something like:

    # apt-daily timer configuration override
    [Timer]
    OnBootSec=15min
    OnUnitActiveSec=1d
    AccuracySec=1h
    RandomizedDelaySec=30min
    

    Refer to this answer for more complete explanation.

  2. If you're not using your computer remotely by yourself or someone else you can disable the NetworkManager-wait-online.service which just make sure networking is online and available by running sudo systemctl disable NetworkManager-wait-online.service.

I guess these will cut off roughly 40 seconds of boot time.