Score:0

Ubuntu loads very slow? Please help me minimize

jp flag
 lucy@robus  ~  systemd-analyze blame
 1min 12.928s plymouth-quit-wait.service
 37.843s apport-autoreport.service
 31.695s snapd.service
 23.725s NetworkManager-wait-online.service
 20.722s udisks2.service
 19.978s networkd-dispatcher.service
 17.886s accounts-daemon.service
 15.202s apt-daily.service
 15.046s gpu-manager.service
 13.776s dev-sda7.device
 13.351s ModemManager.service
 12.504s dev-loop34.device
 12.238s dev-loop35.device
 12.238s dev-loop14.device
 11.545s dev-loop19.device
 11.472s dev-loop16.device
 11.470s dev-loop26.device
 11.469s dev-loop30.device
 11.466s dev-loop27.device
 11.446s dev-loop28.device
 11.338s dev-loop33.device
 11.133s dev-loop20.device
 11.128s dev-loop23.device
 11.124s dev-loop31.device
 10.801s polkit.service
 10.315s avahi-daemon.service
 10.205s power-profiles-daemon.service
 10.147s dev-loop29.device
 10.147s dev-loop29.device
 10.112s bluetooth.service
 10.061s dev-loop18.device
  9.933s NetworkManager.service
  9.683s dev-loop21.device
  9.626s dev-loop24.device
  9.190s dev-loop25.device
  9.142s dev-loop15.device
  8.891s dev-loop17.device
  8.805s dev-loop9.device
  8.645s switcheroo-control.service
  8.620s thermald.service
  8.618s systemd-logind.service
  8.615s dev-loop13.device
  8.542s dev-loop12.device
  8.497s wpa_supplicant.service
  8.175s cups.service
  8.171s dev-loop32.device
  8.009s systemd-rfkill.service
  7.702s dev-loop22.device
  7.448s dev-loop10.device
  7.069s dev-loop4.device
  6.903s update-notifier-download.service
  6.848s dev-loop8.device
  6.683s dev-loop2.device
  6.399s dev-loop3.device
  5.924s dev-loop11.device
  5.557s gdm.service
  5.115s dev-loop5.device
  3.894s dev-loop6.device
  3.780s resolvconf-pull-resolved.service
  3.737s secureboot-db.service
  3.637s dev-loop7.device
  3.637s apport.service
  3.463s dev-loop1.device
  3.399s rsyslog.service
  3.301s preload.service
  2.943s grub-common.service
  2.734s dev-loop0.device
  2.706s ondemand.service
  2.545s apparmor.service
  2.426s systemd-fsck@dev-disk-by\x2duuid-AA35\x2d4CC2.service
  2.407s snapd.apparmor.service
  2.348s snap-bare-5.mount
  2.328s snap-canonical\x2dlivepatch-216.mount
  2.289s snap-canonical\x2dlivepatch-229.mount
  2.202s snap-core-14946.mount
  2.173s snap-core-15419.mount
  2.085s snap-core18-2745.mount
  2.052s snap-core18-2785.mount
  1.986s systemd-resolved.service
  1.968s snap-core20-1891.mount
  1.945s snap-core20-1950.mount
  1.850s snap-core22-634.mount
  1.839s snap-core22-750.mount
  1.820s e2scrub_reap.service
  1.774s snap-firefox-2645.mount
  1.762s snap-firefox-2667.mount
  1.738s lm-sensors.service
  1.735s snap-gnome\x2d3\x2d26\x2d1604-104.mount
  1.681s snap-gnome\x2d3\x2d26\x2d1604-111.mount
  1.667s snap-gnome\x2d3\x2d28\x2d1804-194.mount
  1.608s snap-gnome\x2d3\x2d28\x2d1804-198.mount
  1.536s snap-gnome\x2d3\x2d34\x2d1804-90.mount
  1.513s systemd-tmpfiles-setup.service
  1.435s systemd-modules-load.service
  1.426s snap-gnome\x2d3\x2d34\x2d1804-93.mount
  1.415s networking.service
  1.327s snap-gnome\x2d3\x2d38\x2d2004-137.mount
  1.251s systemd-udevd.service
  1.203s snap-gnome\x2d3\x2d38\x2d2004-140.mount
  1.192s systemd-sysusers.service
  1.151s snap-gnome\x2d42\x2d2204-102.mount
  1.080s snap-gnome\x2d42\x2d2204-111.mount
  1.074s systemd-udev-trigger.service
  1.016s packagekit.service
   976ms snap-gnome\x2dsystem\x2dmonitor-181.mount
   970ms keyboard-setup.service
   963ms snap-gnome\x2dsystem\x2dmonitor-184.mount
   957ms systemd-random-seed.service
   920ms snap-gtk\x2dcommon\x2dthemes-1534.mount
   908ms snap-instagraph-76.mount
   905ms snap-gtk\x2dcommon\x2dthemes-1535.mount
   881ms snap-hunspell\x2ddictionaries\x2d1\x2d7\x2d2004-2.mount
   850ms rc.local.service
   796ms snap-telegram\x2ddesktop-4826.mount
   795ms snap-instagraph-86.mount
   788ms snap-qt551-42.mount
   785ms plymouth-start.service
   779ms snap-telegram\x2ddesktop-4762.mount
   738ms snap-ipfs-3709.mount
   737ms grub-initrd-fallback.service
   732ms snap-ipfs-3744.mount
   698ms snap-qt551-41.mount
   668ms systemd-tmpfiles-setup-dev.service
   635ms systemd-backlight@leds:dell::kbd_backlight.service
   595ms systemd-sysctl.service
   580ms [email protected]
   548ms snapd.seeded.service
   462ms ua-timer.service
   430ms systemd-timesyncd.service
   340ms systemd-journald.service
   322ms dns-clean.service
   308ms setvtrgb.service
   305ms dev-hugepages.mount
   305ms [email protected]
   304ms dev-mqueue.mount
   304ms sys-kernel-debug.mount
   303ms sys-kernel-tracing.mount
   292ms systemd-user-sessions.service
   283ms ufw.service
   283ms kmod-static-nodes.service
   281ms [email protected]
   278ms [email protected]
   908ms snap-instagraph-76.mount
   905ms snap-gtk\x2dcommon\x2dthemes-1535.mount
   881ms snap-hunspell\x2ddictionaries\x2d1\x2d7\x2d2004-2.mount
   850ms rc.local.service
   796ms snap-telegram\x2ddesktop-4826.mount
   795ms snap-instagraph-86.mount
   788ms snap-qt551-42.mount
   785ms plymouth-start.service
   779ms snap-telegram\x2ddesktop-4762.mount
   738ms snap-ipfs-3709.mount
   737ms grub-initrd-fallback.service
   732ms snap-ipfs-3744.mount
   698ms snap-qt551-41.mount
   668ms systemd-tmpfiles-setup-dev.service
   635ms systemd-backlight@leds:dell::kbd_backlight.service
   595ms systemd-sysctl.service
   580ms [email protected]
   548ms snapd.seeded.service
   462ms ua-timer.service
   430ms systemd-timesyncd.service
   340ms systemd-journald.service
   322ms dns-clean.service
   308ms setvtrgb.service
   305ms dev-hugepages.mount
   305ms [email protected]
   304ms dev-mqueue.mount
   304ms sys-kernel-debug.mount
   303ms sys-kernel-tracing.mount
   292ms systemd-user-sessions.service
   283ms ufw.service
   283ms kmod-static-nodes.service
   281ms [email protected]
   278ms [email protected]
   1.016s packagekit.service
   976ms snap-gnome\x2dsystem\x2dmonitor-181.mount
   970ms keyboard-setup.service
   963ms snap-gnome\x2dsystem\x2dmonitor-184.mount
   957ms systemd-random-seed.service
   920ms snap-gtk\x2dcommon\x2dthemes-1534.mount
   908ms snap-instagraph-76.mount
   905ms snap-gtk\x2dcommon\x2dthemes-1535.mount
   881ms snap-hunspell\x2ddictionaries\x2d1\x2d7\x2d2004-2.mount
   850ms rc.local.service
   796ms snap-telegram\x2ddesktop-4826.mount
   795ms snap-instagraph-86.mount
   788ms snap-qt551-42.mount
   785ms plymouth-start.service
   779ms snap-telegram\x2ddesktop-4762.mount
   738ms snap-ipfs-3709.mount
   737ms grub-initrd-fallback.service
   732ms snap-ipfs-3744.mount
   698ms snap-qt551-41.mount
   668ms systemd-tmpfiles-setup-dev.service
   635ms systemd-backlight@leds:dell::kbd_backlight.service
   595ms systemd-sysctl.service
   580ms [email protected]
   548ms snapd.seeded.service
   462ms ua-timer.service
   430ms systemd-timesyncd.service
   340ms systemd-journald.service
   322ms dns-clean.service
   308ms setvtrgb.service
   305ms dev-hugepages.mount
   305ms [email protected]
   304ms dev-mqueue.mount
   304ms sys-kernel-debug.mount
   303ms sys-kernel-tracing.mount
   292ms systemd-user-sessions.service
   283ms ufw.service
   283ms kmod-static-nodes.service
   281ms [email protected]
   278ms [email protected]
   273ms systemd-tmpfiles-clean.service
   236ms console-setup.service
   202ms ifupdown-pre.service
   199ms systemd-journal-flush.service
   192ms kerneloops.service
   177ms systemd-remount-fs.service
   176ms colord.service
   155ms bolt.service
   153ms systemd-backlight@backlight:intel_backlight.service
   151ms plymouth-read-write.service
   148ms boot-efi.mount
   144ms hddtemp.service
   102ms proc-sys-fs-binfmt_misc.mount
    98ms systemd-update-utmp.service
    90ms ltsp-client-core.service
    76ms upower.service
    59ms modprobe@chromeos_pstore.service
    43ms motd-news.service
    34ms var-snap-firefox-common-host\x2dhunspell.mount
    21ms [email protected]
    12ms alsa-restore.service
     6ms modprobe@efi_pstore.service
     6ms wicd.service
     6ms systemd-update-utmp-runlevel.service
     5ms ureadahead-stop.service
     5ms modprobe@pstore_blk.service
     3ms modprobe@pstore_zone.service
     3ms rtkit-daemon.service
     2ms [email protected]
     2ms sys-kernel-config.mount
     2ms sys-fs-fuse-connections.mount
   756us snapd.socket

