0

I have attached the output of systemd-analyze showing that it takes roughly 1m 50s to startup my PC. On top of this my applications open very slowly (Chrome, Klyaout, MATLAB etc.). I am not highly technical and if more digging is required for an answer please also let me know.

:~$ systemd-analyze 
Startup finished in 30.147s (firmware) + 13.579s (loader) + 3.658s (kernel) + 1min 3.422s (userspace) = 1min 50.807s 
graphical.target reached after 1min 3.378s in userspace

I have read some things about amd-ryzen and nvidia (which I have) but I had these on 18.04 and it was fine and I can't say whether these things are/aren't causing me issues.

I have now added the result of systemd-analyze blame:

35.298s plymouth-quit-wait.service                           
21.787s man-db.service                                       
16.798s networkd-dispatcher.service                          
13.833s systemd-journal-flush.service                        
13.442s snapd.service                                        
11.710s udisks2.service                                      
11.560s dev-sdb5.device                                      
 9.847s logrotate.service                                    
 9.765s NetworkManager-wait-online.service                   
 8.394s accounts-daemon.service                              
 8.199s polkit.service                                       
 7.343s avahi-daemon.service                                 
 7.341s bluetooth.service                                    
 7.332s NetworkManager.service                               
 7.301s switcheroo-control.service                           
 7.297s thermald.service                                     
 7.297s systemd-logind.service                               
 7.295s wpa_supplicant.service                               
 5.014s dev-loop8.device                                     
 4.691s dev-loop3.device                                     
 4.154s dev-loop13.device                                    
 4.001s dev-loop7.device                                     
 3.941s dev-loop11.device                                    
 3.904s grub-common.service                                  
 3.903s dev-loop10.device                                    
 3.858s apport.service                                       
 3.857s dev-loop12.device                                    
 3.725s dev-loop14.device                                    
 3.672s gpu-manager.service                                  
 3.651s ModemManager.service                                 
 3.639s dev-loop9.device                                     
 3.529s dev-loop1.device                                     
 3.497s dev-loop0.device                                     
 3.433s dev-loop5.device                                     
 3.409s dev-loop6.device                                     
 3.223s dev-loop2.device                                     
 3.199s dev-loop4.device                                     
 2.837s systemd-fsck@dev-disk-by\x2duuid-0CFC\x2dE96E.service
 2.799s user@125.service                                     
 2.691s fwupd.service                                        
 2.537s gdm.service                                          
 2.367s systemd-resolved.service                             
 1.953s rsyslog.service                                      
 1.723s systemd-udevd.service                                
 1.701s plymouth-start.service                               
 1.676s e2scrub_reap.service                                 
 1.612s grub-initrd-fallback.service                         
 1.604s fwupd-refresh.service                                
 1.406s apparmor.service                                     
 1.131s systemd-sysctl.service                               
  813ms systemd-modules-load.service                         
  812ms snap-core18-1932.mount                               
  696ms snap-gnome\x2d3\x2d28\x2d1804-128.mount              
  667ms snap-snap\x2dstore-481.mount                         
  657ms snap-core-10126.mount
