Lubuntu 24.04.1 LTS (Noble Numblat) on Macbook Pro 7,1 (Mid-2010): Slow boot and graphical glitches fix?

I just made a fresh MacOS/Lubuntu dual boot install on a Macbook Pro 7,1 (picture bellow) and after fixing the lack of WiFi card driver (Broadcom BCM 4322), I would like to fix another issue that was present since when I was testing the distro in USB Live mode: the boot.

When I turn on the device, there is a wait of 3½ minutes (sometimes it goes up to 6½ minutes!!) in a black screen with a static (non flashing) white dash and then a brief screen garble precedes the blue screen with the circular Lubuntu logo. And sometimes - today it happened 3 times in a row before I could finally login - not only it takes this long time to boot, but the screen remain white with with some random squares flashing here and there on the screen, The black mouse pointer is available and it seems there is a menu on top of the screen, but because the screen is all white, the only thing I can do is to hold the Power button to restart and try again.

Following another similar topic, here are the results of the suggested command lines:

Summary
~$ systemd-analyze
Startup finished in 6.733s (kernel) + 39.290s (userspace) = 46.024s 
graphical.target reached after 39.261s in userspace.


~$ systemd-analyze blame
5min 53.684s snapd.service
     13.088s gpu-manager.service
     12.552s NetworkManager-wait-online.service
     11.612s snapd.seeded.service
     10.725s e2scrub_reap.service
      9.953s apport.service
      7.999s NetworkManager.service
      7.253s dev-sda4.device
      7.234s udisks2.service
      6.531s systemd-udev-settle.service
      5.763s virtlockd.service
      5.748s virtlogd.service
      5.536s accounts-daemon.service
      5.054s iio-sensor-proxy.service
      4.939s polkit.service
      4.507s apt-daily-upgrade.service
      4.263s avahi-daemon.service
      4.251s bluetooth.service
      4.200s dbus.service
      3.896s switcheroo-control.service
      3.869s systemd-machined.service
      3.495s fwupd.service
      3.443s thermald.service
      2.938s ModemManager.service
      2.802s systemd-journal-flush.service
      2.652s rsyslog.service
      2.353s lvm2-monitor.service
      2.007s systemd-udevd.service
      1.799s dev-loop10.device
      1.798s dev-loop11.device
      1.793s cups.service
      1.773s dev-loop13.device
      1.636s libvirtd.service
      1.585s dev-loop14.device
      1.584s apparmor.service
      1.538s grub-common.service
      1.524s dev-loop12.device
      1.487s dev-loop9.device
      1.481s dev-loop8.device
      1.423s plymouth-read-write.service
      1.272s upower.service
      1.207s lm-sensors.service
      1.135s sysstat.service
      1.120s wpa_supplicant.service
      1.064s systemd-resolved.service
      1.030s systemd-udev-trigger.service
       979ms systemd-logind.service
       942ms systemd-tmpfiles-setup-dev-early.service
       809ms systemd-sysctl.service
       793ms keyboard-setup.service
       675ms systemd-rfkill.service
       674ms systemd-tmpfiles-setup.service
       650ms libvirt-guests.service
       647ms snapd.apparmor.service
       571ms run-qemu.mount
       558ms user@1000.service
       552ms swapfile.swap
       540ms systemd-modules-load.service
       514ms systemd-random-seed.service
       514ms snap-bare-5.mount
       509ms snap-core22-1564.mount
       505ms snap-core24-609.mount
       485ms systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service
       453ms dev-loop5.device
       442ms grub-initrd-fallback.service
       440ms dev-loop4.device
       439ms dev-loop6.device
       436ms dev-loop1.device
       430ms snap-element\x2ddesktop-121.mount
       429ms dev-loop3.device
       429ms dev-loop2.device
       428ms dev-loop0.device
       427ms dev-loop7.device
       418ms snap-ffmpeg\x2d2204-126.mount
       408ms snap-gnome\x2d42\x2d2204-176.mount
       398ms plymouth-start.service
       398ms snap-firefox-4793.mount
       376ms snap-gtk\x2dcommon\x2dthemes-1535.mount
       330ms snap-snapd-21759.mount
       323ms snap-krita-108.mount
       282ms systemd-journald.service
       273ms qemu-kvm.service
       244ms blueman-mechanism.service
       243ms systemd-timesyncd.service
       209ms systemd-remount-fs.service
       208ms colord.service
       201ms setvtrgb.service
       199ms snap-firmware\x2dupdater-127.mount
       196ms systemd-binfmt.service
       169ms console-setup.service
       153ms kerneloops.service
       152ms dev-hugepages.mount
       150ms systemd-backlight@leds:smc::kbd_backlight.service
       139ms dev-mqueue.mount
       137ms sys-kernel-debug.mount
       135ms sys-kernel-tracing.mount
       133ms openvpn.service
       129ms systemd-tmpfiles-clean.service
       128ms fwupd-refresh.service
       119ms ufw.service
       111ms kmod-static-nodes.service
       104ms dev-loop17.device
       103ms modprobe@configfs.service
       100ms systemd-user-sessions.service
