Extremely slow boot times due to snap mounts

I recently noticed that my desktop is now taking minutes instead of seconds to boot from grub.

systemd-analyze blame reports the following:

11.869s snap-gnome\x2d3\x2d38\x2d2004-39.mount
11.855s snap-drawio-107.mount
11.855s snap-opentoonz-147.mount
11.713s snap-gitkraken-179.mount
11.666s snap-htop-2643.mount
11.589s snap-yakyak-115.mount
11.553s snap-cawbird-702.mount
11.527s snap-canonical\x2dlivepatch-102.mount
11.496s snap-thunderbird-127.mount
11.388s snap-standard\x2dnotes-70.mount
11.330s snap-snapd-12398.mount
11.278s snap-okular-109.mount
11.265s snap-nethack-87.mount
11.233s snap-vlc-2288.mount
11.144s snap-dav1d-388.mount
11.043s snap-opencomic-7.mount
11.040s snap-pokerth-1.mount
10.972s snap-kde\x2dframeworks\x2d5\x2dcore18-32.mount
10.906s snap-bitwarden-51.mount
10.809s snap-darktable-63.mount
10.762s snap-figma\x2dlinux-127.mount
10.722s snap-ngrok-35.mount
10.681s snap-sublime\x2dmerge-8.mount
10.599s snap-cecconoid-7.mount
10.589s snap-inkscape-9078.mount
10.401s snap-standard\x2dnotes-68.mount
10.387s snap-dotnet\x2dsdk-133.mount

Full list here: https://pastebin.ubuntu.com/p/vgvgbCfbQd/

Advice would be greatly appreciated.

do you also have the output of

$ systemd-analyze critical-chain

blame just shows the time the single units took but all the mount units should run independently in parallel and not hold back your boot (nothing depends on them and they should not depend on anything)

EDIT: oh, and the full output of snap version will also be helpful …

$ systemd-analyze critical-chain

$ snap version
snap    2.51.3
snapd   2.51.3
series  16
ubuntu  20.04
kernel  5.11.0-25-generic

so this seems to indicate that your system takes 23 seconds from the end of the initrd to the login screen and while snapd is actually the slowest bit here it only adds 9 seconds to that …

that is definitely not responsible for adding minutes to your boot …

did you check your journal for any errors or suspicious messages yet

There’s definitely something screwy, and I think you’re right, snaps are not to blame here.

systemd-analyze seems to suggest there’s gremlins afoot.

Startup finished in 27.384s (firmware) + 6.544s (loader) + 1min 30.023s (kernel) + 23.552s (userspace) = 2min 27.505s 
graphical.target reached after 23.547s in userspace

yeah … this is where you lose the time, i’d try to get into the grub (esc or shift key IIRC) menu and check if the former kernel also shows such behavior

Turns out it was a uefi/bios issue after all. Unplugging and replugging all usb devices seems to have resolved the issue. This thread can be deleted, apologies for the noise.

1 Like