Slow boot time on fresh installation of Manjaro KDE (Gnome too)

Hi!

I’m having problem with boot time on my Thinkpad l390 with NVMe SSD. It takes about 20s to boot - you might think that it’s not that long and in the end I can live with that but it still boggling me since it’s just too long compared to other OS. I noticed that Manjaro Gnome has had similar problem.

It’s a newest installation possible of Manjaro KDE with 5.8.6.1-MANJARO kernel.

Startup finished in 5.954s (firmware) + 10.245s (loader) + 1.067s (kernel) + 2.607s (userspace) = 19.874s 
graphical.target reached after 1.661s in userspace

And as you can see by using systemd-analyze blame - it does not look that bad actually. So I have no idea what should I do. Would you be able to help me?

1.235s systemd-random-seed.service                          
 901ms tlp.service                                          
 779ms lvm2-monitor.service                                 
 629ms dev-nvme0n1p2.device                                 
 508ms snapd.service                                        
 433ms systemd-logind.service                               
 369ms apparmor.service                                     
 293ms systemd-udevd.service                                
 268ms systemd-journald.service                             
 251ms upower.service                                       
 223ms systemd-rfkill.service                               
 143ms polkit.service                                       
 122ms systemd-backlight@backlight:intel_backlight.service  
 104ms systemd-tmpfiles-clean.service                       
 103ms boot-efi.mount                                       
 101ms systemd-journal-flush.service                        
  67ms user@1000.service                                    
  61ms systemd-modules-load.service                         
  61ms ModemManager.service                                 
  59ms NetworkManager.service                               
  57ms avahi-daemon.service                                 
  56ms systemd-udev-trigger.service                         
  40ms udisks2.service                                      
  39ms modprobe@drm.service                                 
  27ms org.cups.cupsd.service                               
  21ms systemd-fsck@dev-disk-by\x2duuid-FFD5\x2d6F27.service
  18ms snapd.apparmor.service                               
  17ms systemd-backlight@leds:tpacpi::kbd_backlight.service 
  15ms systemd-binfmt.service                               
  14ms systemd-tmpfiles-setup.service                       
  12ms systemd-tmpfiles-setup-dev.service                   
  12ms dev-hugepages.mount                                  
  11ms wpa_supplicant.service                               
  11ms dev-mqueue.mount                                     
  11ms user-runtime-dir@1000.service                        
  11ms sys-kernel-debug.mount                               
  10ms sys-kernel-tracing.mount                             
   9ms tmp.mount                                            
   9ms kmod-static-nodes.service                            
   9ms bluetooth.service                                    
   8ms linux-module-cleanup.service                         
   7ms systemd-remount-fs.service                           
   7ms systemd-user-sessions.service                        
   7ms systemd-update-utmp.service                          
   5ms systemd-sysctl.service                               
   3ms rtkit-daemon.service                                 
   3ms proc-sys-fs-binfmt_misc.mount                        
   2ms sys-kernel-config.mount                              
   2ms sys-fs-fuse-connections.mount                        
 716us snapd.socket 

Here’s systemd-analyze critical-chain

graphical.target @1.661s
└─multi-user.target @1.661s
  └─snapd.service @1.153s +508ms
    └─basic.target @1.143s
      └─sockets.target @1.143s
        └─snapd.socket @1.142s +716us
          └─sysinit.target @1.140s
            └─systemd-backlight@backlight:intel_backlight.service @2.480s +122ms
              └─system-systemd\x2dbacklight.slice @1.171s
                └─system.slice @195ms
                  └─-.slice @195ms

So is there anyway to make the boot faster? 20s still seems to be a bit too much.

[The topic was on reddit before but I didn’t got proper answer if there’s any. Also I couldn’t embedded any media so I just pasted terminal output, sorry for that.]

Could you provide the output from inxi -Fzy and cat /etc/default/grub | head -n6 ?
As a first tip though you could get rid of snapd, that ought to give you already 500ms faster boot time.
Just as a reference here are my times for a cold boot for my system.