5min 53.684s snapd.service
5min 53.684s snapd.service
     13.088s gpu-manager.service
     12.552s NetworkManager-wait-online.service
     11.612s snapd.seeded.service
     10.725s e2scrub_reap.service
      9.953s apport.service
      7.999s NetworkManager.service
      7.253s dev-sda4.device
      7.234s udisks2.service
      6.531s systemd-udev-settle.service
      5.763s virtlockd.service
      5.748s virtlogd.service
      5.536s accounts-daemon.service
      5.054s iio-sensor-proxy.service
      4.939s polkit.service
      4.507s apt-daily-upgrade.service
      4.263s avahi-daemon.service
      4.251s bluetooth.service
      4.200s dbus.service
      3.896s switcheroo-control.service
      3.869s systemd-machined.service
      3.495s fwupd.service
      3.443s thermald.service
      2.938s ModemManager.service
      2.802s systemd-journal-flush.service
      2.652s rsyslog.service
      2.353s lvm2-monitor.service
      2.007s systemd-udevd.service
      1.799s dev-loop10.device
      1.798s dev-loop11.device
5min 53.684s snapd.service
     13.088s gpu-manager.service
     12.552s NetworkManager-wait-online.service
     11.612s snapd.seeded.service
     10.725s e2scrub_reap.service
      9.953s apport.service
      7.999s NetworkManager.service
      7.253s dev-sda4.device
      7.234s udisks2.service
      6.531s systemd-udev-settle.service
      5.763s virtlockd.service
      5.748s virtlogd.service
      5.536s accounts-daemon.service
      5.054s iio-sensor-proxy.service
      4.939s polkit.service
      4.507s apt-daily-upgrade.service
      4.263s avahi-daemon.service
      4.251s bluetooth.service
      4.200s dbus.service
      3.896s switcheroo-control.service
      3.869s systemd-machined.service
      3.495s fwupd.service
      3.443s thermald.service
      2.938s ModemManager.service
      2.802s systemd-journal-flush.service
      2.652s rsyslog.service
      2.353s lvm2-monitor.service
      2.007s systemd-udevd.service
      1.799s dev-loop10.device
      1.798s dev-loop11.device
      1.793s cups.service
      1.773s dev-loop13.device
      1.636s libvirtd.service
      1.585s dev-loop14.device
      1.584s apparmor.service
      1.538s grub-common.service
      1.524s dev-loop12.device
      1.487s dev-loop9.device
      1.481s dev-loop8.device
      1.423s plymouth-read-write.service
      1.272s upower.service
      1.207s lm-sensors.service
      1.135s sysstat.service
      1.120s wpa_supplicant.service
      1.064s systemd-resolved.service
      1.030s systemd-udev-trigger.service
       979ms systemd-logind.service
       942ms systemd-tmpfiles-setup-dev-early.service
       809ms systemd-sysctl.service
       793ms keyboard-setup.service
       675ms systemd-rfkill.service
       674ms systemd-tmpfiles-setup.service
       650ms libvirt-guests.service
       647ms snapd.apparmor.service
       571ms run-qemu.mount
       558ms user@1000.service
       552ms swapfile.swap
       540ms systemd-modules-load.service
       514ms systemd-random-seed.service
       514ms snap-bare-5.mount
       509ms snap-core22-1564.mount
       505ms snap-core24-609.mount
       485ms systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service
       453ms dev-loop5.device
       442ms grub-initrd-fallback.service
       440ms dev-loop4.device
       439ms dev-loop6.device
       436ms dev-loop1.device
       430ms snap-element\x2ddesktop-121.mount
       429ms dev-loop3.device
       429ms dev-loop2.device
       428ms dev-loop0.device
       427ms dev-loop7.device
       418ms snap-ffmpeg\x2d2204-126.mount
       408ms snap-gnome\x2d42\x2d2204-176.mount
       398ms plymouth-start.service
       398ms snap-firefox-4793.mount
       376ms snap-gtk\x2dcommon\x2dthemes-1535.mount
       330ms snap-snapd-21759.mount
       323ms snap-krita-108.mount
       282ms systemd-journald.service
       273ms qemu-kvm.service
       244ms blueman-mechanism.service
       243ms systemd-timesyncd.service
       209ms systemd-remount-fs.service
       208ms colord.service
       201ms setvtrgb.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 @39.261s
