Slow boot time Fedora 42

Hi!

I’m very new in GNU/Linux world (so so new). I installed Fedora Workstation (42) in my Slimbook desktop. All runs smooth and I in love with Fedora and Gnome BUT I noticed the system takes so long to start up (and I don’t think is related to non capable hardware at all).

So, I write down here some details.
I have Fedora installed in a nvme ssd. Non Swap installation. BTRFS files system.

I’m adding below the outputs of:

systemd-analyze
systemd-analyze critical-chain
systemd-analyze blame

systemd-analyze

Startup finished in 31.951s (firmware) + 1.832s (loader) + 1.760s (kernel) + 5.124s (initrd) + 11.857s (userspace) = 52.526s 
graphical.target reached after 11.836s in userspace.

systemd-analyze critical-chain

graphical.target @11.836s
└─multi-user.target @11.836s
  └─plymouth-quit-wait.service @9.782s +2.052s
    └─systemd-user-sessions.service @9.773s +5ms
      └─remote-fs.target @9.760s
        └─remote-fs-pre.target @2.780s
          └─nfs-client.target @2.780s
            └─gssproxy.service @2.761s +19ms
              └─network.target @2.759s
                └─wpa_supplicant.service @2.738s +21ms
                  └─basic.target @1.638s
                    └─dbus-broker.service @1.604s +32ms
                      └─dbus.socket @1.597s
                        └─sysinit.target @1.595s
                          └─systemd-resolved.service @1.561s +33ms
                            └─systemd-tmpfiles-setup.service @1.430s +106ms
                              └─local-fs.target @1.427s
                                └─boot-efi.mount @1.396s +30ms
                                  └─systemd-fsck@dev-disk-by\x2duuid-0913\x2d4D0E.service @640ms +21ms
                                    └─dev-disk-by\x2duuid-0913\x2d4D0E.device

systemd-analyze --no-pager blame

