Want advises to optimize boot time

Hello everyone. I want to ask advises to improve my boot time. Now, I still using HDD because my pocket issue. But, I curious how to improve boot speed and startup time in Fedora 36 without my system get problem. My specification explained in my neofetch.

[anifyuli@x441uv ~]$ neofetch
             .',;::::;,'.                anifyuli@x441uv 
         .';:cccccccccccc:;,.            --------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 36 (Workstation Edition) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: X441UV 1.0 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.19.8-200.fc36.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 25 mins 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2135 (rpm) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: bash 5.1.16 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1366x768 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 42.4 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: adw-gtk3-dark [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Papirus-Dark [GTK2/3] 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: gnome-terminal 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: Intel i3-6006U (4) @ 2.000GHz 
:cccccccccccccccccccccccccccc:'.         GPU: Intel Skylake GT2 [HD Graphics 520] 
.:cccccccccccccccccccccc:;,..            GPU: NVIDIA GeForce 920MX 
  '::cccccccccccccc::;,.                 Memory: 3055MiB / 11864MiB 

I attach additional description from systemd-analyze blame in below text

[anifyuli@x441uv ~]$ systemd-analyze blame
1min 38.572s plymouth-quit-wait.service
1min 18.555s akmods.service
     50.367s dkms.service
     33.634s firewalld.service
     27.592s udisks2.service
     26.408s power-profiles-daemon.service
     26.023s polkit.service
     26.020s accounts-daemon.service
     14.327s lvm2-monitor.service
     12.630s packagekit.service
     10.018s systemd-journal-flush.service
      8.871s NetworkManager-wait-online.service
      8.647s initrd-switch-root.service
      8.079s systemd-udevd.service
      6.754s abrtd.service
      5.657s ModemManager.service
      4.824s thermald.service
      3.915s sssd-kcm.service
      3.738s nvidia-powerd.service
      3.189s chronyd.service
      2.619s upower.service
      2.353s avahi-daemon.service
      2.276s rtkit-daemon.service
      2.269s switcheroo-control.service
      2.257s systemd-logind.service
      2.252s systemd-machined.service
      1.977s systemd-tmpfiles-setup-dev.service
      1.866s dbus-broker.service
      1.691s systemd-boot-update.service
      1.399s uresourced.service
      1.399s gssproxy.service
      1.290s lm_sensors.service
      1.264s plymouth-switch-root.service
      1.216s systemd-zram-setup@zram0.service
      1.189s preload.service
      1.131s dracut-initqueue.service
      1.113s cups.service
      1.065s import-state.service
       941ms user@1000.service
       864ms virtlxcd.service
       830ms bluetooth.service
       822ms auditd.service
       807ms colord.service
       802ms systemd-fsck@dev-disk-by\x2duuid-72A4\x2dE7A5.service
       799ms virtqemud.service
       763ms systemd-tmpfiles-setup.service
       725ms systemd-resolved.service
       688ms systemd-fsck@dev-disk-by\x2duuid-20e09d44\x2d5936\x2d47f5\x2d9fd6\x2d8c131f612630.service
       592ms livesys-late.service
       577ms systemd-sysctl.service
       567ms NetworkManager.service
       457ms vboxdrv.service
       453ms systemd-udev-trigger.service
       413ms systemd-oomd.service
       388ms systemd-user-sessions.service
       379ms systemd-random-seed.service
       379ms var-lib-nfs-rpc_pipefs.mount
       360ms boot.mount
       349ms rpc-statd-notify.service
       336ms home.mount
       226ms gdm.service
       216ms initrd-parse-etc.service
       207ms nfs-convert.service
       206ms plymouth-read-write.service
       202ms dracut-shutdown.service
       200ms systemd-network-generator.service
       183ms systemd-modules-load.service
       182ms dev-zram0.swap
       171ms systemd-journald.service
       158ms systemd-fsck-root.service
       141ms livesys.service
       138ms wpa_supplicant.service
       134ms boot-efi.mount
       119ms systemd-userdbd.service
       118ms systemd-vconsole-setup.service
       114ms initrd-cleanup.service
        96ms dracut-cmdline.service
        88ms systemd-backlight@backlight:intel_backlight.service
        80ms systemd-update-utmp.service
        73ms dev-hugepages.mount
        71ms systemd-remount-fs.service
        69ms dracut-pre-pivot.service
        68ms dev-mqueue.mount
        66ms modprobe@drm.service
        63ms sys-kernel-debug.mount
        62ms kmod-static-nodes.service
        58ms sys-kernel-tracing.mount
        51ms systemd-rfkill.service
        48ms dracut-pre-udev.service
        40ms initrd-udevadm-cleanup-db.service
        35ms user-runtime-dir@1000.service
        33ms systemd-sysusers.service
        32ms plymouth-start.service
        17ms sys-fs-fuse-connections.mount
        15ms systemd-update-utmp-runlevel.service
        14ms sys-kernel-config.mount
        13ms \x2esnapshots.mount
         8ms modprobe@configfs.service
         6ms tmp.mount
         6ms modprobe@fuse.service