└─multi-user.target @39.260s
  └─kerneloops.service @39.104s +153ms
    └─network-online.target @39.052s
      └─NetworkManager-wait-online.service @26.498s +12.552s
        └─NetworkManager.service @18.484s +7.999s
          └─dbus.service @14.270s +4.200s
            └─basic.target @14.130s
              └─sockets.target @14.130s
                └─libvirtd-ro.socket @14.130s
                  └─libvirtd.socket @14.106s +23ms
                    └─sysinit.target @14.074s
                      └─snapd.apparmor.service @13.426s +647ms
                        └─apparmor.service @11.834s +1.584s
                          └─local-fs.target @11.822s
                            └─boot-efi.mount @11.735s +84ms
                              └─systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service @11.222s +485ms
                                └─dev-disk-by\x2duuid-67E3\x2d17ED.device @11.215s

Any idea about how to solve this issue?

It really doesn’t look all that bad except that it’s spending a lot of time in snapd. But, every thing else looks normal… You can uninstall snapd if you want, but, then you won’t be able to manage snaps. What is the date on the install image/iso?

I guess the other thing you can do is set the Update frequency to something less frequent than daily. This might take it out of the boot sequence.

Also, type in:

snap changes
systemctl status snapd

To see what it might have been trying to do.

see: Bug #1891618

1 Like

Last modified: 31/12/2024 18:58
Last accessed & Created: 02/01/2025 14:12

To add more details that weren’t add in the initial post, the ISO was downloaded from https://lubuntu.me/downloads/ and it’s integrity was verified (SHA256SUMS). It was installed using a USB Live made with Ventoy (so I could test other distros as well).

I set the “Check for updates” frequency to Weekly instead of Daily and then I turned off and on 5 times. By timing how long the black screen with the static dash lasted before the blue screen with the Lubuntu (which usually leads to the login screen after a few seconds), I obtained the following results:

1st boot: 5 minutes + stuck at blue screen with the Lubuntu logo (long press the power button to force turn off);
2nd boot: 6 ½ minutes;
3rd boot: 6 minutes;
4th boot: 2 minutes;
5th boot: 3 minutes and 8 seconds.

I don’t know if changing the update frequency has anything to do with these different results, but in general it didn’t make the boot faster.