7.022s NetworkManager-wait-online.service
5.188s sys-module-fuse.device
5.041s dev-tpm0.device
5.041s sys-devices-LNXSYSTM:00-LNXSYBUS:00-MSFT0101:00-tpm-tpm0.device
5.034s sys-devices-platform-serial8250-serial8250:0-serial8250:0.3-tty-ttyS3.device
5.034s dev-ttyS3.device
5.031s sys-devices-LNXSYSTM:00-LNXSYBUS:00-MSFT0101:00-tpmrm-tpmrm0.device
5.031s dev-tpmrm0.device
5.029s dev-ttyS2.device
5.029s sys-devices-platform-serial8250-serial8250:0-serial8250:0.2-tty-ttyS2.device
5.029s dev-ttyS1.device
5.029s sys-devices-platform-serial8250-serial8250:0-serial8250:0.1-tty-ttyS1.device
5.018s dev-ttyS0.device
5.018s sys-devices-pnp0-00:04-00:04:0-00:04:0.0-tty-ttyS0.device
5.017s sys-module-configfs.device
4.979s sys-subsystem-net-devices-eno1.device
4.979s sys-devices-pci0000:00-0000:00:02.1-0000:05:00.0-0000:06:0a.0-0000:0a:00.0-net-eno1.device
4.927s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart2.device
4.927s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-2.device
4.927s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4\x2dpart2.device
4.927s sys-devices-pci0000:00-0000:00:01.2-0000:04:00.0-nvme-nvme0-nvme0n1-nvme0n1p2.device
4.927s dev-disk-by\x2duuid-0c532d30\x2d0aed\x2d4e77\x2da2bd\x2d811dae1debbd.device
4.927s dev-nvme0n1p2.device
4.927s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dlabel-Raiz.device
4.927s dev-disk-by\x2dlabel-Raiz.device
4.927s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4_1\x2dpart2.device
4.927s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-83f1183e\x2d1739\x2d4a2f\x2d9e8f\x2d3413b33d0…
4.927s dev-disk-by\x2dpartuuid-83f1183e\x2d1739\x2d4a2f\x2d9e8f\x2d3413b33d07f4.device
4.927s dev-disk-by\x2did-nvme\x2deui.000000000000000000a07501ead0afe4\x2dpart2.device
4.927s dev-disk-by\x2ddiskseq-1\x2dpart2.device
4.927s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-0c532d30\x2d0aed\x2d4e77\x2da2bd\x2d811dae1debbd.…
4.926s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-0913\x2d4D0E.device
4.926s sys-devices-pci0000:00-0000:00:01.2-0000:04:00.0-nvme-nvme0-nvme0n1-nvme0n1p1.device
4.926s dev-disk-by\x2ddiskseq-1\x2dpart1.device
4.926s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart1.device
4.926s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4\x2dpart1.device
4.926s dev-disk-by\x2did-nvme\x2deui.000000000000000000a07501ead0afe4\x2dpart1.device
4.926s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartlabel-EFI\x5cx20System\x5cx20Partition.device
4.926s dev-disk-by\x2duuid-0913\x2d4D0E.device
4.926s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-1.device
4.926s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4_1\x2dpart1.device
4.926s dev-disk-by\x2dpartuuid-72dbeff9\x2d1b8f\x2d4041\x2d8a12\x2d87505a8d1a51.device
4.926s dev-disk-by\x2dpartlabel-EFI\x5cx20System\x5cx20Partition.device
4.926s dev-nvme0n1p1.device
4.926s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-72dbeff9\x2d1b8f\x2d4041\x2d8a12\x2d87505a8d1…
4.921s dev-disk-by\x2ddiskseq-1\x2dpart3.device
4.921s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-ed0c9f0a\x2dbd31\x2d4c04\x2da161\x2db83198833…
4.921s dev-nvme0n1p3.device
4.921s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-3.device
4.921s dev-disk-by\x2dpartuuid-ed0c9f0a\x2dbd31\x2d4c04\x2da161\x2db83198833d98.device
4.921s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart3.device
4.921s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4\x2dpart3.device
4.921s sys-devices-pci0000:00-0000:00:01.2-0000:04:00.0-nvme-nvme0-nvme0n1-nvme0n1p3.device
4.921s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4_1\x2dpart3.device
4.921s dev-disk-by\x2duuid-80261b39\x2d5580\x2d4070\x2da31a\x2da5e5ff24954e.device
4.921s dev-disk-by\x2did-nvme\x2deui.000000000000000000a07501ead0afe4\x2dpart3.device
4.921s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-80261b39\x2d5580\x2d4070\x2da31a\x2da5e5ff24954e.…
4.920s sys-devices-pci0000:00-0000:00:01.2-0000:04:00.0-nvme-nvme0-nvme0n1.device
4.920s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4_1.device
4.920s dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1.device
4.920s dev-disk-by\x2did-nvme\x2dCT1000E100SSD8_2452EAD0AFE4.device
4.920s dev-disk-by\x2did-nvme\x2deui.000000000000000000a07501ead0afe4.device
4.920s dev-nvme0n1.device
4.920s dev-disk-by\x2ddiskseq-1.device
4.250s dnf-makecache.service
2.052s plymouth-quit-wait.service
2.029s plocate-updatedb.service
 969ms fwupd.service
 547ms NetworkManager.service
 524ms initrd-switch-root.service
 457ms firewalld.service
 304ms dracut-initqueue.service
 218ms tuned.service
 151ms systemd-udev-trigger.service
 137ms abrtd.service
 116ms dracut-cmdline.service
 108ms upower.service
 106ms systemd-tmpfiles-setup.service
  94ms dracut-pre-udev.service
  91ms systemd-journal-flush.service
  86ms user@1000.service
  75ms systemd-vconsole-setup.service
  70ms udisks2.service
  68ms tuned-ppd.service
  67ms systemd-journald.service
  59ms systemd-tmpfiles-clean.service
  57ms passim.service
  56ms accounts-daemon.service
  56ms polkit.service
  56ms bluetooth.service
  54ms systemd-udevd.service
  54ms lvm2-monitor.service
  52ms systemd-hostnamed.service
  51ms ModemManager.service
  49ms systemd-tmpfiles-setup-dev-early.service
  49ms logrotate.service
  49ms chronyd.service
  46ms avahi-daemon.service
  45ms systemd-logind.service
  43ms colord.service
  42ms packagekit.service
  40ms plymouth-start.service
  39ms dracut-pre-trigger.service
  36ms systemd-tmpfiles-setup-dev.service
  35ms dev-zram0.swap
  35ms systemd-udev-load-credentials.service
  34ms flatpak-system-helper.service
  34ms systemd-remount-fs.service
  33ms sssd-kcm.service
  33ms systemd-resolved.service
  32ms dbus-broker.service
  30ms boot-efi.mount
  30ms rsyslog.service
  28ms dev-hugepages.mount
  28ms dev-mqueue.mount
  27ms sys-kernel-debug.mount
  27ms geoclue.service
  26ms sys-kernel-tracing.mount
  26ms auditd.service
  26ms dracut-pre-mount.service
  25ms switcheroo-control.service
  25ms dracut-pre-pivot.service
  24ms rtkit-daemon.service
  23ms systemd-oomd.service
  22ms home.mount
  21ms initrd-udevadm-cleanup-db.service
  21ms systemd-fsck@dev-disk-by\x2duuid-0913\x2d4D0E.service
  21ms wpa_supplicant.service
  20ms virtqemud.service
  20ms smartd.service
  20ms systemd-update-utmp-runlevel.service
  19ms plymouth-switch-root.service
  19ms modprobe@dm_mod.service
  19ms modprobe@efi_pstore.service
  19ms gssproxy.service
  18ms modprobe@loop.service
  18ms tmp.mount
  16ms systemd-userdbd.service
  16ms dracut-shutdown.service
  16ms uresourced.service
  15ms systemd-zram-setup@zram0.service
  15ms systemd-homed.service
  14ms rpc-statd-notify.service
  14ms user-runtime-dir@1000.service
  14ms plymouth-read-write.service
  14ms modprobe@configfs.service
  13ms audit-rules.service
  13ms systemd-sysctl.service
  13ms systemd-rfkill.service
  13ms cups.service
  13ms modprobe@fuse.service
  11ms kmod-static-nodes.service
  10ms initrd-cleanup.service
  10ms systemd-machined.service
  10ms sys-fs-fuse-connections.mount
   9ms initrd-parse-etc.service
   9ms modprobe@drm.service
   9ms systemd-fsck-root.service
   8ms thermald.service
   7ms systemd-sysusers.service
   7ms gdm.service
   7ms systemd-random-seed.service
   6ms systemd-modules-load.service
   5ms systemd-update-utmp.service
   5ms systemd-user-sessions.service
   4ms modprobe@sd_mod.service
  42us systemd-homed-activate.service

