Slow boot time compared to windows

Hello everyone
I hope you’re all alright
I might be wrong, but I heard that linux should be faster on boot time compared to windows
But that’s not the case here
My boot time on windows is less than 10 seconds
My boot time:

# systemd-analyze
Startup finished in 5.608s (firmware) + 370ms (loader) + 4.919s (kernel) + 3.828s (userspace) = 14.727s 
graphical.target reached after 2.288s in userspace

# systemd-analyze blame
1.537s tlp.service                                                              
 850ms upower.service                                                           
 717ms lvm2-monitor.service                                                     
 589ms systemd-logind.service                                                   
 583ms systemd-random-seed.service                                              
 576ms dev-nvme0n1p2.device                                                     
 492ms snapd.service                                                            
 399ms systemd-journald.service                                                 
 392ms systemd-udevd.service                                                    
 379ms apparmor.service

Specs:

System:    Kernel: 5.8.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.20.3 
           tk: Qt 5.15.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-ec1xxx v: N/A 
           serial: <superuser/root required> Chassis: type: 10 serial: <superuser/root required> 
           Mobo: HP model: 87B1 v: 31.17 serial: <superuser/root required> UEFI: AMI v: F.02 date: 05/14/2020 
Battery:   ID-1: BAT0 charge: 44.4 Wh condition: 48.8/48.8 Wh (100%) volts: 12.4/11.6 
           model: Hewlett-Packard Primary type: Li-ion serial: N/A status: Discharging cycles: 439 
CPU:       Info: 6-Core model: AMD Ryzen 5 4600H with Radeon Graphics bits: 64 type: MT MCP arch: Zen rev: 1 
           L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 71897 
           Speed: 1397 MHz min/max: 1400/3000 MHz boost: enabled Core speeds (MHz): 1: 1744 2: 1398 3: 1397 
           4: 1397 5: 1393 6: 1397 7: 1397 8: 1395 9: 1397 10: 1397 11: 1397 12: 1397 
Graphics:  Device-1: NVIDIA TU117M vendor: Hewlett-Packard driver: N/A bus ID: 01:00.0 chip ID: 10de:1f99 
           Device-2: Advanced Micro Devices [AMD/ATI] Renoir vendor: Hewlett-Packard driver: amdgpu v: kernel 
           bus ID: 05:00.0 chip ID: 1002:1636 
           Device-3: Luxvisions Innotech Limited HP TrueVision HD Camera type: USB driver: uvcvideo 
           bus ID: 3-3:3 chip ID: 30c9:0013 serial: 0001 
           Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: amdgpu resolution: 1920x1080~60Hz 
           s-dpi: 96 
           OpenGL: renderer: AMD RENOIR (DRM 3.38.0 5.8.18-1-MANJARO LLVM 11.0.0) v: 4.6 Mesa 20.2.2 
           direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 
           vendor: Hewlett-Packard driver: snd_rn_pci_acp3x v: kernel bus ID: 05:00.5 chip ID: 1022:15e2 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus ID: 05:00.6 chip ID: 1022:15e3 
           Sound Server: ALSA v: k5.8.18-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard 
           driver: r8169 v: kernel port: e000 bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: eno1 state: down mac: b0:5c:da:42:34:3f 
           Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard 
           driver: rtw_8822ce v: N/A port: d000 bus ID: 03:00.0 chip ID: 10ec:c822 
           IF: wlo1 state: up mac: 70:66:55:bb:04:b7 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 476.94 GiB used: 127.40 GiB (26.7%) 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNV512G KIOXIA size: 476.94 GiB speed: 31.6 Gb/s 
           lanes: 4 serial: 306PEEC9PBV1 rev: HP00AE00 scheme: GPT 
Partition: ID-1: / size: 459.50 GiB used: 127.40 GiB (27.7%) fs: ext4 dev: /dev/nvme0n1p2 
Swap:      ID-1: swap-1 type: partition size: 8.80 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p3 
Sensors:   System Temperatures: cpu: 40.5 C mobo: N/A gpu: amdgpu temp: 40.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 288 Uptime: 34m Memory: 7.21 GiB used: 2.00 GiB (27.8%) Init: systemd v: 246 Compilers: 
           gcc: 10.2.0 Packages: pacman: 1607 Shell: Bash v: 5.0.18 running in: konsole inxi: 3.1.08

I know this is not a BIG problem, but I just wanna know why that’s the case?

Maybe you can get some small performance gain if you add noatime option to your ext4 mounts in /etc/fstab. Otherwise, everything looks quite normal.

1 Like