~$ snap changes
ID   Status  	Spawn                   				Ready                   					Summary
4    Done    	yesterday at 15:35 CET  	yesterday at 15:36 CET  	Pre-download "firefox" for auto-refresh
5    Done    	yesterday at 16:14 CET  	yesterday at 16:16 CET  	Auto-refresh snap "firefox"
6    Done    	yesterday at 22:00 CET  	yesterday at 22:02 CET  	Auto-refresh snap "snapd"
~$ systemctl status snapd
● snapd.service - Snap Daemon
     Loaded: loaded (/usr/lib/systemd/system/snapd.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-01-11 12:11:48 CET; 1h 21min ago
TriggeredBy: ● snapd.socket
   Main PID: 948 (snapd)
      Tasks: 9 (limit: 4294)
     Memory: 60.1M (peak: 64.8M)
        CPU: 3.374s
     CGroup: /system.slice/snapd.service
             └─948 /usr/lib/snapd/snapd

janv. 11 12:11:33 laura-macbookpro2010 systemd[1]: Starting snapd.service - Snap Daemon...
janv. 11 12:11:43 laura-macbookpro2010 snapd[948]: overlord.go:274: Acquiring state lock file
janv. 11 12:11:43 laura-macbookpro2010 snapd[948]: overlord.go:279: Acquired state lock file
janv. 11 12:11:44 laura-macbookpro2010 snapd[948]: daemon.go:250: started snapd/2.67 (series 16; classic) ubuntu/24.04 (amd64) linux/6.8.0-51-generic.
janv. 11 12:11:44 laura-macbookpro2010 snapd[948]: daemon.go:353: adjusting startup timeout by 1m45s (pessimistic estimate of 30s plus 5s per snap)
janv. 11 12:11:46 laura-macbookpro2010 snapd[948]: backends.go:58: AppArmor status: apparmor is enabled and all features are available (using snapd provided apparmor_parser)
janv. 11 12:11:48 laura-macbookpro2010 systemd[1]: Started snapd.service - Snap Daemon.
lines 1-18/18 (END)
1 Like

hm… ok, well, let’s verify that it is in fact snapd.service (systemd thinks it is, but, now I’m not so sure)

Type: systemctl mask snapd.service

and then reboot and see if it makes any difference.

If it does make a difference, verify the timing with another “systemd-analyze blame”

1 Like

I did and this is what I got:

-$ systemctl mask snapd.service
Created symlink /etc/systemd/system/snapd.service → /dev/null.
Masking 'snapd.service', but its triggering units are still active:
snapd.socket

Not only there’s no difference in time (in addition to the bugs mentioned before, like the white screen in the login screen and the Lubuntu blue screen crash), but now I can’t run Firefox anymore (I’m writing this message from my smartphone’s Web browser), whether I’m clicking on it’s icon in the task bar, on the Lubuntu menu or through the QTerminal, which give me the following message:

~$ firefox
error: cannot communicate with server: Post "http://localhost/v2/snapctl": dial unix/run/snapd-snap.socket: conne ct: no such file or directory
ERROR: not connected to the gnome-42-2204 content interface.

It only made things worse, as explained above, but I will share it against to see if it brings any new information:

Summary
-$ systemd-analyze blame

12.797s gpu-manager.service
12.083s NetworkManager-wait-online.service
10.731s e2scrub_reap.service
8.361s NetworkManager.service
8.198s apport.service
7.747s dev-sda4.device
7.183s systemd-udev-settle.service
5.395s systemd-journal-flush.service
4.862s virtlockd.service
4.848s virtlogd.service
4.806s udisks2.service
4.228s accounts-daemon.service
2.965s iio-sensor-proxy.service
2.797s avahi-daemon.service
2.783s bluetooth.service
2.734s dbus.service
2.615s polkit.service
2.546s cups.service
2.495s dev-loop8.device
2.494s dev-loop15.device
2.469s dev-loop9.device
2.464s dev-loop16.device
2.431s dev-loop13.device
2.375s dev-loop10.device
2.347s dev-loop18.device
2.325s dev-loop11 device
2.271s ModemManager service
2.266s switcheroo-control service
2.2.32s systemd-machined service
2.227s dev loon17 device
2.207s dev-loop14.device
2.173s dev-loop12.device
2.123s thermald.service
2.085s systemd-udevd.service
1.594s lvm2-monitor.service
1.541s rsyslog.service
1.447s Im-sensors.service
1.421s apparmor.service
1.271s upower.service
1.147s grub-common.service
1.133s dev-loop7.device
1.122s dev-loop0.device
1.115s dev-loop2.device
1.097s dev-loop1.device
1.092s snapd.apparmor.service
1.075s libvirtd.service
1.047s plymouth-start.service
1.022s sysstat.service
946ms dev-loop6.device
939ms systemd-resolved.service
873ms systemd-logind.service
844ms dev-loop3.device
841ms dev-loop4.device
818ms dev-loop5.device
798ms systemd-modules-load.service
792ms keyboard-setup.service
779ms systemd-udev-trigger.service
623ms libvirt-guests.service
618ms user@1000.service
604ms systemd-tmpfiles-setup.service
588ms wpa_supplicant.service
465ms grub-initrd-fallback.service
456ms colard service
440ms systemd-tmpfiles-setup-dev-early service
432ms snap-kf5\x2dcore22-3.mount
432ms systemd-random-seed service
431ms snap-core24-609 mount
411ms swapfile.swap
405ms snap-element\x2ddesktop-121.mount
391ms snap-mesa\x2d2404-143.mount
380ms snap-ffmpeg\x2d2204-126.mount
370ms systemd-sysctl.service
352ms snap-thunderbird-609.mount
349ms systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service
339ms systemd-rfkill.service
312ms snap-gnome\x2d46\x2d2404-48.mount
297ms run-qemu.mount
295ms systemd-timesyncd.service
281ms snap-firefox-4793.mount
272ms systemd-remount-fs.service
268ms snap krita-108.mount
265ms snap-gnome\x2d42\x2d2204-176.mount
254ms systemd-journald.service
235ms blueman-mechanism.service
215ms systemd-backlight@leds:smc::kbd_backlight.service
211ms qemu-kvm.service
192ms snap-gtk\x2dcommon\x2dthemes-1535.mount
184ms kerneloops.service
171ms snap-bare-5.mount
167ms snap-core22-1722.mount
164ms snap-firmware\x2dupdater-147.mount
161ms snap-firefox-5561.mount
157ms snap-core22-1564.mount
148ms setvtrgb.service
137ms systemd-binfmt.service
137ms openvpn.service
134ms dev-hugepages.mount
129ms console-setup.service
127ms plymouth-read-write service
127ms dev-mqueue mount
123ms sys-kernel-debug.mount
121ms snap-snapd-23545 mount
121ms sys-kernel-tracing mount
103ms kmod-static-nodes.service
101ms systemd-user-sessions.service
95ms snap-firmware\x2dupdater-127.mount
93ms snap-snapd-23258.mount
89ms modprobe@configfs.service
83ms systemd-tmpfiles-setup-dev.service
79ms systemd-update-utmp.service
77ms ufw.service
72ms modprobe@drm.service
71ms boot-efi.mount
62ms modprobe@fuse.service
61ms modprobe@loop.service
42ms proc-sys-fs-binfmt_misc.mount
42ms rtkit-daemon.service
40ms user-runtime-dir@1000.service
36ms modprobe@dm_mod.service
31ms modprobe@efi_pstore.service
28ms alsa-restore.service
26ms plymouth-quit.service
24ms systemd-backlight@backlight:nv_backlight.service
22ms sys-kernel-config.mount
22ms sys-fs-fuse-connections.mount
22ms libvirtd.socket
13ms systemd-update-utmp-runlevel.service
12ms sddm.service
11ms sysstat-collect service
50us bik-availability.service

Ok, sorry about the delay in my response.

Anyway, I just wanted to understand if it was truly snapd or not. It doesn’t appear to be from your analyze output.

I don’t see snapd.service in your “blame” output (this is good), I also don’t see anything else unusual? Did your system boot faster as this suggests? (I understand you are without firefox when snapd.service isn’t working… but, I’m trying to understand what is causing your system to boot so slowly).

Well, regardless, to restore your snapd.service please enter:

systemctl unmask snapd.service
systemctl enable snapd.service
systemctl reboot

I don’t think the enable is actually needed, but, it shouldn’t hurt your system as it is.

I did go through this exercise on a laptop I have that has noble on it:

OS: Lubuntu noble 24.04 x86_64
Host: Inspiron 3542
Kernel: Linux 6.8.0-51-generic
CPU: Intel(R) Core™ i5-4210U (4) @ 2.70 GHz
GPU: Intel Haswell-ULT Integrated Graphics Controller @ 1.00]
Memory: 1.01 GiB / 7.66 GiB (13%)

