Score:0

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

in flag

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)

user535733 avatar
cn flag
Seems like you have demonstrated that snapd was not really the problem...if there is a problem. How long is too long? Ten years ago, a 2.5 minute boot was considered reasonable. You seem to be at 1.5 minutes.
Irsu85 avatar
cn flag
If you have a hard drive, please go to a local computer store and ask if you can get an ssd.
user535733 avatar
cn flag
`networkd-dispatcher.service` seems suspicious to me, since NetworkManager has its own dispatcher. Unless this system is actually Ubuntu Server with a GUI bolted on top without fixing the networking.
Tanmay avatar
in flag
@user535733 Yes but still 1min 13 sec seems to be still to long as comared to my laptop with windows installed. Altough I think of the `networkd-dispatcher.service`.
Tanmay avatar
in flag
@Irsu85 Ya I thought of replacing my hdd with and ssd but cause I have seen in other posts that boot time is terrible in ssd and hdd as well
user535733 avatar
cn flag
Oh, now it makes sense - you are comparing to Windows. Your question did not mention that. Windows works very differently, and close comparisons can be misleading. Try disabing Windows FastBoot (a form of hibernate-instead-of-shutdown), and you will likely find both systems' boot times to be comparable.
Score:1
cn flag

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).

Tanmay avatar
in flag
Ya I think I should so with an ssd. Altough mysql is something which i do require can you please help me with removing networkd network manager udisks2 since I did not install them. I don't know if they are required for the functioning of disks and with bluetooth and wifi. Please help me with that!
user535733 avatar
cn flag
No, sorry: AskUbuntu is a question/answer format. Either pick a single, answerable topic and open a new Question, or seek more individualized help in our peer site Ubuntuforums.org.
Tanmay avatar
in flag
Ok Sure Thank You
Tanmay avatar
in flag
Here is the question:https://askubuntu.com/questions/1355058/stop-unnecessary-service-from-booting-with-ubuntu
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.