20.04.2 30 sec boot delay

Hi,
I have installed Ubuntu-Mate 20.04.2 from .iso on Dell Vostro 3700
After installing "hibernate" + "ps-utils" I am able to hibernate, but my system has a boot delay for 30 sec every boot.
In boot.log I saw

Blockquote
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Begin: Waiting for suspend/resume device ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for suspend/resume device
done.
Begin: Will now check root file system ... fsck from util-linux 2.34
Blockquote

Every solution I found is to disable hibernate by setting resume=none
But I will use hibernate without 30 sec boot delay.

Every try will helpful
THX Frank

Hey :slight_smile:
Never got to use hibernate but each time I have some perf issues at boot, I use the command :

systemd-analyze blame

I guess this can help you investigating.

Also, did you try this ?

As I wrote, hibernate works well. The config with swap-part is allright.
Blame only list the time after kernel, the problem is before.

So my other system with 20.04.2 with older kernel 5.4.0-65 need:

systemd-analyze time
Startup finished in 5.727s (kernel) + 15.354s (userspace) = 21.082s
graphical.target reached after 1min 2.135s in userspaceneeds:

My new installed system with 20.04.2 5.8.0-43 need:
systemd-analyze time
Startup finished in 33.634s (kernel) + 7.638s (userspace) = 41.273s
graphical.target reached after 7.620s in userspace

I see :slight_smile:
I wanted you to try this update-initramfs -u to insure that your kernel is aware of the swap partition.

Try it out :slight_smile:

OK, I've tried it.(multiple times since the last days)
To be sure to understand my problem:
This delay will occur every boot, cold start or resume from disk(swap-space).
Before you ask for:
Here the related entries for the swap space:

Blockquotefrank@NoteB1:~$ more /etc/initramfs-tools/conf.d/resume
RESUME=UUID=4b521088-8d25-4127-b194-643e0ce1846b
frank@NoteB1:~$ more /etc/fstab | grep swap

swap was on /dev/sda2 during installation

UUID=4b521088-8d25-4127-b194-643e0ce1846b none swap sw 0 0
frank@NoteB1:~$ more /boot/grub/grub.cfg | grep resume
linux /boot/vmlinuz-5.8.0-43-generic root=UUID=3733e78f-4cf5-4211-9078-589bb4cd1150 ro splash resume=uuid=4b521088-8d25-4127-b194-643e0ce1846b $vt_handoff
linux /boot/vmlinuz-5.8.0-41-generic root=UUID=3733e78f-4cf5-4211-9078-589bb4cd1150 ro splash resume=uuid=4b521088-8d25-4127-b194-643e0ce1846b $vt_handoff
frank@NoteB1:~$

Blockquote

So I believe the problem occurs independent from hibernate or swap-space.
The reason for speaking about hibernation was, not to give hints like set "resume=none". This maybe a workaround but not a fix. I use Hibernation often so resume=none is not my way.
BTW: Boot times (cold start):
33.781s (kernel) + 9.143s (userspace) = 42.925s
graphical.target reached after 9.112s in userspace

systemd-analyze blame
5.832s NetworkManager-wait-online.service
1.369s dev-sda1.device
995ms blueman-mechanism.service
788ms networkd-dispatcher.service
...

What can I do to trace boot more efficent?
How to debug boot?

For me, the boot process is trying to get in touch with your swap partition. It's something wrong with that, and the boot is waiting for something that is not about to come. Next, it gives up and continue booting.
Is your SWAP encrypted ? Is it running on LVM ? Is this device available at boot time ?
You can also try to format your swap partition and set the new UUID in /etc/fstab - maybe something went wrong.

You can also stop the machine, press the power button, stop the boot process with the "e" key once you are in grub and analyze the settings that are about to be used for boot the OS.

Have you by any chance run the following command?

sudo systemctl disable NetworkManager-wait-online.service

This should make your boot process faster. See -

Nothing helps. All settings in grub are OK.
No encryption, no LVM.

The only things I have noticed in /var/log/dmesg
are holes between 7.x and 26.x an 66.x seconds

Blockquote
[ 7.026399] kernel: x86/mm: Checking user space page tables
[ 7.119615] kernel: x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 7.158763] kernel: Run /init as init process
[ 7.197097] kernel: with arguments:
[ 7.234757] kernel: /init
[ 7.271847] kernel: nosplash
[ 7.271848] kernel: --verbose
[ 7.271848] kernel: with environment:
[ 7.271849] kernel: HOME=/
[ 7.271849] kernel: TERM=linux
[ 7.271850] kernel: BOOT_IMAGE=/boot/vmlinuz-5.8.0-43-generic
[ 26.446407] kernel: random: crng init done
[ 66.398519] systemd-udevd[155]: /usr/lib/udev/rules.d/50-udev-default.rules:24 The line takes no effect, ignoring.
[ 66.436017] systemd-udevd[155]: /usr/lib/udev/rules.d/50-udev-default.rules:25 The line takes no effect, ignoring.
Blockquote

I 'm sure to debug the boot process deeper is possible.
I 'll try.
I believe I 'm stupid maybe...
No more debug information in any logfile.
Tried debug=all --verbose earlyprintk nosplash
Removed quiet vt.handoff=7

No more infos. I 've updated to latest kernel 5.10.15 without success.
30 second problem exists further more.

1 Like