Before I disabled snapd.service with systemctl mask it took about 20 seconds in the “blame” output at boot. After I removed it with mask, I saw the same error about other services that would try to trigger snapd. This error message is not significant (for this test) and the bootup time was 20 seconds faster.

Then I restored snapd.service via systemctl unmask snapd.service, rebooted and snapd.service was restored.

I was hoping that you’d lose 5 minutes off of your bootup with this and then we could look into snapd further. But, since you have written that your system still booted slowly (and the diagnostics don’t show this), I’m not sure where to go with this now as we don’t have a diagnosis anymore.

No need to be sorry. I appreciate your support. Thank you! :wink: :+1:

To answer your question: No, it wasn’t faster at all. I was timing the black screen with a stopwatch and it took about the same time as before (3½ minutes on first boot; 6½ minutes + stuck at the blue screen on second boot; 3 minutes + white screen with black squares in the login screen on third boot).

During the time when I couldn’t open the browser, I had to use Google Lens on my smartphone to capture the text, so I could paste it here while using my smartphone’s browser. I tried to be careful in order to copy every line, but perhaps I missed something, so I will paste bellow the results of systemd-analyze blame before and after typing systemctl unmask snapd.service and systemctl enable snapd.service, so we can see what changed.

Before:

Summary
~$ systemd-analyze blame
13.535s e2scrub_reap.service
13.459s gpu-manager.service
13.428s NetworkManager-wait-online.service
 8.929s NetworkManager.service
 8.253s apport.service
 7.385s dev-sda4.device
 6.581s systemd-udev-settle.service
 4.781s udisks2.service
 4.209s virtlockd.service
 4.197s virtlogd.service
 4.164s apt-daily-upgrade.service
 3.779s accounts-daemon.service
 3.421s fwupd-refresh.service
 3.075s dev-loop12.device
 3.054s dev-loop13.device
 3.049s dev-loop14.device
 2.955s systemd-journal-flush.service
 2.936s dev-loop9.device
 2.917s dev-loop15.device
 2.912s dev-loop16.device
 2.830s dev-loop8.device
 2.808s dev-loop11.device
 2.773s dev-loop10.device
 2.664s cups.service
 2.592s dev-loop17.device
 2.485s iio-sensor-proxy.service
 2.473s dev-loop18.device
 2.318s avahi-daemon.service
 2.313s bluetooth.service
 2.271s dbus.service
 2.264s polkit.service
 2.263s thermald.service
 2.256s ModemManager.service
 1.839s systemd-udevd.service
 1.812s dev-loop5.device
 1.792s dev-loop0.device
 1.776s switcheroo-control.service
 1.773s dev-loop2.device
 1.733s fwupd.service
 1.704s systemd-machined.service
 1.653s dev-loop7.device
 1.588s plymouth-read-write.service
 1.555s dev-loop3.device
 1.502s apparmor.service
 1.478s dev-loop1.device
 1.457s rsyslog.service
 1.453s upower.service
 1.447s dev-loop6.device
 1.384s libvirtd.service
 1.370s lvm2-monitor.service
 1.230s dev-loop4.device
 1.168s grub-common.service
 1.108s snapd.apparmor.service
 1.086s plymouth-start.service
 1.030s systemd-sysctl.service
  947ms lm-sensors.service
  929ms systemd-modules-load.service
  906ms systemd-resolved.service
  894ms systemd-tmpfiles-setup-dev-early.service
  886ms systemd-udev-trigger.service
  872ms wpa_supplicant.service
  810ms user@1000.service
  774ms systemd-tmpfiles-setup.service
  740ms sysstat.service
  695ms snap-krita-108.mount
  687ms libvirt-guests.service
  681ms snap-element\x2ddesktop-121.mount
  652ms keyboard-setup.service
  640ms systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service
  593ms systemd-logind.service
  546ms snap-thunderbird-609.mount
  489ms snap-core22-1564.mount
  482ms colord.service
  442ms snap-firefox-4793.mount
  418ms snap-gnome\x2d42\x2d2204-176.mount
  412ms grub-initrd-fallback.service
  406ms systemd-random-seed.service
  406ms snap-core22-1722.mount
  380ms snap-firmware\x2dupdater-127.mount
  375ms snap-gtk\x2dcommon\x2dthemes-1535.mount
  303ms snap-firefox-5561.mount
  295ms systemd-journald.service
  288ms dev-hugepages.mount
  278ms dev-mqueue.mount
  276ms sys-kernel-debug.mount
  274ms kmod-static-nodes.service
  273ms sys-kernel-tracing.mount
  267ms snap-firmware\x2dupdater-147.mount
  263ms systemd-timesyncd.service
  255ms systemd-remount-fs.service
  254ms modprobe@configfs.service
  248ms modprobe@drm.service
  242ms modprobe@fuse.service
  238ms blueman-mechanism.service
  237ms run-qemu.mount
  228ms snap-snapd-23545.mount
  227ms snap-snapd-23258.mount
  219ms setvtrgb.service
  193ms swapfile.swap
  166ms snap-bare-5.mount
  153ms kerneloops.service
  147ms snap-core24-609.mount
  143ms qemu-kvm.service
  142ms openvpn.service
  129ms systemd-binfmt.service
  123ms snap-ffmpeg\x2d2204-126.mount
  117ms snap-kf5\x2dcore22-3.mount
  116ms snap-gnome\x2d46\x2d2404-48.mount
  114ms systemd-backlight@leds:smc::kbd_backlight.service
  113ms systemd-tmpfiles-clean.service
  107ms snap-mesa\x2d2404-143.mount
  104ms boot-efi.mount
  100ms console-setup.service
   85ms systemd-user-sessions.service
   78ms systemd-update-utmp.service
   61ms ufw.service
   54ms systemd-rfkill.service
   52ms proc-sys-fs-binfmt_misc.mount
   40ms rtkit-daemon.service
   38ms user-runtime-dir@1000.service
   37ms plymouth-quit.service
   35ms sddm.service
   33ms systemd-backlight@backlight:nv_backlight.service
   27ms sys-fs-fuse-connections.mount
   27ms sysstat-collect.service
   26ms sys-kernel-config.mount
   24ms modprobe@dm_mod.service
   23ms modprobe@efi_pstore.service
   22ms alsa-restore.service
   21ms modprobe@loop.service
   20ms libvirtd.socket
   19ms systemd-tmpfiles-setup-dev.service
   11ms systemd-update-utmp-runlevel.service
   51us blk-availability.service

