Need help speeding up boot time

My laptop take more than 2 minutes to boot.
Here is my output for systemd-analyze blame

2min 109ms systemd-networkd-wait-online.service
14.146s systemd-journal-flush.service

11.860s lvm2-monitor.service

11.118s dev-sda2.device

10.439s NetworkManager-wait-online.service

8.686s firewalld.service              
7.038s snapd.service            
6.998s polkit.service                       
5.334s tor.service                                  
5.067s udisks2.service                            
4.662s avahi-daemon.service                  
4.659s bluetooth.service                           
4.439s systemd-logind.service                    
4.433s systemd-machined.service             
4.151s systemd-sysusers.service              
4.078s ldconfig.service                             
2.847s systemd-udevd.service                   
2.598s upower.service                            
2.528s teamviewerd.service                   
2.342s apparmor.service                          
2.077s dev-loop4.device                  
1.682s tlp.service                                        
1.623s ModemManager.service                 
1.420s dev-loop1.device                               
1.246s NetworkManager.service                  
 943ms tmp.mount                                        
 780ms dev-loop0.device                  
 720ms var-lib-snapd-snap-core18-1932.mount   
 705ms systemd-modules-load.service         
 699ms user@1000.service               
 651ms snapd.apparmor.service           
 647ms systemd-networkd.service          
 608ms wpa_supplicant.service                
 576ms var-lib-snapd-snap-snapd-10707.mount                                     

 518ms var-lib-snapd-snap-core-10583.mount     
 439ms dev-loop3.device                             
 406ms systemd-tmpfiles-setup.service        
 396ms systemd-tmpfiles-setup-dev.service   
 356ms modprobe@drm.service `

I’m also using haveged.
What can I do to speedup boottime?

you can stop this one

sudo systemctl mask  lvm2-monitor.service

check with smart your disk
11.118s dev-sda2.device

  • snapd.service – disable if you don’t use snap
  • tor.service – if you don’t use tor
  • bluetooth.service – if you don’t use bluetooth
  • teamviewerd.service – if you don’t use TeamViewer
  • tlp.service – if you don’t want to save your battery

NetworkManager-wait-online.service can probably be disabled.

It’s rather systemd-networkd-wait-online.service, isn’t it?

@Chrysostomus, @openminded it depends on what is used NetworkManager or systemd-networkd. Both enabled at same time may cause problems with network so one of them should be disabled.

What do you mean by smart your disk?
And what the mask does?

I manually enabled systemd-networkd for configuring network with anbox which I don’t use anymore.
So should I disable the systemd-networkd and will it automatically disable the systemd-networkd-wait-online.service?

What about the systemd-journal-flush.service ?
It takes more than 14s.

Don’t know but probably yes. If not you can always disable manually.

Don’t know I would leave it as it is.

Can you post your hardware information ?

It might be a large log to go through, you can set a max size or time period, check this if the size this command reports is to high: journalctl --disk-usage

You want systemd to flush the journal for you.

Yes. Using both at the same time is not a good idea.