619ms snap-core-10185.mount                                
  602ms pppd-dns.service                                     
  596ms snap-snap\x2dstore-467.mount                         
  562ms snapd.apparmor.service                               
  550ms nvidia-persistenced.service                          
  545ms systemd-journald.service                             
  540ms snap-gtk\x2dcommon\x2dthemes-1506.mount              
  528ms upower.service                                       
  513ms snapd.seeded.service                                 
  511ms systemd-sysusers.service                             
  502ms snap-gnome\x2d3\x2d34\x2d1804-36.mount               
  473ms systemd-random-seed.service                          
  453ms keyboard-setup.service                               
  441ms systemd-rfkill.service                               
  440ms systemd-tmpfiles-setup.service                       
  423ms swapfile.swap                                        
  408ms snap-qucs\x2dspice-4.mount                           
  395ms snap-core18-1885.mount                               
  386ms snap-snapd-9721.mount                                
  384ms snap-teams\x2dfor\x2dlinux-105.mount                 
  384ms modprobe@drm.service                                 
  369ms snap-gnome\x2d3\x2d34\x2d1804-60.mount               
  352ms snap-gnome\x2d3\x2d28\x2d1804-145.mount              
  330ms systemd-tmpfiles-setup-dev.service                   
  318ms colord.service                                       
  270ms kerneloops.service                                   
  248ms snap-snapd-9607.mount                                
  242ms openvpn.service                                      
  237ms systemd-user-sessions.service                        
  218ms systemd-udev-trigger.service                         
  171ms systemd-timesyncd.service                            
  168ms ufw.service                                          
  153ms console-setup.service                                
  152ms dev-hugepages.mount                                  
  152ms dev-mqueue.mount                                     
  151ms sys-kernel-debug.mount                               
  151ms sys-kernel-tracing.mount                             
  149ms kmod-static-nodes.service                            
  148ms systemd-remount-fs.service                           
  114ms boot-efi.mount                                       
   93ms user@1000.service                                    
   72ms plymouth-read-write.service                          
   68ms rtkit-daemon.service                                 
   52ms user-runtime-dir@125.service                         
   43ms setvtrgb.service                                     
   17ms systemd-update-utmp.service                          
   13ms alsa-restore.service                                 
    7ms user-runtime-dir@1000.service                        
    6ms systemd-tmpfiles-clean.service                       
    6ms systemd-update-utmp-runlevel.service                 
    1ms sys-fs-fuse-connections.mount                        
    1ms sys-kernel-config.mount                              
  514us snapd.socket   

I have also added the result of 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 @1min 3.378s └─multi-user.target @1min 3.378s └─kerneloops.service @37.662s +270ms └─network-online.target @37.600s └─NetworkManager-wait-online.service @27.834s +9.765s └─NetworkManager.service @20.500s +7.332s └─dbus.service @20.495s └─basic.target @20.463s └─sockets.target @20.463s └─snapd.socket @20.462s +514us └─sysinit.target @20.340s └─snapd.apparmor.service @19.777s +562ms └─apparmor.service @18.370s +1.406s └─local-fs.target @18.369s └─run-user-125-gvfs.mount @43.383s └─run-user-125.mount @36.280s └─local-fs-pre.target @4.500s └─systemd-tmpfiles-setup-dev.service @4.170s +330ms └─systemd-sysusers.service @3.658s +511ms └─systemd-remount-fs.service @3.489s +148ms └─systemd-journald.socket @3.338s └─system.slice @3.335s └─-.slice @3.335s

Tom
  • 1
  • Please add the output of systemd-analyze blame and systemd-analyze critical-chain to your question. – user535733 Nov 13 '20 at 14:28
  • I have updated my question. Is this the correct way to do it? – Tom Nov 13 '20 at 14:34
  • Your disks seems to be taking a long time to mount: run-user-125-gvfs.mount @43.383s Are you mounting some kind of extra drive or network share? Define early-boot drives in /etc/fstab instead of gvfs for better performance. Mount other non-boot and network drives later. – user535733 Nov 13 '20 at 14:40
  • Can i ask you to clarify for me please. By 'disks' do you mean my hard drives? I have one 2TB hard drive which is partitioned for Windows and Ubuntu (equally). I then also have 2 SSD's. To be clear I put these in myself and I literally plugged them in, turned it on and wrote a test.txt file in the SSD which can be opened in Windows and Ubuntu. When you say mount do you mean the putting in the pc bit? Also what exactly do you mean by 'Define early-boot drives in /etc/fstab instead of gvfs'? I am very much not an expert. – Tom Nov 13 '20 at 14:46
  • Have you updated UEFI and SSD firmware? Could be part of slow boot. Also some of your apps are snaps, but snaps tend to be slow in booting. See https://askubuntu.com/questions/1284302/is-it-possible-to-make-ubuntu-20-04-boot-faster – oldfred Nov 13 '20 at 15:42
  • I haven't updated any UEFI or SSD firmware. Is this something that happens automatically or do I have to do it? I will also be looking to add substantial SSD's or HDD's to this machine. Is this something I should consider. My initial thoughts were plug it in and turn it on – Tom Nov 17 '20 at 10:53

0 Answers0