After:

Summary
~$ systemd-analyze blame
20.516s e2scrub_reap.service
16.362s snapd.seeded.service
15.204s snapd.service
13.847s gpu-manager.service
13.348s NetworkManager-wait-online.service
11.427s apport.service
 9.901s NetworkManager.service
 8.046s dev-sda4.device
 7.353s systemd-udev-settle.service
 6.706s udisks2.service
 6.320s systemd-journal-flush.service
 6.145s virtlockd.service
 6.138s virtlogd.service
 6.126s accounts-daemon.service
 4.729s cups.service
 4.672s iio-sensor-proxy.service
 4.542s polkit.service
 4.315s avahi-daemon.service
 4.298s bluetooth.service
 4.244s dbus.service
 4.050s ModemManager.service
 3.807s switcheroo-control.service
 3.770s systemd-machined.service
 3.694s fwupd-refresh.service
 3.280s thermald.service
 2.946s dev-loop9.device
 2.944s dev-loop17.device
 2.912s dev-loop16.device
 2.848s dev-loop8.device
 2.751s dev-loop12.device
 2.699s dev-loop10.device
 2.605s systemd-udevd.service
 2.574s rsyslog.service
 2.522s dev-loop14.device
 2.495s dev-loop13.device
 2.477s dev-loop11.device
 2.461s dev-loop15.device
 2.443s dev-loop18.device
 2.310s fwupd.service
 2.087s grub-common.service
 2.085s libvirtd.service
 1.807s dev-loop7.device
 1.798s dev-loop0.device
 1.716s sysstat.service
 1.695s dev-loop2.device
 1.669s lvm2-monitor.service
 1.661s dev-loop1.device
 1.490s dev-loop6.device
 1.453s apparmor.service
 1.388s dev-loop4.device
 1.356s plymouth-read-write.service
 1.331s dev-loop3.device
 1.297s lm-sensors.service
 1.207s wpa_supplicant.service
 1.128s snapd.apparmor.service
 1.110s systemd-resolved.service
 1.019s snap-ffmpeg\x2d2204-126.mount
  983ms systemd-logind.service
  930ms libvirt-guests.service
  899ms dev-loop5.device
  777ms systemd-tmpfiles-setup-dev-early.service
  770ms systemd-udev-trigger.service
  742ms keyboard-setup.service
  677ms upower.service
  674ms systemd-tmpfiles-setup.service
  666ms colord.service
  619ms systemd-modules-load.service
  613ms snap-core24-609.mount
  605ms user@1000.service
  553ms systemd-fsck@dev-disk-by\x2duuid-67E3\x2d17ED.service
  552ms snap-element\x2ddesktop-121.mount
  549ms snap-thunderbird-609.mount
  546ms snap-gnome\x2d46\x2d2404-48.mount
  539ms snap-mesa\x2d2404-143.mount
  516ms snap-krita-108.mount
  494ms snap-kf5\x2dcore22-3.mount
  482ms grub-initrd-fallback.service
  472ms systemd-sysctl.service
  447ms systemd-random-seed.service
  422ms plymouth-start.service
  418ms snap-firefox-4793.mount
  339ms snap-gnome\x2d42\x2d2204-176.mount
  278ms systemd-backlight@leds:smc::kbd_backlight.service
  277ms snap-core22-1564.mount
  274ms swapfile.swap
  270ms run-qemu.mount
  267ms snap-gtk\x2dcommon\x2dthemes-1535.mount
  239ms blueman-mechanism.service
  238ms snap-core22-1722.mount
  224ms systemd-journald.service
  219ms systemd-binfmt.service
  207ms systemd-timesyncd.service
  200ms snap-firefox-5561.mount
  199ms kerneloops.service
  197ms qemu-kvm.service
  163ms dev-hugepages.mount
  161ms systemd-remount-fs.service
  153ms openvpn.service
  151ms dev-mqueue.mount
  150ms setvtrgb.service
  149ms snap-bare-5.mount
  147ms sys-kernel-debug.mount
  144ms sys-kernel-tracing.mount
  131ms systemd-update-utmp.service
  125ms systemd-tmpfiles-clean.service
  117ms systemd-user-sessions.service
  114ms kmod-static-nodes.service
  108ms ufw.service
  102ms modprobe@configfs.service
   95ms systemd-rfkill.service
   94ms snap-firmware\x2dupdater-147.mount
   89ms snap-firmware\x2dupdater-127.mount
   87ms modprobe@drm.service
   77ms boot-efi.mount
   73ms snap-snapd-23258.mount
   65ms modprobe@fuse.service
   57ms sddm.service
   54ms console-setup.service
   51ms user-runtime-dir@1000.service
   49ms libvirtd.socket
   48ms snap-snapd-23545.mount
   45ms snapd.socket
   40ms rtkit-daemon.service
   37ms plymouth-quit.service
   36ms sys-kernel-config.mount
   28ms alsa-restore.service
   26ms systemd-backlight@backlight:nv_backlight.service
   26ms proc-sys-fs-binfmt_misc.mount
   25ms sys-fs-fuse-connections.mount
   20ms systemd-update-utmp-runlevel.service
   19ms sysstat-collect.service
   19ms modprobe@efi_pstore.service
   17ms systemd-tmpfiles-setup-dev.service
   16ms modprobe@dm_mod.service
    5ms modprobe@loop.service
   51us blk-availability.service

