0

this relates to my laptop HP 250 with a dual boot HDD with Win10. I assume the Ubuntu boot up time increased with the updates but since I restored an image on the same HDD it's got much worse. I also expanded the ubuntu partition after restoring the image but this didn't seem to worsen the boot up time.

systemd-analyze blame showed apt-daily.service was taking 58 seconds and I fixed it by setting the schedule of apt-daily.service to run randomly between 15 min and 45 min after booting

I just timed the boot up time and it's as follows:

  • 40 seconds after pushing start the GRUB menu pops up (for just 2 seconds, as I set it)
  • 1 minute later the Ubuntu logo with the dots switching red/white shows up
  • ~1.5 minutes later the logging screen appears -> Total ~3 min & 10 secs

This is the current systemd-analyze blame

     23.157s dev-sda3.device
     23.140s systemd-journal-flush.service
      9.582s plymouth-quit-wait.service
      7.181s snapd.service
      6.750s NetworkManager-wait-online.service
      6.551s systemd-tmpfiles-setup-dev.service
      3.838s mysql.service
      3.546s networkd-dispatcher.service
      3.021s keyboard-setup.service
      2.867s dev-loop11.device
      2.686s NetworkManager.service
      2.492s dev-loop13.device
      2.485s dev-loop21.device
      2.402s dev-loop17.device
      2.247s udisks2.service
      2.239s dev-loop20.device
      2.066s dev-loop4.device
      1.944s dev-loop7.device
      1.802s dev-loop18.device
      1.797s grub-common.service

And systemd-analyze critical-chain copi-pasted below with screenshot here

graphical.target @1min 47.284s └─multi-user.target @1min 47.284s └─teamviewerd.service @1min 44.449s +71ms └─network-online.target @1min 44.447s └─NetworkManager-wait-online.service @1min 37.696s +6.750s └─NetworkManager.service @1min 35.005s +2.686s └─dbus.service @1min 34.059s └─basic.target @1min 34.034s └─sockets.target @1min 34.034s └─snapd.socket @1min 34.006s +28ms └─sysinit.target @1min 33.967s └─systemd-timesyncd.service @28.356s +245ms └─systemd-tmpfiles-setup.service @28.031s +322ms └─local-fs.target @28.029s └─run-user-1000-gvfs.mount @1min 58.829s └─run-user-1000.mount @1min 54.722s └─local-fs-pre.target @10.458s └─systemd-tmpfiles-setup-dev.service @3.906s +6. └─kmod-static-nodes.service @3.801s +103ms └─systemd-journald.socket @3.801s └─system.slice @3.800s └─-.slice @3.791s

So can the values from the main contributors be reduced somehow? Or what else can I do to shorten the boot up time? I have seen that dmesg can be useful, any guidance on how to check it please?

Thanks in advance!

cacu
  • 1
  • I would investigate UUIDs. Since you changed a partition. You may have an entry in fstab referring to a missing UUID? Some other issues. https://askubuntu.com/questions/1284302/is-it-possible-to-make-ubuntu-20-04-boot-faster In dmesg, you can search for long times between entries or repeated tries at loading a driver. – oldfred Apr 10 '21 at 16:01
  • Thanks @oldfred /etc/fstab lacks entries of two partitions, windows one and an NTFS one which I use to just store files. It mounts automatically on bootup so maybe this fact is delaying the process.

    And the main time gaps in desmeg are

    [ 2.844226] clocksource: Switched to clocksource tsc [ 35.738161] random: crng init done

    and

    [ 68.828318] audit: type=1400 audit(1618028962.367:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=854 comm="apparmor_parser" [ 134.622266] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

    – cacu Apr 10 '21 at 16:48
  • Not familiar with either of those issues. But why is loading a LibreOffice file in boot? Seems a bit unusual. – oldfred Apr 10 '21 at 17:46
  • I'm also surprised about the libreoffice one, I've seen other questions but no revealing answers.There's something I can try for the clocksource one, let's see – cacu Apr 12 '21 at 19:56
  • Found this, do not know if it applies or not. https://askubuntu.com/questions/1212480/libreoffice-crashes-immediately-on-startup I have LibreOffice, and do not have that issue with default Kubuntu install. – oldfred Apr 13 '21 at 02:42

0 Answers0