Thanks for your advises everyone. I wish you all always get blessing from God

The only two items that are taking more than 33 seconds are dkms and akmods. You really do not want to mess with those since they are related to building the needed kernel modules for proper operation.

I don’t see anything that is of concern in the speed of booting, and would guess the next time you boot it will go faster since the modules will already have been built.

If you don’t need Gnome software and autoupdates because you do everything in the console with dnf anyway, you don’t need PackageKit.
This could save 12 seconds.

Otherwise, I think the boot time is also quite good for a rotating magnetic disk.

systemd-analyze blame “prints a list of all running units, ordered by the time they took to initialize.” That doesn’t necessarily mean they are slowing down your boot time, as one service might be waiting for another, which is still counted in this time. An example is akmods which is almost certainly waiting for dkms.

You may instead/also want to look at systemd-analyze critical-chain which shows a tree of times.

But that is also warned to perhaps be misleading. See the caveats in the man page.

That is not the case. akmods and dkms can run in parallel and does not wait on each other. At most they will be waiting for disk IO. If there are no modules to be built, both services finishes very quickly.

Run systemctl status dkms akmods and see how long time they actually took. If they consistently take a long time, you have a serious problem with one of your kernel modules.

Oops, I left out a not there. What I meant i that you can’t take the 1.5 minute from one and 1 minute from the other and say they collectively took up 2.5 minutes of the boot time.

So, if I disable dkms and akmods how my system free from crashes? Sorry I open my account in this afternoon

This thread is about boot time and not related to crashes.

However, your conclusion would certainly not be wise.

Those tools only check if the modules have been built with most boots and take a few (milli)seconds. They only take a longer time when it is necessary to rebuild needed modules for the kernel.

Without those tools your system would break when a kernel is updated.

How did you make that conclusion?

I say that statement from member in Fedora user Telegram group from my country do that to speed up boot time and he said it’s not make a sense from crashing system and safe to disable akmods and dkms. I think it dangerous if applied that steps to speed up boot time. Sorry it’s not my conclusion with full of awareness

akmods and dkms are responsible for handling of at least your proprietary Nvidia GPU driver (did your wifi card also require installation of some driver?), disabling them without properly uninstalling that driver will brake your system. You could try switching to much lighter open source nouveau driver if you’re not using nvidia GPU - https://rpmfusion.org/Howto/NVIDIA#Uninstall_the_NVIDIA_driver

Apart from that, you could get rid of PackageKit, like @mustermann wrote, and ModemManager, if you don’t need it.
After that see how systemd-analyze critical-chain changes.

I have Nvidia GPU, but my WiFi card is regular Atheros, so don’t need to kernel modules except my GPU. I not do that because it’s not serious problem. I wish my speed boot better after have a SSD and clone my system to new SSD