6

My Kubuntu 18.04 (LTS) takes about 3 minutes to boot. It is about 6 months old atm.

Following are the relevant details :

uname -a
Linux konsole 5.0.0-31-generic #33~18.04.1-Ubuntu SMP Tue Oct 1 10:20:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
systemd-analyze 
Startup finished in 5.754s (kernel) + 46.078s (userspace) = 51.833s
graphical.target reached after 46.059s in userspace

(Selecting the first few)

systemd-analyze blame
         15.969s systemd-journal-flush.service
         13.596s NetworkManager-wait-online.service
         13.000s networkd-dispatcher.service
         12.798s dev-sda1.device
          8.445s gpu-manager.service
          7.320s udisks2.service
          6.598s ssh.service
          5.433s NetworkManager.service
          5.351s ModemManager.service
          4.917s systemd-udevd.service
          4.525s vboxdrv.service
          4.520s apparmor.service
          4.164s grub-common.service
          3.576s accounts-daemon.service
          3.110s thermald.service
          3.109s bluetooth.service
          3.107s lm-sensors.service
          2.491s wpa_supplicant.service
          2.335s systemd-tmpfiles-setup.service
          1.901s systemd-rfkill.service
          1.862s systemd-logind.service
          1.709s systemd-fsck@dev-disk-by\x2duuid-199d5cb3\x2d2d16\x2d4f3f\x2d8af8\x2d99c53ad33b9f.service
          1.634s avahi-daemon.service
          1.441s systemd-backlight@backlight:intel_backlight.service
          1.286s packagekit.service
          1.271s systemd-tmpfiles-setup-dev.service
          1.168s systemd-modules-load.service
          1.157s binfmt-support.service
          1.045s keyboard-setup.service

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @30.321s
└─multi-user.target @30.321s
  └─networkd-dispatcher.service @20.286s +10.034s
    └─basic.target @17.615s
      └─sockets.target @17.615s
        └─avahi-daemon.socket @17.615s
          └─sysinit.target @17.523s
            └─apparmor.service @14.592s +2.930s
              └─local-fs.target @14.590s
                └─home.mount @14.347s +242ms
                  └─systemd-fsck@dev-disk-by\x2duuid-199d5cb3\x2d2d16\x2d4f3f\x2d8af8\x2d99c53ad33b9f.service @12.804s +1.478s
                    └─dev-disk-by\x2duuid-199d5cb3\x2d2d16\x2d4f3f\x2d8af8\x2d99c53ad33b9f.device @12.803s
5
  • Related: How to decrease the boot time
    – Raffa
    Oct 17, 2019 at 19:11
  • Hey @Raffa, I tried that and it only improved it by a 20 second margin. It still takes more than2 minutes to boot. Oct 18, 2019 at 4:05
  • Currently, postfix slows eveyrhing down Oct 18, 2019 at 15:10
  • Do you need postfix? Is this machine a mail server? If yes, troubleshoot postfix to see what is slowing down the service and fix it. If no, disable the postfix service or uninstall postfix all together.
    – Raffa
    Oct 18, 2019 at 15:51
  • Yep, figured I had to disable postfix right after I commented, boot-time is still around 30-40 s. Something called Networkd-dispatcher service is slowing it down. Oct 19, 2019 at 4:55

1 Answer 1

4

A few services can be disabled to reduce the boot-up time with no effect on the desktop environment functionality in most cases:


Firstly:

POSTFIX appears in your post. If your machine is not a mail server and you do not use POSTFIX you can disable the postfix.service by running the following command in the terminal:

sudo systemctl disable postfix.service

Or you can uninstall POSTFIX all together by running the following command in the terminal:

sudo apt remove postfix

Secondly:

NetworkManager-wait-online.service can be disabled by running the following command in the terminal:

sudo systemctl disable NetworkManager-wait-online.service

Please refer to this answer for more explanation.


Thirdly:

Two services that rely on the functionality of NetworkManager-wait-online.service are networkd-dispatcher.service and systemd-networkd.service. These can be disabled as well by running the following commends in the terminal:

sudo systemctl disable networkd-dispatcher.service

And:

sudo systemctl disable systemd-networkd.service

These two services are used strictly for systemd's connectivity purposes and will not affect the connectivity of the desktop environment after login.

1
  • 1
    Thanks. This helps a little, boot time is now around the 1.20 mins mark. Will post the critical chain once I get home. Oct 22, 2019 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.