4

My ubuntu system is taking over a minute to boot up. I have checked systemd-analyze and it is the userspace that is taking this much time alone. I have already checked other similar problems on askubuntu and else but nothing has worked. I have disabled wayland but to no effect.

$ systemd-analyze
Startup finished in 3.924s (firmware) + 4.194s (loader) + 4.731s (kernel) + 1min 3.616s 
(userspace) = 1min 16.466s 
graphical.target reached after 1min 2.908s in userspace

This time it is little fast (usually it takes 1min 30-40s).

$ systemd-analyze blame
30.726s plymouth-quit-wait.service                           
18.379s systemd-journal-flush.service                        
13.680s networkd-dispatcher.service                          
8.956s udisks2.service                                      
7.800s dev-sda5.device                                      
7.009s libvirtd.service                                     
6.799s accounts-daemon.service                              
6.638s NetworkManager.service                               
5.179s polkit.service                                       
4.520s avahi-daemon.service                                 
4.433s ModemManager.service                                 
4.237s gpu-manager.service                                  
4.105s switcheroo-control.service                           
4.093s thermald.service                                     
4.083s wpa_supplicant.service                               
4.078s systemd-logind.service                               
4.071s systemd-machined.service                             
3.682s systemd-fsck@dev-disk-by\x2duuid-6CF4\x2dF74D.service
3.478s rsyslog.service                                      
3.396s systemd-resolved.service                             
2.933s apport.service                                       
2.679s grub-common.service                                  
2.250s gdm.service                                          
1.829s e2scrub_reap.service                                 
1.776s apparmor.service                                     
1.510s systemd-tmpfiles-setup.service                       
1.508s systemd-backlight@backlight:intel_backlight.service  
1.489s media-avatar\x2dhiro-Data.mount                      
1.452s systemd-udevd.service 

Here it is mentioned plymouth-quit-wait.service is not the main culprit. and I have checked and configured the systemd-journal-flush.service from here. There are no external peripherials connected (I am on laptop). I am on the end of my rope.

P.S. I have installed Ubuntu 20.04 couple of months ago on the same machine and it worked great. Then I moved to windows temporarily. I moved to Ubuntu 20.04 as my primary os last week and this problem comes up for the first time.

Edit 2: After, sudo gedit /etc/default/grub and remove everything from GRUB_CMDLINE_LINUX_DEFAULT="" as kannzzmm2 suggested, bootup time has improved

avatar-hiro@Laptop-Ubuntu:~$ systemd-analyze
Startup finished in 3.890s (firmware) + 4.390s (loader) + 5.362s (kernel) + 32.779s (userspace) = 46.423s 
graphical.target reached after 31.152s in userspace
avatar-hiro@Laptop-Ubuntu:~$ sudo systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @31.152s └─multi-user.target @31.151s └─libvirt-guests.service @30.830s +319ms └─libvirtd.service @24.991s +5.831s └─network.target @24.782s └─NetworkManager.service @19.516s +5.263s └─dbus.service @19.509s └─basic.target @19.408s └─sockets.target @19.407s └─libvirtd-ro.socket @19.405s └─libvirtd.socket @19.381s +20ms └─sysinit.target @19.116s └─systemd-timesyncd.service @18.669s +445ms └─systemd-tmpfiles-setup.service @17.107s +1.538s └─systemd-journal-flush.service @3.895s +13.209s └─systemd-remount-fs.service @3.579s +291ms └─systemd-journald.socket @3.320s └─-.mount @3.266s └─system.slice @3.266s └─-.slice @3.266s

Hiro
  • 123

2 Answers2

1

I had this same problem after doing a windows reinstall on a machine with Ubuntu 24.04. The solution was to get a virtual terminal by pressing Ctrl+alt+f6, logging in, then editing the fstab by removing all NTFS volumes from it

0

Lol its an old question, but I just learned about this command recently, and wanted to share. You can analize your boot process by looking at a picture of it using this command:

systemd-analyze plot > boot.svg

then look at the image with your favorite image viewer. You might have to zoom in a lot to see all the processes, but the way its laid out is that the longer , darker red lines are indicating processes taking a longer amount of time to load.

You could try reducing the number of processes running on boot, or simply try to eliminate the processes that take the longest amount of time to load.

j0h
  • 15,365