And bellow is the output of systemctl unmask snapd.service, just to be sure:

Removed "/etc/systemd/system/snapd.service".

Any further ideas about what can be checked?

Well, the data you’ve collected doesn’t make sense (ensemble).

Your original post Summary made sense, but, since then, the output hasn’t been diagnostic. So, I don’t know. I don’t have a mac to do tests on, but, it should be fairly consistent with the other platforms, I would think?

So, I don’t know. I’m going to go do some more reading to see if there’s something else I could suggest. But, otherwise, I’m stumped.

Can you boot a different OS (version) from a USB device or other removable media? If you can, you might try Oracular or even Plucky just to see if this makes a difference in bootup time.

After reading a little more and given the data in your original post, I feel the issue you are experiencing could have something to do with your hardware and/or firmware and not show up clearly in the OS diagnostics.

If, however, it is the snapd.service issue somehow behaving strangely, you might consider the steps taken to solve a snapd issue that manifested differently but, the mitigation approach may solve your issue as well. Please see: Snapcraft forum ref #44500

Sorry for the delayed reply. I was going to reply at the same day as your first reply, but I took some time to make some tests.

I don’t know why, but I just can’t run Ubuntu USB Live on this Macbook Pro. It always crash at the Ubuntu black screen. I downloaded, re-downloaded, checked the SHA256SUM… It won’t run, and I tried several times. Perhaps Ubuntu doesn’t work well with Ventoy?