What can be done to improve boot time? Thanks.

Update: This is what systemd-analyze critical-chain shows

graphical.target @2min 7.811s
└─multi-user.target @2min 7.811s
  └─plymouth-quit-wait.service @46.504s +1min 21.306s
    └─systemd-user-sessions.service @46.222s +280ms
      └─network.target @46.213s
        └─NetworkManager.service @34.940s +11.272s
          └─dbus.service @34.937s
            └─basic.target @34.716s
              └─sockets.target @34.716s
                └─snapd.socket @34.715s +1ms
                  └─sysinit.target @34.638s
                    └─snapd.apparmor.service @32.366s +2.271s
                      └─apparmor.service @29.640s +2.721s
                        └─local-fs.target @29.638s
                          └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @1min 12.113s
                            └─run-snapd-ns.mount @1min 10.620s
                              └─local-fs-pre.target @11.642s
                                └─systemd-tmpfiles-setup-dev.service @11.065s +576ms
                                  └─systemd-sysusers.service @9.951s +1.112s
                                    └─systemd-remount-fs.service @9.748s +200ms
                                      └─systemd-journald.socket @9.431s
                                        └─system.slice @9.427s
                                          └─-.slice @9.427s

This is my snap list

bare                  1.0                         5      latest/stable    canonical✓  base
canonical-livepatch   10.6.0                      235    latest/stable    canonical✓  -
core                  16-2.59.4                   15419  latest/stable    canonical✓  core
core18                20230530                    2785   latest/stable    canonical✓  base
core20                20230613                    1950   latest/stable    canonical✓  base
core22                20230612                    766    latest/stable    canonical✓  base
firefox               114.0.2-1                   2800   latest/stable    mozilla✓    -
gnome-3-26-1604       3.26.0.20221130             111    latest/stable/…  canonical✓  -
gnome-3-28-1804       3.28.0-19-g98f9e67.98f9e67  198    latest/stable    canonical✓  -
gnome-3-34-1804       0+git.3556cb3               93     latest/stable    canonical✓  -
gnome-3-38-2004       0+git.6f39565               140    latest/stable    canonical✓  -
gnome-42-2204         0+git.ff35a85               111    latest/stable    canonical✓  -
gnome-system-monitor  42.0                        184    latest/stable/…  canonical✓  -
gtk-common-themes     0.1-81-g442e511             1535   latest/stable/…  canonical✓  -
PonJar avatar
in flag
One to two minutes is not unusual if you have a HDD. An SSD is much quicker. The output of `systemd-analyze critical-chain` might show up something to work on.
user535733 avatar
cn flag
`23.725s NetworkManager-wait-online.service` Your system is taking almost 24 seconds to successfully connect to the network. Also looks like you experimented with wicd (`6ms wicd.service`), which suggests that network issues are not new to you...and that you perhaps have not fully cleaned up after previous experiments.
us flag
You can disable `NetworkManager-wait-online.service` with `sudo systemctl disable NetworkManager-wait-online.service`. You can also remove [snapd](https://askubuntu.com/a/1035917/124466) to speed up the computer. Most snap apps can be installed without snap.
Kuldeep bhatt avatar
jp flag
@user535733 The confusion arose from various versions being upgraded from 2015 onwards, from 14 LTS to 22 LTS. I am not sure what works well and what are the legacy dependencies. wicd has to be installed because, suddenly, there was an issue connecting the network after OS loading. After Ubuntu upgraded several times, I am unsure if older issues are sorted themselves and can revert to them.
Kuldeep bhatt avatar
jp flag
@ArchismanPanigrahi Problem with uninstalling snap is it has a core, core 18, core 20, core 22, and various versions of gnome. These are crucial dependencies. not sure how to replace them.
PonJar avatar
in flag
If you have upgraded all the way from 14.04 to 22.04 then I would recommend backing up your data, wiping your disk and reinstalling Ubuntu. I don’t have any recent experience of Ubuntu on an HDD but if that is what you are using then expect at least a minute boot time
us flag
@Kuldeepbhatt No, those are all backends for other snap apps, and not needed for the rest of the system. You can safely remove them if you don't need to use snap (most snap apps can be installed via APT)
Kuldeep bhatt avatar
jp flag
@ArchismanPanigrahi I edited the Snap list. Could you look at it and see whether I can directly uninstall Snap?
us flag
Yes. In case you want to use firefox after removing snap, see this answer https://askubuntu.com/questions/1399383/how-to-install-firefox-as-a-traditional-deb-package-without-snap-in-ubuntu-22/1404401#1404401 Otherwise, directly remove snap.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.