hi @nanoone :wink:

How did you count the boot time?
Did you really boot or just hibernate?
With power supply or in battery mode?

So after ~17sec KDE started. I guess i can add about ~3sec for starting KDE.

Heyy
I just measure that with my phone’s stopwatch😁
Yeah about 17 sec
Isn’t that a lot for ssd?

It depends on what you need. You can make Linux booting in under 5 sec, but you will need knowledge to do so. This is just a standard installation and beside that you use (in my opinion) the fat and bloated KDE Desktop, which takes some time to load, even on fast systems. The Devs do a great job, but with feature-richness it becomes bloated (like Windows).

I would ask myself: Do i want a full-featured desktop, or a really fast Desktop?

Have look here: Improving performance - ArchWiki

My System:

$ systemd-analyze 
Startup finished in 10.084s (firmware) + 2.413s (loader) + 1.876s (kernel) + 8.848s (userspace) = 23.223s 
graphical.target reached after 8.266s in userspace

is far more slower that yours and has also a SSD.

Btw… have you turned on fastboot in windows?

That would be then not a normal boot.

1 Like

Share the response of
systemd-analyze critical-chain

Also share
cat /etc/mkinitcpio.conf
cat /etc/fstab

Thanks for commenting

Actually I have no idea because I just tested it once and then removed it after a few weeks
I wanted to install linux :slight_smile:

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 @2.186s
└─sddm-plymouth.service @2.185s
  └─systemd-logind.service @1.660s +523ms
    └─basic.target @1.632s
      └─sockets.target @1.632s
        └─snapd.socket @1.629s +2ms
          └─sysinit.target @1.624s
            └─systemd-timesyncd.service @1.229s +394ms
              └─systemd-tmpfiles-setup.service @1.191s +33ms
                └─local-fs.target @1.188s
                  └─boot-efi.mount @1.015s +172ms
                    └─systemd-fsck@dev-disk-by\x2duuid-DEC1\x2d0A53.service @984ms +28ms
                      └─local-fs-pre.target @983ms
                        └─lvm2-monitor.service @266ms +716ms
                          └─lvm2-lvmetad.service @709ms
                            └─systemd-udevd.service @321ms +385ms
                              └─systemd-tmpfiles-setup-dev.service @295ms +22ms
                                └─kmod-static-nodes.service @265ms +18ms
                                  └─systemd-journald.socket @258ms
                                    └─system.slice @240ms
                                      └─-.slice @240ms
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES="amdgpu nvidia nvidia_drm nouveau"

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev plymouth autodetect modconf block keyboard keymap resume filesystems"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
UUID=DEC1-0A53  /boot/efi       vfat    umask=0077      0       2
UUID=44f36bb3-d1ce-4801-bc08-f7b692338f36       /       ext4    defaults,noatime        0       1
UUID=d2ac6ecc-cb0e-4f82-b617-1792c08b94b3       swap    swap    defaults,noatime        0       2

You don’t merge your pacnew files do you?

Honestly, I don’t know what that is or how to do that
Can you explain more?

The Arch wiki is your friend.

https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave

1 Like

Seems linux is faster:wink:

This is the time you spend in the boot loader menu…

Well
These are .pacnew files on my system:

/etc/default/grub.pacnew
/etc/fonts/fonts.conf.pacnew
/etc/mkinitcpio.conf.pacnew
/etc/locale.gen.pacnew
/etc/mkinitcpio.d/linux57.preset.pacsave
/etc/mkinitcpio.d/linux56.preset.pacsave

Are these slowing down the boot time?
Can you explain why these files slow down the boot time?

Wait wait…
But I checked it with stopwatch
Windows was still faster
Now that I read your comment, I’m not sure at all :joy:

Nothing to do with slowing your boot time all to do with keeping your system healthy.

change the compression in mkinitcpio.conf test XZ, LZ4 and CAT.
I think XZ should give you the best boot times.
after modifying the file regenerate initramfs using

sudo mkinitcpio -P

Disable splash screen if you have it enabled.

Are you using a AMD-NVIDIA hybrid setup?

Oh thanks a lot

I don’t have that on my Nvidia KDE installatiion, for me it’s empty.

same here mine doesn’t look like that at all, and yours doesn’t even look like the default one.

Is that a default recent installation? Did you modify things in it?

Does that affect the boot time? If so, can you explain why?
Sorry I just wanna know what that is and why that affects on the system

Yes I use a plymouth. I really love it. How much time does that take?

Yes I’m using this script

Yeah that’s because I’m using amd-nvidia hybrid setup
And also plymouth