Slow Kernel Boot Time (SSD)


I have installed Manjaro only recently and it seems to take an incredibly long time to boot. I have already set my grub timeout to 1 second so it isn’t that causing the issue. The long time seems to be coming from the Kernel. I have pasted below the output of various system-d analyze and also a my GRUB config.

What appears to happen is, my motherboard takes 9 seconds to hand over to GRUB (This I know I can’t do much about) and then I see the GRUB loader flash for the second… then the screen goes black even though I have quiet and splash removed from the config. Then about 30 seconds later I see the login screen.

I have a super fast NVMe installed so it isn’t the drive that is the issue as it used to boot so fast in to Windows.

inxi -F output:

Machine:   Type: Desktop System: Gigabyte product: B550 VISION D v: -CF serial: <superuser required> 
           Mobo: Gigabyte model: B550 VISION D v: x.x serial: <superuser required> UEFI: American Megatrends LLC. v: F13i 
           date: 04/23/2021 
CPU:       Info: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP cache: L2: 4 MiB 
           Speed: 2166 MHz min/max: 2200/3600 MHz Core speeds (MHz): 1: 2166 2: 2123 3: 4271 4: 2129 5: 1864 6: 2795 7: 1865 
           8: 1859 9: 4276 10: 2151 11: 1863 12: 2795 13: 1863 14: 1863 15: 2139 16: 2134 
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] driver: nvidia v: 460.73.01 
           Device-2: Logitech HD Webcam C510 type: USB driver: snd-usb-audio,uvcvideo 
           Display: x11 server: X.Org 1.20.11 driver: loaded: nvidia resolution: 3440x1440 
           OpenGL: renderer: GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 460.73.01 
Audio:     Device-1: NVIDIA TU106 High Definition Audio driver: snd_hda_intel 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel 
           Device-3: Logitech HD Webcam C510 type: USB driver: snd-usb-audio,uvcvideo 
           Sound Server-1: ALSA v: k5.10.34-1-MANJARO running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel I211 Gigabit Network driver: igb 
           IF: enp80s0 state: down mac: 18:c0:4d:36:bd:12 
           Device-2: Intel I211 Gigabit Network driver: igb 
           IF: enp81s0 state: down mac: 18:c0:4d:36:bd:13 
           Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi 
           IF: wlp82s0 state: up mac: 8c:c6:81:f0:53:c0 
           IF-ID-1: docker0 state: down mac: 02:42:20:8c:f8:58 
           IF-ID-2: virbr0 state: down mac: 52:54:00:09:e8:fc 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb 
           Report: rfkill ID: hci0 state: up address: see --recommends 
Drives:    Local Storage: total: 931.51 GiB used: 92.54 GiB (9.9%) 
           ID-1: /dev/nvme0n1 vendor: Sabrent model: Rocket 4.0 1TB size: 931.51 GiB 
