Ubuntu bootup is slow

Bug #2077225 reported by Tapas Kumar Sharma

This bug report will be marked for expiration in 42 days if no further activity occurs. (find out why)

8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium (Ubuntu)
Incomplete
Undecided
Unassigned
plymouth (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Desktop bootup is very slow, some outputs are below:

tsharma@tsharma-Latitude-E6430:~$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @2min 34.609s
└─multi-user.target @2min 34.609s
  └─plymouth-quit-wait.service @32.862s +2min 1.745s
    └─systemd-user-sessions.service @32.545s +294ms
      └─network.target @32.147s
        └─NetworkManager.service @24.361s +7.785s
          └─network-pre.target @24.360s
            └─windscribe-helper.service @24.359s
              └─basic.target @23.840s
                └─sockets.target @23.840s
                  └─cups.socket @31.600s
                    └─sysinit.target @23.747s
                      └─plymouth-read-write.service @17.488s +6.258s
                        └─local-fs.target @17.467s
                          └─run-snapd-ns-chromium.mnt.mount @2min 55.287s
                            └─run-snapd-ns.mount @46.421s
                              └─swap.target @9.689s
                                └─dev-disk-by\x2duuid-1e7a8f7c\x2d038b\x2d43d8\x2db6f0\x2d111cf9ebe5d5.swap @9.473s +213ms
                                  └─dev-sda5.device @9.466s

tsharma@tsharma-Latitude-E6430:~$ systemd-analyze blame
2min 12.988s apt-daily-upgrade.service
 2min 1.745s plymouth-quit-wait.service
1min 12.069s mysql.service
     53.186s preload.service
     39.394s snapd.seeded.service
     35.204s snapd.service
     33.738s logrotate.service
     30.775s e2scrub_reap.service
     23.808s <email address hidden>
     22.731s apache2.service
     21.114s ModemManager.service
     20.871s nginx.service
     20.850s networkd-dispatcher.service
     20.017s NetworkManager-wait-online.service
     19.043s udisks2.service
     12.407s accounts-daemon.service
     11.454s teamviewerd.service
     10.403s power-profiles-daemon.service
     10.219s cups.service
      9.611s polkit.service
      8.964s redis-server.service
      7.785s NetworkManager.service
      7.582s avahi-daemon.service
      7.582s bluetooth.service
      7.125s switcheroo-control.service
      7.117s thermald.service
      7.115s systemd-logind.service
      7.106s wpa_supplicant.service
      7.084s webmin.service
      6.258s plymouth-read-write.service
      5.801s ssh.service
      5.596s xrdp.service
      5.560s update-notifier-download.service
      5.510s gdm.service
      4.798s smartmontools.service
      4.379s dev-sda6.device
      4.067s systemd-journal-flush.service
      3.916s gpu-manager.service
      3.827s ua-timer.service
      3.539s phpsessionclean.service
      3.519s systemd-tmpfiles-clean.service
      3.391s apparmor.service
      3.258s usermin.service
      3.176s ufw.service
      2.989s xrdp-sesman.service
      2.945s apport.service
      2.665s grub-common.service
      2.219s systemd-fsck@dev-disk-by\x2duuid-e123499f\x2dfbf6\x2d49b4\x2da9fb\x2dd9f6894d5f0b.service
      2.216s rsyslog.service
      2.215s boot.mount
      2.150s snap-bare-5.mount
      2.067s snap-canonical\x2dlivepatch-264.mount
      2.032s snap-canonical\x2dlivepatch-282.mount
      1.978s systemd-resolved.service
      1.926s snapd.apparmor.service
      1.924s plymouth-start.service
      1.842s systemd-fsck@dev-disk-by\x2duuid-b5178cf9\x2d648c\x2d4cd1\x2da160\x2d9816e63537a7.service
      1.693s snap-chromium-2923.mount
      1.650s packagekit.service
      1.456s systemd-random-seed.service
      1.444s dev-loop11.device
      1.417s snap-core-17200.mount
      1.349s snap-core20-2318.mount
      1.249s grub-initrd-fallback.service
      1.232s snap-core22-1380.mount
      1.182s snap-core22-1439.mount
      1.181s systemd-tmpfiles-setup.service
      1.086s snap-cups-1058.mount
      1.020s snap-gnome\x2d42\x2d2204-176.mount
       986ms systemd-fsck@dev-disk-by\x2duuid-f87773ec\x2d3714\x2d49f2\x2da2c3\x2d36b3bbee9c22.service
       967ms home.mount
       939ms lm-sensors.service
       939ms snap-gtk\x2dcommon\x2dthemes-1535.mount
       934ms dev-loop9.device
       912ms tor.service
       881ms snap-hunspell\x2ddictionaries\x2d1\x2d7\x2d2004-2.mount
       850ms snap-snap\x2dstore-1113.mount
       848ms systemd-udevd.service
       834ms dev-loop8.device
       775ms upower.service
       707ms snap-snapd-21759.mount
       705ms dev-loop14.device
       688ms systemd-modules-load.service
       672ms systemd-backlight@backlight:intel_backlight.service
       624ms inetd.service
       563ms kerneloops.service
       541ms colord.service
       485ms user@1000.service
       473ms dev-loop10.device
       473ms keyboard-setup.service
       467ms var.mount
       402ms systemd-update-utmp.service
       375ms systemd-udev-trigger.service
       368ms systemd-oomd.service
       365ms systemd-tmpfiles-setup-dev.service
       334ms openvpn.service
       294ms systemd-user-sessions.service
       282ms console-setup.service
       244ms systemd-sysusers.service
       227ms systemd-sysctl.service
       213ms dev-disk-by\x2duuid-1e7a8f7c\x2d038b\x2d43d8\x2db6f0\x2d111cf9ebe5d5.swap
       208ms systemd-binfmt.service
       195ms snap-snapd\x2ddesktop\x2dintegration-157.mount
       193ms apport-autoreport.service
       157ms lighttpd.service
       154ms systemd-timesyncd.service
       153ms systemd-journald.service
       151ms setvtrgb.service
       142ms snap-snapd\x2ddesktop\x2dintegration-178.mount
       121ms dev-hugepages.mount
       119ms dev-mqueue.mount
       118ms systemd-remount-fs.service
       117ms sys-kernel-debug.mount
       116ms sys-kernel-tracing.mount
       111ms <email address hidden>
       110ms kmod-static-nodes.service
       110ms <email address hidden>
       107ms <email address hidden>
        99ms alsa-restore.service
        60ms proc-sys-fs-binfmt_misc.mount
        52ms rtkit-daemon.service
        16ms user-runtime-dir@1000.service
        13ms dev-loop12.device
        11ms snap-chromium-2925.mount
        11ms dev-loop13.device
         9ms systemd-update-utmp-runlevel.service
         8ms snapd.socket
         7ms dev-loop16.device
         6ms dev-loop15.device
         3ms sys-kernel-config.mount
         3ms sys-fs-fuse-connections.mount
         2ms modprobe@efi_pstore.service
         2ms acct.service

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.9-0ubuntu2.2
ProcVersionSignature: Ubuntu 6.8.0-40.40~22.04.3-generic 6.8.12
Uname: Linux 6.8.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Aug 17 14:10:08 2024
DisplayManager: gdm3
RelatedPackageVersions: mutter-common 42.9-0ubuntu8
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tapas Kumar Sharma (synkan) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It looks like the main culprit is apt-daily-upgrade.service, so does that show up on every slow boot? Or does apt-daily-upgrade.service go away and only mysql.service is left as the main bottleneck?

affects: gnome-shell (Ubuntu) → apt (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please also try adding the 'fastboot' kernel parameter in case this is related to Plymouth waiting for some slow file system checks.

Changed in apt (Ubuntu):
status: New → Incomplete
Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Changed in plymouth (Ubuntu):
status: New → Incomplete
Revision history for this message
Julian Andres Klode (juliank) wrote :

apt-daily-upgrade.service has no Before= ordering constraints, hence it can't hold up the boot; the blame analysis is pretty much irrelevant - yes it starts at boot but that doesn't mean it needs to finish before you can login.

The question I have then is why run-snapd-ns-chromium.mnt.mount only starts at 2min 55.287s

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And why would we delay the login screen waiting for Chromium to be mounted? Surely that should only delay your ability to launch Chromium.

affects: mysql-8.0 (Ubuntu) → chromium (Ubuntu)
no longer affects: apt (Ubuntu)
Revision history for this message
Julian Andres Klode (juliank) wrote :

I believe all the snaps need to be fully mounted before all the local filesystems are considered "up", but then I am no expert. But this also looks like a confusing boot to me; there's a preload.service which we haven't used in ages, and then on the other hand it spends half a minute in snapd.seeded.service like it's a first boot.

Now I can't be sure, but this really smells to me like it's trying to boot of a spinning disk rather than an SSD and that seems entirely reasonable to take 2 minutes to boot with having installed a desktop, many different kinds of servers and whatnot that will all compete and cause the disk to spin all over.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That's also why I recommend trying the 'fastboot' kernel parameter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.