Boot time seems unreasonably long

Hello everyone,

I have quite long boot time considering I installed Garuda on a NVME drive (512GB) on a Dell XPS 13 laptop. SecureBoot is disabled as well as fast boot. The drive is encrypted with LUKS. (Un-Encrypting that takes long, too. Don't know if that's the same or another issue.)

╰─λ inxi -Faz
System:    Kernel: 5.10.82-1-lts x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=8b344460-b28a-456a-8c3d-67c858b881f8 rw
rootflags=subvol=@ quiet
cryptdevice=UUID=eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb:luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb
root=/dev/mapper/luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 resume=/dev/mapper/luks-134d12ce-f349-45f4-abde-a9959bb7b408 loglevel=3
Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
base: Arch Linux
Machine:   Type: Laptop System: Dell product: XPS 13 9305 v: N/A serial: <superuser required> Chassis: type: 10
serial: <superuser required>
Mobo: Dell model: 0PPYW4 v: A02 serial: <superuser required> UEFI: Dell v: 1.0.9 date: 07/20/2021
Battery:   ID-1: BAT0 charge: 52.0 Wh (100.0%) condition: 52.0/52.0 Wh (100.0%) volts: 8.7 min: 7.6 model: SMP DELL G8VCF6C
type: Li-poly serial: <filter> status: Full
CPU:       Info: Quad Core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP arch: Tiger Lake family: 6
model-id: 8C (140) stepping: 1 microcode: 88 cache: L1: 320 KiB L2: 5 MiB L3: 12 MiB
flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 44851
Speed: 704 MHz min/max: 400/4700 MHz Core speeds (MHz): 1: 569 2: 1190 3: 918 4: 563 5: 1204 6: 1199 7: 1109
8: 1159
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0
chip-ID: 8086:9a49 class-ID: 0300
Device-2: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 3-3:3 chip-ID: 0c45:6723 class-ID: 0e02
Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: intel unloaded: modesetting
alternate: fbdev,vesa display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
Monitor-1: eDP1 res: 1920x1080 hz: 60 dpi: 168 size: 290x160mm (11.4x6.3") diag: 331mm (13")
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell driver: snd_hda_intel v: kernel alternate: snd_sof_pci
bus-ID: 00:1f.3 chip-ID: 8086:a0c8 class-ID: 0403
Sound Server-1: ALSA v: k5.10.82-1-lts running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Intel Wi-Fi 6 AX200 vendor: Rivet Networks driver: iwlwifi v: kernel bus-ID: a5:00.0 chip-ID: 8086:2723
class-ID: 0280
IF: wlp165s0 state: up mac: <filter>
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-1:2 chip-ID: 8087:0029 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:    Local Storage: total: 476.94 GiB used: 11.33 GiB (2.4%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: PM991a NVMe 512GB size: 476.94 GiB block-size:
physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 26302039 temp: 31.9 C
scheme: GPT
Partition: ID-1: / raw-size: 459.74 GiB size: 459.74 GiB (100.00%) used: 11.33 GiB (2.5%) fs: btrfs dev: /dev/dm-0
maj-min: 254:0 mapped: luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 720 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1
maj-min: 259:1
ID-3: /home raw-size: 459.74 GiB size: 459.74 GiB (100.00%) used: 11.33 GiB (2.5%) fs: btrfs dev: /dev/dm-0
maj-min: 254:0 mapped: luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb
ID-4: /var/log raw-size: 459.74 GiB size: 459.74 GiB (100.00%) used: 11.33 GiB (2.5%) fs: btrfs dev: /dev/dm-0
maj-min: 254:0 mapped: luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb
ID-5: /var/tmp raw-size: 459.74 GiB size: 459.74 GiB (100.00%) used: 11.33 GiB (2.5%) fs: btrfs dev: /dev/dm-0
maj-min: 254:0 mapped: luks-eb6ed2e4-32c9-4c9f-b993-3dd172e02ccb
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.37 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 16.9 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-1 maj-min: 254:1
mapped: luks-134d12ce-f349-45f4-abde-a9959bb7b408
Sensors:   System Temperatures: cpu: N/A mobo: N/A
Fan Speeds (RPM): cpu: 0 fan-2: 0
Info:      Processes: 258 Uptime: 18m wakeups: 1294 Memory: 15.37 GiB used: 2.81 GiB (18.3%) Init: systemd v: 249
tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1371 lib: 336 Shell: fish v: 3.3.1
default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.09
╰─λ systemd-analyze
Startup finished in 3.809s (firmware) + 34.930s (loader) + 17.216s (kernel) + 18.733s (userspace) = 1min 14.690s
graphical.target reached after 18.733s in userspace
╰─λ systemd-analyze blame  
8.332s NetworkManager-wait-online.service
4.809s systemd-cryptsetup@luks\x2d134d12ce\x2df349\x2d45f4\x2dabde\x2da9959bb7b408.service
2.429s dev-mapper-luks\x2deb6ed2e4\x2d32c9\x2d4c9f\x2db993\x2d3dd172e02ccb.device
632ms linux-modules-cleanup.service
388ms systemd-rfkill.service
377ms grub-btrfs-snapper.service
164ms lvm2-monitor.service
163ms systemd-modules-load.service
148ms boot-efi.mount
129ms systemd-journal-flush.service
112ms polkit.service
105ms ModemManager.service
87ms NetworkManager.service
87ms systemd-logind.service
78ms upower.service
76ms dev-mapper-luks\x2d134d12ce\x2df349\x2d45f4\x2dabde\x2da9959bb7b408.swap
69ms dev-zram0.swap
67ms [email protected]
53ms systemd-udev-trigger.service
49ms systemd-backlight@leds:dell::kbd_backlight.service
48ms plymouth-deactivate.service
47ms plymouth-quit-wait.service
47ms avahi-daemon.service
47ms plymouth-quit.service
46ms bluetooth.service
37ms smb.service
32ms systemd-timesyncd.service
29ms systemd-udevd.service
26ms bolt.service
25ms systemd-vconsole-setup.service
25ms systemd-journald.service
24ms power-profiles-daemon.service
23ms plymouth-read-write.service
22ms nmb.service
22ms systemd-guest-user.service
21ms udisks2.service
20ms colord.service
18ms cups.service
15ms plymouth-start.service
13ms [email protected]
12ms systemd-fsck@dev-disk-by\x2duuid-EC05\x2dFAB9.service
10ms systemd-guest-config.service
10ms systemd-remount-fs.service
9ms [email protected]
9ms [email protected]
8ms garuda-pacman-lock.service
8ms systemd-tmpfiles-clean.service
7ms home.mount
7ms systemd-random-seed.service
7ms systemd-tmpfiles-setup.service
6ms dev-hugepages.mount
6ms root.mount
6ms systemd-cryptsetup@luks\x2deb6ed2e4\x2d32c9\x2d4c9f\x2db993\x2d3dd172e02ccb.service
6ms dev-mqueue.mount
5ms sys-kernel-debug.mount
5ms srv.mount
5ms sys-kernel-tracing.mount
5ms systemd-tmpfiles-setup-dev.service
5ms kmod-static-nodes.service
5ms [email protected]
5ms var-cache.mount
4ms [email protected]
4ms [email protected]
3ms var-log.mount
3ms systemd-sysctl.service
3ms systemd-user-sessions.service
3ms systemd-backlight@backlight:intel_backlight.service
3ms var-tmp.mount
3ms systemd-update-utmp.service
2ms wpa_supplicant.service
2ms home-guest.mount
1ms tmp.mount
1ms rtkit-daemon.service
1ms sys-fs-fuse-connections.mount
1ms sys-kernel-config.mount
lines 16-75/75 (END)

As you can see the longest time is in the 'loader' (That's probably the part where the circle is spinning because it takes really long.)

Note that I'm running the linux-lts kernel because linux-zen had issues with some system hangs.

Thanks for your help.

Edit: Just tried pressing F12 during Boot:

I had following messages appear:
Failed to open key file.
ERROR: resume: hibernation device '/dev/mapper/luks-...' not found.

So maybe LUKS is the problem?

I did a Google search on that phrase and it returned many hits. You need to do so, as well.
Anyway, I thought this was an interesting one: Btrfs Encrypted with small or big swap - partitioning automatically - error message · Issue #1659 · calamares/calamares · GitHub

4 Likes

In addition to the above, at a quick check on the Arch Wiki
https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Overview
I see #LVM on LUKS is the suggested scenario with " Easiest method to allow suspension to disk".
Just in case this info could be helpful (I'm no expert of this stuff)...

4 Likes

This will possibly reduce by 8 sec

But it would still more than 1 minute, which is quite irrational.

Post your /etc/fstab
(It is a text file and you have to copy paste its content here)

2 Likes

This is the boot loader, which is probably GRUB, and that has a known issue with slow decryption of encrypted boot partitions.

Also have a look at systemd-analyze critical-chain as this will tell you which services are actually impacting boot time (rather than just taking a long time to start).

NetworkManager-wait-online probably doesn’t affect boot time to login.

5 Likes

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