Please, note I’m inexperienced and so noob at Linux, barely know how to use command line, but I want to learn (step by step) and I want to know how to solve this problem.

Thank you in advance for your advice.

How many seconds does it actually take to boot up? (From your user perspective, I see the 52 second paste) 10, 20 seconds would be normal.

hello im new as well! I also noticed slow boot time, and for me it was snapd causing issues. apparently it slows down the start up. I used:

sudo dnf remove snapd

After removing snap I resrarted, sure enough, it solved the long boot up time. Hope it helps!!!

2 Likes

Hi Math,
I have this as result:

systemd-analyze
Startup finished in 17.364s (firmware) + 6.729s (loader) + 3.190s (kernel) + 4.016s (initrd) + 11.218s (userspace) = 42.519s 
graphical.target reached after 11.192s in userspace.

So double the max time you wrote. Is that really a feasible time? I never had that, no matter which distro, no matter which PC or laptop.

Just to check - as what is written is not always what happens - if you time it yourself, is startup time 42 seconds?
Yes 42 seconds is too slow.

I timed my Celeron IdeaPad with F41 - 23 seconds to login.

To get the same measurement, at what moment do you start timing and what is the moment you stop? I see several different measurements on the internet, that’s why I ask.

Pressed power on and stopwatch at the same time.
Quickly selected Kernel because it came up.
Stopped stopwatch at TTY where I enteted my username and password.

Logging in at that point is like half a second or immediate.

