Slow startup of services

Hello. I have problems with long startup. After login screen the screen is black and unresponsive (almost; can trigger yakuake) for 30 seconds. I already looked for solutions and disabled services like ModemManager, lvm2 and Network-Online. I need smb for shares but I don't really need any of services before my desktop is responsive. Is there any way to shorten the loading time or to make system responsive before loading of all services?

systemctl list-dependencies

default.target
● ├─sddm.service
● └─multi-user.target
●   ├─avahi-daemon.service
●   ├─cronie.service
●   ├─dbus.service
●   ├─haveged.service
●   ├─man-db.timer
●   ├─NetworkManager.service
●   ├─nfs-server.service
●   ├─org.cups.cupsd.path
●   ├─pamac-cleancache.timer
●   ├─pamac-mirrorlist.timer
●   ├─rpcbind.service
●   ├─smb.service
●   ├─systemd-ask-password-wall.path
●   ├─systemd-logind.service
●   ├─systemd-user-sessions.service
●   ├─tlp.service
●   ├─ufw.service
●   ├─updatedb.timer
●   ├─basic.target
●   │ ├─-.mount
●   │ ├─tmp.mount
●   │ ├─paths.target
●   │ ├─slices.target
●   │ │ ├─-.slice
●   │ │ └─system.slice
●   │ ├─sockets.target
●   │ │ ├─avahi-daemon.socket
●   │ │ ├─dbus.socket
●   │ │ ├─dm-event.socket
●   │ │ ├─org.cups.cupsd.socket
●   │ │ ├─systemd-coredump.socket
●   │ │ ├─systemd-initctl.socket
●   │ │ ├─systemd-journald-audit.socket
●   │ │ ├─systemd-journald-dev-log.socket
●   │ │ ├─systemd-journald.socket
●   │ │ ├─systemd-udevd-control.socket
●   │ │ └─systemd-udevd-kernel.socket
●   │ ├─sysinit.target
●   │ │ ├─dev-hugepages.mount
●   │ │ ├─dev-mqueue.mount
●   │ │ ├─grub-boot-indeterminate.service
●   │ │ ├─kmod-static-nodes.service
●   │ │ ├─ldconfig.service
●   │ │ ├─lvm2-lvmetad.socket
●   │ │ ├─lvm2-lvmpolld.socket
●   │ │ ├─lvm2-monitor.service
●   │ │ ├─proc-sys-fs-binfmt_misc.automount
●   │ │ ├─sys-fs-fuse-connections.mount
●   │ │ ├─sys-kernel-config.mount
●   │ │ ├─sys-kernel-debug.mount
●   │ │ ├─systemd-ask-password-console.path
●   │ │ ├─systemd-binfmt.service
●   │ │ ├─systemd-firstboot.service
●   │ │ ├─systemd-hwdb-update.service
●   │ │ ├─systemd-journal-catalog-update.service
●   │ │ ├─systemd-journal-flush.service
●   │ │ ├─systemd-journald.service
●   │ │ ├─systemd-machine-id-commit.service
●   │ │ ├─systemd-modules-load.service
●   │ │ ├─systemd-random-seed.service
●   │ │ ├─systemd-sysctl.service
●   │ │ ├─systemd-sysusers.service
●   │ │ ├─systemd-timesyncd.service
●   │ │ ├─systemd-tmpfiles-setup-dev.service
●   │ │ ├─systemd-tmpfiles-setup.service
●   │ │ ├─systemd-udev-trigger.service
●   │ │ ├─systemd-udevd.service
●   │ │ ├─systemd-update-done.service
●   │ │ ├─systemd-update-utmp.service
●   │ │ ├─cryptsetup.target
●   │ │ ├─local-fs.target
●   │ │ │ ├─-.mount
●   │ │ │ ├─boot-efi.mount
●   │ │ │ ├─home.mount
●   │ │ │ ├─media-Files.automount
●   │ │ │ ├─systemd-fsck-root.service
●   │ │ │ ├─systemd-remount-fs.service
●   │ │ │ └─tmp.mount
●   │ │ └─swap.target
●   │ │   └─dev-disk-by\x2duuid-776f91bb\x2d5268\x2d4fe5\x2d8e5c\x2da28696d24a4a.…
●   │ └─timers.target
●   │   ├─logrotate.timer
●   │   ├─shadow.timer
●   │   └─systemd-tmpfiles-clean.timer
●   ├─getty.target
●   │ └─getty@tty1.service
●   └─remote-fs.target
●     └─var-lib-machines.mount