─ systemd-analyze blame                                                                                                                                                                
648ms systemd-logind.service                                                                   
509ms lvm2-monitor.service                                                                     
379ms dev-nvme0n1p1.device                                                                     
312ms systemd-random-seed.service                                                              
288ms apparmor.service                                                                         
279ms upower.service                                                                           
259ms systemd-modules-load.service                                                             
209ms systemd-udevd.service                                                                    
198ms systemd-journald.service                                                                 
190ms systemd-timesyncd.service                                                                
183ms boot-efi.mount                                                                           
137ms udisks2.service                                                                          
133ms tlp.service                                                                              
121ms systemd-tmpfiles-clean.service                                                           
 84ms user@1000.service                                                                        
 55ms polkit.service                                                                           
 46ms systemd-fsck@dev-disk-by\x2duuid-0fbf2348\x2ddebc\x2d49c9\x2d8d26\x2dd315844741a9.service
 44ms systemd-udev-trigger.service                                                             
 33ms teamviewerd.service                                                                      
 31ms ModemManager.service                                                                     
 31ms avahi-daemon.service                                                                     
 28ms NetworkManager.service                                                                   
 28ms systemd-rfkill.service                                                                   
 23ms systemd-fsck@dev-disk-by\x2duuid-4e22c70e\x2d396c\x2d4324\x2dbac8\x2db2a1b4551311.service
 17ms run-media-takei-Media.mount                                                              
 13ms run-media-takei-Data.mount                                                               
 13ms systemd-fsck@dev-disk-by\x2duuid-3365\x2dB5CF.service           
─ systemd-analyze                                                                                                                                                                      
Startup finished in 9.560s (firmware) + 2.407s (loader) + 4.493s (kernel) + 1.894s (userspace) = 18.356s 
graphical.target reached after 1.759s in userspace

Also welcome to the community. Properly formatted terminal output like yours is actually the most preferred choice as it can be indexed and helps others find answers in the future.

inxi -Fzy

System:
  Kernel: 5.8.6-1-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.19.5 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: LENOVO product: 20NR0013MX v: ThinkPad L390 
  serial: <filter> 
  Mobo: LENOVO model: 20NR0013MX v: SDK0J40697 WIN serial: <filter> 
  UEFI: LENOVO v: R10ET42W (1.27 ) date: 11/05/2019 
Battery:
  ID-1: BAT0 charge: 42.6 Wh condition: 42.6/45.0 Wh (95%) 
CPU:
  Topology: Quad Core model: Intel Core i5-8265U bits: 64 type: MT MCP 
  L2 cache: 6144 KiB 
  Speed: 900 MHz min/max: 400/3900 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 
  4: 900 5: 900 6: 900 7: 900 8: 902 
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
  Device-2: Lite-On Integrated Camera type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.8 driver: intel unloaded: modesetting 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.1.7 
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.8.6-1-MANJARO 
Network:
  Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi 
  IF: wlp0s20f3 state: up mac: <filter> 
  Device-2: Intel Ethernet I219-V driver: e1000e 
  IF: enp0s31f6 state: down mac: <filter> 
Drives:
  Local Storage: total: 238.47 GiB used: 69.97 GiB (29.3%) 
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKF256G8L size: 238.47 GiB 
Partition:
  ID-1: / size: 233.43 GiB used: 69.97 GiB (30.0%) fs: ext4 
  dev: /dev/nvme0n1p2 
Swap:
  Alert: No Swap data was found. 
Sensors:
  System Temperatures: cpu: 43.0 C mobo: 1.0 C 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 219 Uptime: 2h 37m Memory: 15.30 GiB used: 1.37 GiB (8.9%) 
  Shell: Bash inxi: 3.1.05 

cat /etc/default/grub | head -n6:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

Well, I can see that your boot time is somewhat similar to mine and I’m starting to wonder if there’s any hope to get it properly configured just to cut it in half like on other OSes (previously been using PopOS, Lubuntu, Xubuntu, Ubuntu Budgie and every has been quick in terms of boot. Not to mention Win10 - it does boot quick even when the “quick boot” option is off).

Ahhh just as i suspected, that’s why the loader time was that high.
You might want to change GRUB_TIMEOUT in /etc/default/grub from 10 to 1 and then update grub with sudo update-grub. That should speed up the boot by 9 seconds. You should still be able to reach the grub menu by spamming the up and down arrow keys if you need to.

Most of my boot time comes from the firmware on my mainboard, so there is only so much i can do about it. Most of yours is from the loader grub.

2 Likes

Hi!
Let’s start for the grub
Edit /etc/default/grub with
sudo nano /etc/default/grub
If you have a dual boot and need to see the grub,change the time of this line to 3s, if you don’t then 0.This line will define the time that grub wait until run the boot up
GRUB_TIMEOUT=10
After save the file, run
sudo update-grub
About services
You can disable all the services you don’t use with
sudo systemctl disable <service>

1 Like

I didn’t notice that your boot time depends on firmware actually. Thank you for solution! it cut the boot time as I wanted, that is nearly in half. Now systemd-analyze indicates boot time in about 11s. I finally don’t have to go make myself a coffee during boot. :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.