Long booting time

i am having the same type of issues with the boot time just im not sure what is ok to shut down, from what i have read it l seems like i can shutdown nmb.service but before i mess up id rather ask this time :laughing:

inxi -Faz

╭─rick@rickshit in ~ took 2m9s
[🧱] × inxi -Faz
System:
Kernel: 5.12.11-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0 
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen 
root=UUID=bbd89eb5-eea1-46dc-a3aa-7df7ffedf994 rw rootflags=subvol=@ quiet 
splash rd.udev.log_priority=3 vt.global_cursor_default=0 
systemd.unified_cgroup_hierarchy=1 
resume=UUID=9c130a55-2450-4422-8097-9e98e0e9ca28 loglevel=3 
Desktop: KDE Plasma 5.22.1 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: Acer product: Nitro AN515-53 v: V1.28 serial: <filter> 
Mobo: CFL model: Freed_CFS v: V1.28 serial: <filter> UEFI: Insyde v: 1.28 
date: 08/05/2019 
Battery:
ID-1: BAT1 charge: 42.6 Wh (100.0%) condition: 42.6/48.9 Wh (87.1%) 
volts: 17.0 min: 15.2 model: LG PABAS0241231 type: Li-ion serial: <filter> 
status: Full 
CPU:
Info: Quad Core model: Intel Core i5-8300H bits: 64 type: MT MCP 
arch: Kaby Lake note: check family: 6 model-id: 9E (158) stepping: A (10) 
microcode: EA cache: L2: 8 MiB 
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
bogomips: 36799 
Speed: 3978 MHz min/max: 800/4000 MHz Core speeds (MHz): 1: 3978 2: 3989 
3: 3993 4: 3988 5: 3989 6: 3973 7: 3971 8: 3953 
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
Type: l1tf 
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
Type: meltdown mitigation: PTI 
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: Full generic retpoline, IBPB: conditional, 
IBRS_FW, STIBP: conditional, RSB filling 
Type: srbds mitigation: Microcode 
Type: tsx_async_abort status: Not affected 
Graphics:
Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
vendor: Acer Incorporated ALI driver: i915 v: kernel bus-ID: 00:02.0 
chip-ID: 8086:3e9b class-ID: 0300 
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] 
vendor: Acer Incorporated ALI driver: nvidia v: 465.31 
alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1c8d 
class-ID: 0300 
Device-3: Quanta HD Webcam type: USB driver: uvcvideo bus-ID: 1-5:2 
chip-ID: 0408:a060 class-ID: 0e02 serial: <filter> 
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
loaded: modesetting,nvidia 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: eDP-1-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x194mm (13.5x7.6") 
diag: 395mm (15.5") 
OpenGL: renderer: NVIDIA GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 
direct render: Yes 
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: Acer Incorporated ALI 
driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl 
bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403 
Sound Server-1: ALSA v: k5.12.11-zen1-1-zen running: yes 
Sound Server-2: JACK v: 0.125.0 running: no 
Sound Server-3: PulseAudio v: 14.2 running: yes 
Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:
Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel 
port: 5000 bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280 
IF: wlp0s20f3 state: up mac: <filter> 
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
vendor: Acer Incorporated ALI driver: r8169 v: kernel port: 3000 
bus-ID: 06:00.1 chip-ID: 10ec:8168 class-ID: 0200 
IF: enp6s0f1 state: down mac: <filter> 
Bluetooth:
Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB 
driver: btusb v: 0.8 bus-ID: 1-14:3 chip-ID: 8087:0aaa class-ID: e001 
Report: bt-adapter ID: hci0 rfk-id: 3 state: down bt-service: enabled,running 
rfk-block: hardware: no software: no address: <filter> 
RAID:
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
v: 3.0 port: 5060 bus-ID: 00:17.0 chip-ID: 8086.282a rev: 10 class-ID: 0104 
Drives:
Local Storage: total: 931.51 GiB used: 71.66 GiB (7.7%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HTS721010A9E630
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
rotation: 7200 rpm serial: <filter> rev: A3J0 scheme: GPT
Partition:
ID-1: / raw-size: 922.46 GiB size: 922.46 GiB (100.00%)
used: 71.66 GiB (7.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 546 KiB (0.2%)
fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 922.46 GiB size: 922.46 GiB (100.00%)
used: 71.66 GiB (7.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 922.46 GiB size: 922.46 GiB (100.00%)
used: 71.66 GiB (7.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 922.46 GiB size: 922.46 GiB (100.00%)
used: 71.66 GiB (7.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/sda3 maj-min: 8:3
ID-2: swap-2 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram0
ID-3: swap-3 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram1
ID-4: swap-4 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram2
ID-5: swap-5 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram3
ID-6: swap-6 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram4
ID-7: swap-7 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram5
ID-8: swap-8 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram6
ID-9: swap-9 type: zram size: 974.1 MiB used: 0 KiB (0.0%) priority: 32767
dev: /dev/zram7
Sensors:
System Temperatures: cpu: 65.0 C mobo: N/A gpu: nvidia temp: 49 C
Fan Speeds (RPM): N/A
Info:
Processes: 275 Uptime: 1h 17m wakeups: 1 Memory: 7.61 GiB
used: 3.23 GiB (42.5%) Init: systemd v: 248 tool: systemctl Compilers:
gcc: 11.1.0 clang: 12.0.0 Packages: pacman: 2363 lib: 578 rpm: 0 Shell: fish
v: 3.2.2 default: Zsh v: 5.8 running-in: konsole inxi: 3.3.04

systemd-analyze

Startup finished in 3.921s (firmware) + 7.919s (loader) + 4.526s (kernel) + 2min 12.865s (userspace) = 2min 29.232s 
graphical.target reached after 2min 12.865s in userspace

systemd-analyze blame

1min 30.193s nmb.service
1min 6.042s linux-modules-cleanup.service
23.959s optimus-manager.service
16.965s systemd-swap.service
15.473s ananicy.service
12.312s lvm2-monitor.service
11.688s polkit.service
11.385s dev-sda2.device
8.550s systemd-remount-fs.service
8.105s NetworkManager-wait-online.service
6.605s smb.service
5.535s ldconfig.service
5.446s thermald.service
4.569s systemd-modules-load.service
4.497s systemd-vconsole-setup.service
4.191s NetworkManager.service
3.313s systemd-sysctl.service
2.644s bluetooth.service
2.058s avahi-daemon.service
1.878s systemd-logind.service
1.876s systemd-machined.service
1.104s systemd-guest-config.service
588ms systemd-sysusers.service
570ms ModemManager.service
513ms systemd-udevd.service
483ms systemd-journal-catalog-update.service
469ms lm_sensors.service
407ms upower.service
337ms systemd-update-utmp.service
324ms systemd-udev-trigger.service
315ms systemd-timesyncd.service
311ms systemd-guest-user.service
299ms systemd-rfkill.service
281ms systemd-fsck@dev-disk-by\x2duuid-EF9A\x2dA791.service
280ms systemd-binfmt.service
269ms home.mount
255ms systemd-random-seed.service
253ms sys-kernel-config.mount
235ms sys-kernel-debug.mount
234ms systemd-tmpfiles-setup.service
214ms dev-hugepages.mount
213ms dev-mqueue.mount
213ms wpa_supplicant.service
213ms sys-kernel-tracing.mount
158ms [email protected]
158ms systemd-tmpfiles-clean.service

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 @2min 12.865s
└─multi-user.target @2min 12.865s
└─smb.service @2min 6.259s +6.605s
└─network-online.target @36.057s
└─NetworkManager-wait-online.service @27.950s +8.105s
└─NetworkManager.service @23.757s +4.191s
└─dbus.service @23.755s
└─basic.target @23.752s
└─sockets.target @23.752s
└─virtlogd.socket @23.752s
└─sysinit.target @23.716s
└─systemd-update-done.service @23.657s +58ms
└─ldconfig.service @18.121s +5.535s
└─local-fs.target @18.119s
└─boot-efi.mount @18.012s +107ms
└─systemd-fsck@dev-disk-by\x2duuid-EF9A\x2dA791.servic>
└─local-fs-pre.target @17.686s
└─lvm2-monitor.service @5.373s +12.312s
└─systemd-journald.socket @5.351s
└─-.mount @5.281s
└─-.slice @5.281s

Hi.
If you don't have specific local networking needs, I think you can safely disable nmb service:
https://wiki.archlinux.org/title/Network_configuration#Local_network_hostname_resolution
I did it from the beginning (I noticed that long time) and never had problems ever since.
As regards, linux-modules-cleanup.service, I think this should take a long time only after changing or upgrading kernel, so I guess this was that high only by chance, or it is high for you every time?

[Unit]
Description=Clean up modules from old kernels
3 Likes

honestly im not sure if linux-modules-cleanup.service does run every time i will give it a few test and let you know! thanks for the advice!

1 Like

after disabling nmb.service my load time to the graphical interface has gotten much better but linux-modules-cleanup.service still is taking 2 mins to load, i have ran an update and rebooted twice and its still taking some time to load

systemd-analyze
Startup finished in 5.228s (firmware) + 7.244s (loader) + 4.548s (kernel) + 2min 45
.909s (userspace) = 3min 2.930s
graphical.target reached after 27.304s in userspace

╭─rick@rickshit in ~ took 4ms
╰─λ systemd-analyze blame
2min 37.278s linux-modules-cleanup.service
17.762s optimus-manager.service
13.656s systemd-swap.service
11.858s NetworkManager-wait-online.service
11.331s ananicy.service
6.011s systemd-vconsole-setup.service
5.356s polkit.service
5.293s lvm2-monitor.service
5.143s dev-sda2.device
4.619s avahi-daemon.service
4.618s bluetooth.service
4.617s NetworkManager.service
4.531s systemd-logind.service
4.530s systemd-machined.service
4.530s thermald.service
2.148s smb.service
2.146s systemd-guest-config.service
1.851s udisks2.service
1.542s wpa_supplicant.service
1.508s systemd-remount-fs.service
1.501s lm_sensors.service
917ms ModemManager.service
793ms systemd-udevd.service
740ms systemd-modules-load.service
684ms systemd-fsck@dev-disk-by\x2duuid-EF9A\x2dA791.service
613ms upower.service
346ms systemd-random-seed.service
331ms systemd-udev-trigger.service
293ms systemd-tmpfiles-setup.service
269ms systemd-binfmt.service
260ms [email protected]
232ms plymouth-start.service
227ms systemd-journald.service
221ms plymouth-read-write.service
217ms home.mount
181ms sys-kernel-debug.mount
175ms var-log.mount
172ms [email protected]
164ms systemd-guest-user.service
164ms [email protected]
162ms systemd-tmpfiles-setup-dev.service
151ms var-cache.mount
141ms [email protected]
141ms [email protected]
140ms [email protected]
137ms [email protected]
1 Like

What is read and write speed of your hard drive / ssd?
You can perform benchmark on gnome-disk-utility.

2 Likes

i am trying to download the gnome-disk-utility now and somehow my password has changed on my laptop and i cant update anything now??? i dont have a clue what just happened!!!!!!

Edit: not sure what happened there with the password changing but i got it back now...

now ill work on getting the benchmarks done.. @Naman , im reading the Wiki on how to do it now :sweat_smile:


hope these help... not sure if this is what you wanted to see

This is not always doing something. Only after a kernel upgrade.

Disable NetworkManager-wait-online.service. This will fix most of the trouble.

As for evaluating boot time with systemd-analyze, the most helping view is critical-chain, which tells you exactly what is blocking other services to start.

Read manual pages to learn more about it. Reading helps everyone, yourself included :wink:

3 Likes

This looks good after all.
I guess the user perception of booting time is more driven by the graphical target rather than the overall time…

yes the load time to the graphical target is much faster now that ive disabled nmb.service and now

i did a complete shut down and the load time is so much better!!!

Thank you @filo @petsam and @Naman

2 Likes

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