I also tried some other distros in USB Live: Bodhi, Puppy, Mint (Cinnamon) and Kubuntu. Bodhi and Puppy are the distros with the fastest boot time (between 1m 32 to 1m 45s with Bodhi and 1m 17s to 1m 20s with Puppy), with Kubuntu being the slowest (from 4m 3s up to 9m 57s !!) and Mint Cinnamon in the middle (3m 45s to 4m 8s).

I recently upgrade the RAM from 4 GB to 16 GB, so I may try to install other distros (or not, because the CPU and GPU are still the same old CPU and GPU), but I would still like to find a way to solve this issue.

The Bodhi and Puppy times are actually not bad! What version USB? 2 or 3? USB 2.0 limits the speed of the boot-up noticeably.

In fact, if you were able to boot Lubuntu at those speeds you could declare victory really. Total boot depends on the speed of your hardware, the speed of the firmware, the speed/complexity of the OS (in general) and the hardware/software configuration, possibly your network. Your Lubuntu configuration had 2885 packages and 16 snaps. I don’t believe this is completely default.

For comparision, my desktop (Oracular) takes about a minute to boot, but, the desktop has an i9 9th gen processor (gain), more memory, the OS is installed on an nvme(gain), a somewhat better graphics card (gain) and a backplane for spinning hdds (this is a loss Re: boot-up speed - it takes some time to get these guys to spin up and then mount, but, not too bad).

So, let’s go back to your systemd-analyze:

graphical.target reached after 39.261s in userspace.

Boot Lubuntu again and do another systemd-analyze, and if it is reasonable (below 60 seconds) type:

grep -i nouveau /var/log/Xorg.0.log | tail

If you don’t see anything then you’re loading some graphics driver other than the default. If you do see something, what is the value of the last line’s timestamp?

Your graphics card is PCIe 2? Is this correct? This is pretty slow…

Also, is Lubuntu installed on an hdd? Is it a 5400rpm or 7200rpm drive? But, again, 5 minutes seems excessive. But, you won’t do too much better than a minute I don’t think…

What is your network situation. Are you trying to connect anything over your net? Samba, NFS, etc.?

When Apple switched to the ARM-based Apple Silicon architecture with the first M1 Mac computers, virtualization was mostly limited to Windows 11 on ARM and some ARM Linux distributions… Performance will also be “really slow,” since x86 instructions have to be translated to ARM. The company said, “Windows boot time is about 2-7 minutes, depending on your hardware. Windows operating system responsiveness is also low.”- See: https://www.howtogeek.com/parallels-can-now-run-x86-windows-and-linux-on-apple-silicon-mac/

The article is about virtualization, but, it could still be relevant if in fact this translation has to occur in order for the processor to execute.