Partition: ID-1: / size: 881.58 GiB used: 92.54 GiB (10.5%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /boot/efi size: 299.4 MiB used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 
Swap:      ID-1: swap-1 type: partition size: 34.48 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p3 
Sensors:   System Temperatures: cpu: 41.6 C mobo: 0 C gpu: nvidia temp: 48 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:      Processes: 381 Uptime: 1m Memory: 31.29 GiB used: 3.56 GiB (11.4%) Shell: Bash inxi: 3.3.04 


Startup finished in 9.749s (firmware) + 1.229s (loader) + 18.541s (kernel) + 4.967s (userspace) = 34.488s reached after 4.369s in userspace

systemd-analyze blame

1.872s docker.service                                                           
1.672s var-lib-snapd-snap-core-10958.mount                                      
1.668s var-lib-snapd-snap-code-63.mount                                         
1.596s var-lib-snapd-snap-discord-122.mount                                     
1.492s var-lib-snapd-snap-spotify-46.mount                                      
1.394s var-lib-snapd-snap-mailspring-505.mount                                  
1.256s var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-145.mount                    
1.033s var-lib-snapd-snap-slack-39.mount                                        
 926ms var-lib-snapd-snap-core18-1997.mount                                     
 864ms var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1515.mount                    
 597ms tlp.service                                                              
 517ms dev-loop0.device                                                         
 478ms systemd-modules-load.service                                             
 424ms lvm2-monitor.service                                                     
 377ms dev-loop1.device                                                         
 361ms snapd.service                                                            
 337ms dev-loop4.device                                                         
 328ms dev-loop2.device                                                         
 245ms upower.service                                                           
 240ms wpa_supplicant.service                                                   
 219ms dev-loop3.device                                                         
 215ms apparmor.service                                                         
 196ms dev-loop5.device                                                         
 189ms systemd-random-seed.service                                              
 167ms dev-loop6.device                                                         
 146ms systemd-journal-flush.service                                            
 131ms dev-nvme0n1p2.device                                                     
 104ms dev-disk-by\x2duuid-1ac4187b\x2df1ea\x2d44e7\x2db96e\x2db59ba3c08cfc.swap
  94ms user@1000.service                                                        
  67ms dev-loop7.device                                                         
  64ms polkit.service 

GRUB config:

GRUB_CMDLINE_LINUX_DEFAULT="apparmor=1 security=apparmor resume=UUID=1ac4187b-f1ea-44e7-b96e-b59ba3c08cfc udev.log_priority=3 amd_iommu=on iommu=pt video=efifb:off"

Doing some timing investigation from the Grub boot loader disappearing and my screen going blank, if I look at journalctl -b there is about 18 seconds before the first line of the boot actually appears so what is happening after that grub loader for 18 seconds before it actually starts booting?

It is a known problem with snap packages that they can prolong the bootup sequence.
If you want to see for yourself, switch for the programs that you currently use through a snap package to classic packages and the problem should be gone.

1 Like

Hi @Tenatious, and welcome!

First thing I though of when readig your post, after making that changes to /etc/default/grub, did you update-grub?

sudo update-grub

I don’t know if that’s it, but it’s worth finding out. Anyway, hope it helps!

I deleted the entirety of Snapd and that hasn’t fixed the issue. The kernel is still taking nearly 20s to load where as I see most people have that down to about 4s?

Startup finished in 9.765s (firmware) + 1.233s (loader) + 18.556s (kernel) + 4.055s (userspace) = 33.610s
2.596s docker.service                                                           
 576ms systemd-modules-load.service                                             
 528ms tlp.service                                                              
 425ms lvm2-monitor.service                                                     
 277ms systemd-journal-flush.service                                            
 258ms upower.service                                                           
 201ms dev-nvme0n1p2.device                                                     
 189ms systemd-random-seed.service                                              
 156ms dev-disk-by\x2duuid-1ac4187b\x2df1ea\x2d44e7\x2db96e\x2db59ba3c08cfc.swap
 143ms boot-efi.mount                                                           
  82ms apparmor.service                                                         
  63ms user@1000.service

Hi Mir. Yes I did this.

Hmmm… odd.
Well then one would need to take a more detailed look at the bootup sequence. That can be done with dmesg .
You might want to post that to pastebin, since the output can get quite big. You would only need to post everything up to the 30s mark though.

Here’s the dmesg:

Hi @Tenatious,

Please provide the output of:

sudo systemd-analyze blame | head

as well as

sudo systemd-analyze critical-chain

Hmmm… i think i found something that might explain atleast 7sec in the kernel time.

[   12.711765] usb 1-10.4: SerialNumber: 00000000001A
[   19.197952] xhci_hcd 0000:53:00.2: can't setup: -110
[   19.197956] xhci_hcd 0000:53:00.2: USB bus 5 deregistered
[   19.197981] xhci_hcd 0000:53:00.2: init 0000:53:00.2 fail, -110
[   19.198021] xhci_hcd: probe of 0000:53:00.2 failed with error -110
[   19.198053] xhci_hcd 0000:55:00.3: xHCI Host Controller
[   19.198056] xhci_hcd 0000:55:00.3: new USB bus registered, assigned bus number 5
[   19.198155] xhci_hcd 0000:55:00.3: hcc params 0x0278ffe5 hci version 0x110 quirks 0x0000000000000410

It seems like a USB Hub cannot be set up. Not sure what the error could be though.

try with minimal USB connected