Starting Sway then takes maybe two seconds.

I think the 52 seconds is the reality in fact… =/

I’ll try, thank you!

Update: I tried and… Snapd is not installed :sweat_smile:

1 Like

Note that 32 seconds is spent in loading the firmware for the hardware (bios startup) so only 20 seconds is actually the software starting. That seems reasonable to me. More than half the startup time is the firmware.

But 32 seconds for firmware is very long, how could OP and others reduce that?

I also measured it and it takes 15 seconds already to get to the first info on screen saying I have a Lenovo Legion.
I click very fast on the kernel I want to use and as soon as the log-in is visible I stop at 41 seconds. So the time of 42 seconds, which systemd-analyze showed me, is pretty accurate, or I am accurate with systemd.
I hate the first 15 seconds, it is so long. I love having virtual machines which boot in a jiffy (well, a lot of jiffies)

I believe that a lot of the “firmware” time can be taken up with detecting and initialising USB devices.

As an experiment, maybe it’s worth unplugging any non-essential USB devices (probably don’t disconnect the keyboard :grinning_face:) to see if they are a source of the problem or not.

I tried, it could be that simple but… no =(
Thanks anyway

@JandeMus has a Lenovo Legion with long firmware boot time, what PC do you have, is it also a Lenovo?

Are there any firmware updates available?

Any settings in bios regarding boot time?

My desktop computer is a personalized desktop from Slimbook (Linux Friendly Spanish Brand). It has an Asus Motherboard.

All firmware updates installed already. Not any pending.
I tried to dive in BIOS settings and only see POST Delay, but is 3 seconds, it doesn’t seem the problem…

I’m thinking now if it’s a BIOS issue, I might try contacting Slimbook and talking with them :thinking:

1 Like

External devices (KVM, USB) may contribute to the “firmware” time. To check, try booting with the bare minimum of external devices. An old iMac with keyboard and mouse connected via a dumb USB2 hub and booting from a USB3 drive:
Startup finished in 1.004s (kernel) + 4.000s (initrd) + 12.066s (userspace) = 17.070s while my newest system with KVM, 2 monitors, and a USB V video adapter:
Startup finished in 15.128s (firmware) + 11.027s (loader) + 1.341s (kernel) + 47.032s (initrd) + 12.150s (userspace) = 1min 26.680s`

Scanning journalctl --no-hostname -b, there are usually multiple entries with the same timestamp, but there are some gaps of several seconds:

Aug 14 08:00:11 chronyd[1132]: Selected source 167.160.187.179 (2.fedora.pool.ntp.org)
Aug 14 08:00:15 kernel: xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
Aug 14 08:00:15 kernel: usb 1-5: device not accepting address 6, error -62
Aug 14 08:00:15 kernel: usb usb1-port5: unable to enumerate USB device
Aug 14 08:00:16 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=>
Aug 14 08:00:21 systemd[1]: systemd-rfkill.service: Deactivated successfully.
Aug 14 08:00:21 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=>
Aug 14 08:00:38 systemd[1]: systemd-localed.service: Deactivated successfully.
Aug 14 08:00:38 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=>
Aug 14 08:00:38 audit: BPF prog-id=96 op=UNLOAD
Aug 14 08:00:38 audit: BPF prog-id=95 op=UNLOAD
Aug 14 08:00:38 audit: BPF prog-id=94 op=UNLOAD
Aug 14 08:00:46 systemd[1]: systemd-hostnamed.service: Deactivated successfully.

ha!
i have a 9min 57.4s initrd segment right now on one laptop.
I think perhaps I did an update reboot last time or something.

Removing these 2 kernel cmdline arguments fixed the issue for me: rd.driver.blacklist=nouveau & modprobe.blacklist=nouveau

Try removing these from GRUB_CMDLINE_LINUX if they exist and see if that fix it: rd.driver.blacklist=nouveau & modprobe.blacklist=nouveau

sudo nano /etc/default/grub
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Here in my laptop this doesn’t make any difference. I also had the same boot time before I installed the Nvidia driver and added the 2 lines into Grub. My laptop uses a long time to wake up before anything happens, this is outside the OS.