systemd-analyze blame

          7.577s media-Files.mount
          5.955s smb.service
          4.905s dev-sda3.device
          3.281s systemd-journal-flush.service
          3.139s systemd-modules-load.service
          3.086s polkit.service
          2.253s systemd-udevd.service
          1.621s avahi-daemon.service
          1.545s grub-boot-indeterminate.service
          1.545s bluetooth.service
          1.543s NetworkManager.service
          1.542s gssproxy.service
          1.540s systemd-logind.service
          1.424s systemd-fsck@dev-disk-by\x2duuid-F299\x2dF6C0.service
          1.207s systemd-fsck@dev-disk-by\x2duuid-1c86eaa0\x2dd336\x2d4fdd\x2da6e3\x2de2e4d1f609e3.service
          1.015s proc-fs-nfsd.mount
           990ms systemd-tmpfiles-setup-dev.service
           756ms rpcbind.service
           673ms org.cups.cupsd.service
           671ms tlp.service
           457ms wpa_supplicant.service
           439ms dev-disk-by\x2duuid-776f91bb\x2d5268\x2d4fe5\x2d8e5c\x2da28696d24a4a.swap
           405ms udisks2.service
           349ms systemd-timesyncd.service
           291ms systemd-binfmt.service
           274ms nfs-server.service
           248ms sys-kernel-debug.mount
           225ms upower.service
           210ms systemd-remount-fs.service
           208ms dev-hugepages.mount
           207ms dev-mqueue.mount
           192ms ufw.service
           190ms boot-efi.mount
           186ms rpc-statd.service
           185ms nfs-idmapd.service
           168ms systemd-tmpfiles-setup.service
           165ms proc-sys-fs-binfmt_misc.mount
           165ms systemd-sysctl.service
           164ms systemd-random-seed.service
           137ms systemd-udev-trigger.service
           135ms systemd-update-utmp.service
           121ms systemd-journald.service
           114ms haveged.service
           110ms systemd-tmpfiles-clean.service
            99ms kmod-static-nodes.service
            76ms nfs-mountd.service
            65ms systemd-rfkill.service
            41ms rpc-statd-notify.service
            36ms user@1000.service
            32ms rtkit-daemon.service
            22ms var-lib-nfs-rpc_pipefs.mount
            22ms systemd-user-sessions.service
            20ms home.mount
            19ms sys-kernel-config.mount
             1ms sys-fs-fuse-connections.mount
             1ms tmp.mount

systemd-analyze critical-chain

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 @16.843s
└─multi-user.target @16.842s
  └─smb.service @10.886s +5.955s
    └─network-online.target @10.885s
      └─network.target @10.885s
        └─wpa_supplicant.service @13.070s +457ms
          └─basic.target @9.339s
            └─sockets.target @9.339s
              └─org.cups.cupsd.socket @9.339s
                └─sysinit.target @9.338s
                  └─systemd-timesyncd.service @8.988s +349ms
                    └─systemd-tmpfiles-setup.service @8.771s +168ms
                      └─local-fs.target @8.769s
                        └─home.mount @8.748s +20ms
                          └─systemd-fsck@dev-disk-by\x2duuid-1c86eaa0\x2dd336\x2d4fdd\x2da6e3\x2de2e4d1f609e3.service @7.534s +1.207s
                            └─dev-disk-by\x2duuid-1c86eaa0\x2dd336\x2d4fdd\x2da6e3\x2de2e4d1f609e3.device @7.534s

journalctl -xb
journalctl.log

There is nothing you can do other can connect using a cable.

That alone will cut 13s


The smb.service takes 10s 6s, the shares you need - are they hosted on your system or you need to access shares hosted on another system?

If they are hosted on another system then you don't need samba server running but can instead install the packages gvfs-smb and smbclient.

You also have cups running - you do print? Otherwise disable and remove cups.

EDIT:
I think I am reading this completely wrong. The whole process is taken 16s from disk mount to graphical target.

1 Like

What you can do, although it's a little time consuming, is to go step by step through the output of journalctl -b -o short-precise which gives exact time stamps, and allows you to see which process takes how much time.
For kernel log only, you can also use dmesg -HL which gives relative time indication (e.g. +0.524563 seconds compared to the previous entry).

1 Like

I have everything in my local network connected with cables through a single router. I disabled smb.service as I have a share only on my local NAS and don't need to have a share on my own.

Tried to look through logs but found nothing substantial. In the end, I re-installed system on SSD and now it is super-fast.

1.950s (kernel) + 1.645s (userspace)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by