Slow firmware boot time on fresh install

Hi!

I’m posting this because the boot time on my fresh Manjaro install seems to be quite slow.

For the context, I bought a new laptop last week and after the initialization and a few minutes on Windows, I installed Manjaro. The boot time with Windows 10 was about 3-5s and now it’s rather about 18s, mostly because of the firmware. I know 18s is bearable, but since it’s 4 times faster on windows and that my old laptop with Manjaro was booting in about 5s as well, I guess something can be done.

Here are the few commands I found that could help for such matters and their outputs:

First the exact time to boot:

systemd-analyze

Startup finished in 13.870s (firmware) + 1.124s (loader) + 1.136s (kernel) + 2.080s (userspace) = 18.212s 
graphical.target reached after 2.061s in userspace

Some info about my system:

inxi -Fza

System:    Kernel: 5.9.3-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64 root=UUID=66e61614-0f2c-4644-8848-a2a898f35f88 rw iommu=soft quiet 
           udev.log_priority=3 
           Desktop: GNOME 3.38.1 tk: GTK 3.24.23 wm: gnome-shell dm: GDM 3.38.1 Distro: Manjaro Linux 
Machine:   Type: Laptop System: HUAWEI product: KLVL-WXX9 v: M1140 serial: <filter> 
           Mobo: HUAWEI model: KLVL-WXX9-PCB v: M1140 serial: <filter> UEFI: HUAWEI v: 1.05 date: 08/21/2020 
Battery:   ID-1: BAT0 charge: 40.5 Wh condition: 55.7/54.9 Wh (101%) volts: 8.0/7.6 model: Sunwoda- HB4593R1ECW-22T0 
           type: Li-ion serial: <filter> status: Discharging cycles: 4 
CPU:       Info: 6-Core model: AMD Ryzen 5 4600H with Radeon Graphics bits: 64 type: MT MCP arch: Zen family: 17 (23) 
           model-id: 60 (96) stepping: 1 microcode: 8600104 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: 1398 2: 1397 3: 1397 4: 1397 5: 1397 
           6: 1393 7: 1394 8: 1397 9: 1397 10: 1397 11: 1397 12: 1396 
           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: Full AMD retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel bus ID: 04:00.0 chip ID: 1002:1636 
           Device-2: IMC Networks HD Camera type: USB driver: uvcvideo bus ID: 3-4:4 chip ID: 13d3:56db serial: <filter> 
           Display: wayland server: X.org 1.20.9 compositor: gnome-shell driver: amdgpu,ati unloaded: modesetting,radeon 
           alternate: fbdev,vesa display ID: 0 resolution: <xdpyinfo missing> 
           OpenGL: renderer: AMD RENOIR (DRM 3.39.0 5.9.3-1-MANJARO LLVM 10.0.1) v: 4.6 Mesa 20.2.1 direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] driver: snd_hda_intel v: kernel bus ID: 04:00.1 chip ID: 1002:1637 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor driver: N/A 
           alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus ID: 04:00.5 chip ID: 1022:15e2 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio driver: snd_hda_intel v: kernel bus ID: 04:00.6 
           chip ID: 1022:15e3 
           Sound Server: ALSA v: k5.9.3-1-MANJARO 
