4

I use Ubuntu 18.04 LTS, dual-booted with Win10. Whenever I boot the system, it takes ~3 minutes. Also before the login screen, this thing comes up of which I am attaching a screenshot. unknown logo

What does this logo stands for and if this is the reason for high boot time, how to get rid of it?

This is the output of systemd-analyze blame

    3min 28.455s apport-autoreport.service
    3min 20.522s fstrim.service
         51.936s dev-sda5.device
         48.922s systemd-journal-flush.service
         40.451s apparmor.service
         38.857s binfmt-support.service
         38.828s snap-vlc-770.mount
         38.827s console-setup.service
         38.806s dns-clean.service
         38.802s qemu-kvm.service
         36.102s snap-core18-1066.mount
         31.498s snap-sublime\x2dtext-58.mount
         29.766s snap-gtk2\x2dcommon\x2dthemes-5.mount
         29.665s snap-gimp-165.mount
         29.496s snap-gtk\x2dcommon\x2dthemes-1198.mount
         29.382s snap-sublime\x2dtext-67.mount
         29.351s snap-audacity-408.mount
         10.796s mysql.service
          9.811s mpd.service
          9.269s networking.service
          6.924s NetworkManager-wait-online.service
          5.682s systemd-tmpfiles-setup-dev.service
          5.257s bolt.service


Output of systemd-analyze critical-chain:

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 10.971s
└─multi-user.target @1min 10.971s
  └─mysql.service @1min 173ms +10.796s
    └─network.target @1min 171ms
      └─wpa_supplicant.service @55.935s +2.813s
        └─dbus.service @55.884s
          └─basic.target @55.878s
            └─sockets.target @55.878s
              └─snapd.socket @55.876s +815us
                └─sysinit.target @55.735s
                  └─swap.target @55.735s
                    └─dev-disk-by\x2duuid-62ba7a95\x2d7374\x2d4862\x2daeb1\x2dc5
                      └─dev-disk-by\x2duuid-62ba7a95\x2d7374\x2d4862\x2daeb1\x2d

I checked out How do I enable or disable Apport? and did sudo systemctl disable apport.service and now apport-autoreport.service is not there. But fstrim is still taking a huge amount of time. I went through https://ubuntuforums.org/showthread.php?t=2410364 but wasn't able to get a satisfying answer.

This is the disk partition: enter image description here If you have any advice, I would be happy to hear! Thanks!

8
  • Run systemd-analyze blame in a terminal and it will list the startup times of all apps and units running when you boot the system. Aug 12, 2019 at 8:56
  • Please also add the output of systemd-analyze critical-chain
    – Byte Commander
    Aug 12, 2019 at 9:50
  • To get rid of the splash screen, you can hit ESC (temporary) or open /etc/default/gruband remove splash in GRUB_CMDLINE_LINUX_DEFAULT (DO A BACKUP BEFORE MODIFYING THE FILE). But I'm pretty sure this doesn't cause the ~3min boot time. Here is a handy one-liner to remove it: sudo cp /etc/default/grub /etc/default/grub.bak && sudo sed -i s/splash// /etc/default/grub
    – Kev Inski
    Aug 12, 2019 at 10:16
  • @KevInski, can you please help with getting rid of fstrim taking too much time.
    – nkhl
    Aug 12, 2019 at 10:19
  • There is nothing I can do about it, but take a closer look at this thread. It may help you
    – Kev Inski
    Aug 12, 2019 at 10:39

1 Answer 1

4

To disable fstrim use:

rm /var/lib/systemd/timers/stamp-fstrim.timer
systemctl stop fstrim.service fstrim.timer
systemctl disable fstrim.service fstrim.timer
systemctl mask fstrim.service fstrim.timer

That will remove the 3m from your boot but does NOT fix the issue. You still need to hunt that down. For instance: do you have a swap partition? If so remove it and add a swap file to /etc/fstab and see if that was the issue. swap partition vs swap file

journalctl -u fstrim

will show a report on fstrim.

Mind that you should start fstrim manually if you do that and you can do that with

sudo fstrim -v /

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .