Painfully slow startup loading time

More than 40second of loading time and i would like to know if i can do something about it, i’m currently using manjaro 20.1, kernel 5.8.18, KDE plasma 5.20

I’ve a 8 core Intel i7 4770 (3.40GHz) and 16 gb of ram;

systemd-analyze print out this:

Startup finished in 2.131s (kernel) + 23.037s (userspace) = 25.168s 
graphical.target reached after 16.524s in userspace

systemmd blame:

11.659s linux-module-cleanup.service                                             
 8.986s NetworkManager-wait-online.service                                       
 6.803s snapd.service                                                            
 6.522s lvm2-monitor.service                                                     
 4.459s dev-sdb1.device                                                          
 4.093s polkit.service                                                           
 2.848s avahi-daemon.service                                                     
 2.844s NetworkManager.service                                                   
 2.830s systemd-logind.service                                                   
 1.678s apparmor.service                                                         
 1.646s ModemManager.service                                                     
 1.597s systemd-journal-flush.service                                            
  979ms tlp.service                                                              
  962ms org.cups.cupsd.service                                                   
  947ms ldconfig.service                                                         
  947ms systemd-sysusers.service                                                 
  888ms systemd-modules-load.service                                             
  616ms systemd-udevd.service                                                    
  590ms systemd-tmpfiles-setup-dev.service                                       
  560ms udisks2.service                                                          
  516ms systemd-random-seed.service                                              
  482ms modprobe@drm.service                                                     
  408ms upower.service                                                           
  387ms systemd-journald.service                                                 
  381ms systemd-udev-trigger.service                                             
  359ms wpa_supplicant.service                                                   
  282ms systemd-journal-catalog-update.service                                   
  234ms systemd-tmpfiles-setup.service                                           
  232ms user@1000.service                                                        
  210ms snapd.apparmor.service                                                   
  196ms systemd-sysctl.service                                                   
  161ms dev-hugepages.mount                                                      
  160ms dev-mqueue.mount                                                         
  160ms sys-kernel-debug.mount                                                   
  159ms sys-kernel-tracing.mount                                                 
  159ms kmod-static-nodes.service                                                
  156ms dev-disk-by\x2duuid-ebe13367\x2d2677\x2d4aaa\x2dacf7\x2d3e36346c18bc.swap
  133ms rtkit-daemon.service                                                     
  118ms systemd-binfmt.service                                                   
   88ms systemd-rfkill.service                                                   
   84ms systemd-user-sessions.service                                            
   53ms systemd-tmpfiles-clean.service                                           
   37ms systemd-remount-fs.service                                               
   31ms systemd-update-utmp.service                                              
   10ms systemd-update-done.service                                              
    8ms user-runtime-dir@1000.service                                            
    2ms tmp.mount                                                                
    1ms sys-fs-fuse-connections.mount                                            
    1ms sys-kernel-config.mount                                                  
    1ms proc-sys-fs-binfmt_misc.mount                                            
  483us snapd.socket

Howdy!

You can disable ModemManager.service by entering in a terminal: sudo systemctl disable ModemManager.service !

May I ask for the output of udevadm info --attribute-walk -n /dev/sda1 | grep 'DRIVERS=="[^"]' , please?

To you kind stranger:

$ udevadm info --attribute-walk -n /dev/sda1 | grep ‘DRIVERS=="[^"]’
DRIVERS==“sd”
DRIVERS==“ahci”

1 Like

Sweet! Thank you!
May now enter the following in a terminal:

sudo nano /etc/mkinitcpio.conf

Then find the line starting with MODULES=( and remove everything in between the parentheses, then add ahci sd_mod ext4 in between.

Next, find the line starting with BINARIES=( and once again, remove everything in between the parentheses. Thus, you can also add fsck fsck.ext4 if you prefer to quickly check the disk at startup.

Lets move on to the line starting with HOOKS=( , and remove everything, then add base autodetect .

After that, move completely to the bottom, and add

COMPRESSION="cat"

Hit ctrl+s then ctrl+x

You may now execute sudo mkinitcpio -P && sudo update-grub !

Reboot and voilà! :smile:

I was genuinely believing that i was about to destroy my installation lol

8.819s NetworkManager-wait-online.service                                       
6.154s snapd.service                                                            
4.756s systemd-modules-load.service                                             
4.716s lvm2-monitor.service                                                     
3.402s dev-sdb1.device                                                          
2.423s avahi-daemon.service                                                     
2.421s NetworkManager.service                                                   
2.341s systemd-logind.service                                                   
1.857s systemd-journal-flush.service                                            
1.528s apparmor.service                                                         
1.302s systemd-sysusers.service                                                 
1.281s tlp.service                                                              
1.259s ldconfig.service                                                         
 818ms udisks2.service                                                          
 567ms systemd-journal-catalog-update.service                                   
 554ms systemd-remount-fs.service                                               
 537ms systemd-udevd.service                                                    
 530ms systemd-random-seed.service                                              
 527ms wpa_supplicant.service                                                   
 463ms polkit.service                                                           
 422ms systemd-tmpfiles-setup.service                                           
 413ms upower.service                                                           
 381ms systemd-tmpfiles-setup-dev.service                                       
 327ms dev-disk-by\x2duuid-ebe13367\x2d2677\x2d4aaa\x2dacf7\x2d3e36346c18bc.swap
 307ms org.cups.cupsd.service
Startup finished in 2.106s (kernel) + 19.802s (userspace) = 21.909s  
graphical.target reached after 14.474s in userspace

We at least got rid of 2 and a half seconds ! :partying_face:

I’ve leaved two hooks in place, now i try to get rid of them

Ah no, i did it at the end. Is already pretty good to me. Thanks, pretty good job

Is your PC a laptop, may I ask?
May I also ask if you use snap packages?

I don’t use it and i will disable it. My computer is a desktop

May execute sudo systemctl disable tlp snapd !

Startup finished in 2.107s (kernel) + 18.790s (userspace) = 20.898s
graphical.target reached after 9.185s in userspace

1 Like

We can still go lower, but things becomes very complicated…

I think this is the best we may achieve!

Have a wonderful day!!

Thank you, next check i might consider to buy a couple of ssds after more than 4 years without upgrading my pc

1 Like

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