Network:   Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: & Tele RSH driver: rtw_8822ce v: N/A 
           modules: rtw88_8822ce port: 2000 bus ID: 01:00.0 chip ID: 10ec:c822 
           IF: wlp1s0 state: up mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 10.57 GiB (2.2%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN730 SDBPNTY-512G-1027 size: 476.94 GiB block size: 
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 11120000 scheme: GPT 
Partition: ID-1: / raw size: 476.64 GiB size: 468.16 GiB (98.22%) used: 10.57 GiB (2.3%) fs: ext4 dev: /dev/nvme0n1p2 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 36.2 C mobo: N/A gpu: amdgpu temp: 36.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 268 Uptime: 7m Memory: 15.02 GiB used: 1.73 GiB (11.5%) Init: systemd v: 246 Compilers: gcc: 10.2.0 
           Packages: pacman: 1080 lib: 315 Shell: Zsh v: 5.8 running in: gjs inxi: 3.1.08 

I’ve already disabled everything I could in my BIOS settings that I was not using (such as Virtualization Technologies or PXE), but once again, Windows booted in no time even with those settings enabled so I don’t understand the time differences.

Does anyone have an idea about what I could do ?

Thanks in advance :slight_smile:

Howdy!

May I ask for the output of udevadm info --attribute-walk -n /dev/nvme0n1 | grep 'DRIVERS=="[^"]' , please?

Hey!
So

udevadm info --attribute-walk -n /dev/nvme0n1 | grep 'DRIVERS=="[^"]'

gave me:

    DRIVERS=="nvme"
    DRIVERS=="pcieport"

Sweet! May I ask for the output of mkinitcpio -M , please?

Sure thing!

mkinitcpio -M

and the output:

==> Modules autodetected
ac
acpi_cpufreq
aesni_intel
amd64_edac_mod
amdgpu
atkbd
battery
btusb
ccp
crc32c_intel
crc32_pclmul
crct10dif_pclmul
evdev
ext4
fjes
ghash_clmulni_intel
hid_generic
hid_logitech_dj
hid_logitech_hidpp
hid_multitouch
huawei_wmi
i2c_hid
i2c_piix4
i8042
input_leds
joydev
k10temp
kvm_amd
mac_hid
mousedev
pcc_cpufreq
pcspkr
pinctrl_amd
rapl
rtw88_8822ce
serio_raw
snd_hda_codec_hdmi
snd_hda_codec_realtek
snd_hda_intel
snd_pci_acp3x
snd_rn_pci_acp3x
sp5100_tco
tpm_crb
tpm_tis
usbhid
uvcvideo
wmi
wmi_bmof
xhci_pci
1 Like

Sweet! Thank you!
May now enter the following in a terminal:

sudo nano /etc/mkinitcpio.conf

Then find the line starting with MODULES=( and remove everything in between the parentheses, then add ext4 in between.

Next, find the line starting with BINARIES=( and once again, remove everything in between the parentheses. Thus, you can also add fsck fsck.ext4 if you prefer to quickly check the disk at startup.

Lets move on to the line starting with HOOKS=( , and remove everything, then add base autodetect .

After that, move completely to the bottom, and add

COMPRESSION="cat"

Hit ctrl+s then ctrl+x

You may now execute sudo mkinitcpio -P && sudo update-grub !

Reboot and voilà! :smile:

1 Like

So I did as you said and rebooted.

Here are the results:

systemd-analyze

Startup finished in 13.917s (firmware) + 107ms (loader) + 959ms (kernel) + 2.655s (userspace) = 17.639s 
graphical.target reached after 2.631s in userspace

So it seems that it made the loader and the kernel faster, but did not change the firmware boot time. Would you have any idea about that ?

Thanks a lot for your help, it’s much appreciated! :smiley:

Is your system EFI, may I ask?

Yes, it is.

Unfortunately, there is not much you can do about this loading time since it is related to the bios.

What you can do, is enter the bios, and try to see if disabling fastboot does something, and may also disable unused stuffs…
When the machine posts, it searches for anything that may be attached to your PC…

Oh ok, that’s what I feared.

I’m still quite surprised since it booted much faster with Windows and it should’nt have changed anything in the BIOS by installing Manjaro.

Is there any way to have some infos about what the bios does and what takes so much time ?

Hm, for that you would need to access the BIOS’ shell and compiled machine to software code, which is not something you want to do :sweat_smile:

As I said, you can try to disable secure boot and fastboot…

Haha ok I guess not then :smiley:

Sorry, I forgot to answer that : secure boot is already disabled and this bios version does not give me access to the fast boot option (which surprised me to be honest).

Permit me to ask if it is a “Windows 8 certified” PC?

I’m not sure what a “Windows 8 certified” PC is but it’s a Matebook 14 2020 AMD edition, with Windows 10 pre-installed. I bought it new so I guess it was Windows 10 certified ?

Hm, well that’s indeed interesting… I may look further into this :thinking:

Something else to try is checking your /etc/default/grub, you can do this from your file manager or from terminal with sudo nano /etc/default/grub, which will let you edit the grub file. There’s a line in there that says GRUB_TIMEOUT=10. This is here in case you’re dual booting so it can give you time to switch operating systems on the grub screen. If you aren’t going to dual boot, you may change the 10 to a 0, however I reccomend 1 just in case. This should shave some time off every boot, unless its been changed to a lower number before.

Hi ChickenScratch!

Thanks for your answer !

I read about that matter in another post and I already changed the GRUB__TIMEOUT=10 to 1 to save time. This contributes to reducing the loader part of startup time but does not change the firmware part.

What really bothers me is that I don’t understand why the firmware time seems to be considerably slower when Manjaro is installed instead of Windows, even though it should not have any impact. Or maybe I’m missing something.

Hello there. I am a linux newbie since yesterday. Manjaro 20 KDE installation went flawless and so far I am very happy. So I was reading stuff like what to do after installing Manjaro. Your suggestion is one of their tips. however, can you tell me how to save the changes in Manjarao 20 KDE. They suggested ctrl O and then ctrl X to exit but that doesn’t seem to work. thx for helping me out here.

Hello!

The CTRL+O and then CTRL+X is specific to nano as a text editor. You can actually use whatever text editor you want, like if you’re more comfortable with gedit, you can use sudo gedit /etc/default/grub, make your modifications and then save the file with a classic CTRL+S.

For the modifications to be taken into account, you absolutely have to update the GRUB config afterwards though. If you haven’t done that, just enter sudo update-grub after your modifications. Then restart and it should be ok.

1 Like