Even after removing Snap, Ubuntu still takes a lot of time to boot [duplicate]

Here is the log from systemd-analyze

Startup finished in 6.406s (firmware) + 4.794s (loader) + 4.066s (kernel) + 58.047s (userspace) = 1min 13.315s  graphical.target reached after 56.065s in userspace

And here is the log from systemd-analyze blame

36.965s plymouth-quit-wait.service                           
24.279s mysql.service                                        
11.620s networkd-dispatcher.service                          
10.769s fwupd.service                                        
 7.240s accounts-daemon.service                              
 6.498s udisks2.service                                      
 5.611s bolt.service                                         
 5.227s grub-common.service                                  
 5.013s dev-sda2.device                                      
 4.892s NetworkManager.service                               
 4.780s gpu-manager.service                                  
 4.717s polkit.service                                       
 3.899s avahi-daemon.service                                 
 3.894s bluetooth.service                                    
 3.843s upower.service                                       
 3.809s ModemManager.service                                 
 3.683s switcheroo-control.service                           
 3.669s thermald.service                                     
 3.666s systemd-logind.service                               
 3.639s wpa_supplicant.service                               
 3.602s systemd-resolved.service                             
 2.729s gdm.service                                          
 2.554s secureboot-db.service                                
 2.534s systemd-journal-flush.service                        
 2.392s systemd-tmpfiles-setup.service                       
 1.977s tlp.service                                          
 1.815s rsyslog.service                                      
 1.605s systemd-udevd.service                                
 1.503s apport.service                                       
 1.481s apparmor.service                                     
 1.272s systemd-random-seed.service                          
  956ms grub-initrd-fallback.service                         
  736ms ua-messaging.service                                 
  726ms systemd-sysusers.service                             
  695ms systemd-modules-load.service                         
  654ms keyboard-setup.service                               
  619ms systemd-fsck@dev-disk-by\x2duuid-8B77\x2d3D04.service
  602ms systemd-tmpfiles-setup-dev.service                   
  494ms systemd-journald.service                             
  482ms systemd-udev-trigger.service                         
  480ms swapfile.swap                                        
  455ms [email protected]                                 
  410ms systemd-timesyncd.service                            
  269ms systemd-backlight@backlight:intel_backlight.service  
  256ms dev-hugepages.mount                                  
  254ms dev-mqueue.mount                                     
  251ms sys-kernel-debug.mount                               
  249ms sys-kernel-tracing.mount                             
  244ms kmod-static-nodes.service                            
  228ms setvtrgb.service                                     
  227ms e2scrub_reap.service                                 
  225ms colord.service                                       
  217ms [email protected]                                    
  185ms boot-efi.mount                                       
  181ms openvpn.service                                      
  167ms console-setup.service                                
  151ms systemd-sysctl.service                               
  149ms systemd-update-utmp.service                          
  145ms ufw.service                                          
  140ms systemd-remount-fs.service                           
  135ms plymouth-start.service                               
   94ms systemd-user-sessions.service                        
   82ms pppd-dns.service                                     
   72ms kerneloops.service                                   
   66ms systemd-tmpfiles-clean.service                       
   36ms rtkit-daemon.service                                 
   27ms motd-news.service                                    
   18ms [email protected]                        
   12ms plymouth-read-write.service                          
   11ms sys-kernel-config.mount                              
   11ms sys-fs-fuse-connections.mount                        
    9ms systemd-update-utmp-runlevel.service                 
    8ms alsa-restore.service

Can anyone please help me with that since even after removing snap and snapd I still face the issue of high boot time. Thanks in advance.

OS Name and Type: Ubuntu 20.04.2 LTS x64 My Laptop: HP 250 G7 Notebook PC Processor: Intel® Core™ i3-7020U CPU @ 2.30GHz × 4 Graphics: Mesa Intel® HD Graphics 620 (KBL GT2)


Solution 1:

There is no single magic improvement you can make to your apparently-properly-working Ubuntu system. (You already demonstrated that)

Sometimes there is a misbehaving service or flaky hardware, but your output does not show that.

You can make incremental improvements with better hardware (replacing HDD with faster SSD).

You can make an incremental improvement by testing your hardware for compatibility with hibernation (like the Windows FastBoot experience). Not all hardware is compatible with Linux hibernation, so it's disabled by default in Ubuntu. But it's trivial to enable. Of course, you can also just leave your system running (or sleep-to-RAM if portable), too.

You can make incremental improvements by reducing the complexity of your system. Your output shows a mixture of typical Server tasks (networkd, mysql) and typical Desktop tasks (NetworkManager, udisks2).