My boot is very slow.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
damienbourgeonnui

My boot is very slow.

Post by damienbourgeonnui »

Hello,

I run Mint Sylvia Mate and my boot is very slow. When I do

Code: Select all

systemd-analyze blame
I have:

Code: Select all

~]$ systemd-analyze blame
         16.442s apt-daily.service
          7.889s NetworkManager-wait-online.service
          4.390s apt-daily-upgrade.service
          1.781s snapd.service
          1.351s vdr.service
           784ms gpu-manager.service
           783ms grub-common.service
           752ms ufw.service
           524ms lvm2-monitor.service
           514ms dev-sdc5.device
           318ms bluetooth.service
           295ms tlp.service
           248ms nmbd.service
           245ms upower.service
           220ms samba-ad-dc.service
           219ms tor@default.service
           217ms snapd.seeded.service
           189ms lightdm.service
           184ms networking.service
           174ms systemd-udev-trigger.service
           146ms ModemManager.service
           144ms smbd.service
           122ms accounts-daemon.service
So after having searched google I found that it is possible to play with "apt-daily.service" and delay its launch.
This is Debian bug #844453. apt-daily.service shouldn't be run during boot, but only some time afterward.

As a workaround, do sudo systemctl edit apt-daily.timer and paste the following text into the editor window:

# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min
This changes the "timer" that triggers apt-daily.service to run at a random time between 15 min and 45 min after boot, and once a day thereafter. See the systemd.timer manpage for additional (not very well written, alas) explanation of what this means.
source: https://askubuntu.com/questions/800479/ ... ly-service

Can I do this or do you have any solution?

Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
sdibaja
Level 5
Level 5
Posts: 900
Joined: Sun May 08, 2011 12:57 pm
Location: Baja California, Mexico

Re: My boot is very slow.

Post by sdibaja »

how slow is "very slow"?

are you struggling to gain 16 seconds? ... your systemd-analyze blame says "16.442s apt-daily.service"
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
damienbourgeonnui

Re: My boot is very slow.

Post by damienbourgeonnui »

are you struggling to gain 16 seconds? ... your systemd-analyze blame says "16.442s apt-daily.service"
Yes, I would like apt-daily.service to launch after the boot so I can boot faster. I am wondering if it is dangerous to apply the fix in the link...
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: My boot is very slow.

Post by thx-1138 »

No, it's perfectly safe.
Hoser Rob
Level 20
Level 20
Posts: 11806
Joined: Sat Dec 15, 2012 8:57 am

Re: My boot is very slow.

Post by Hoser Rob »

Unless you're booting off a network, which I don't think many Mint users do, you can disable NetworkManager-wait-online.service too. Do this in the terminal You can just copy and paste):

Code: Select all

sudo systemctl disable NetworkManager-wait-online.service
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
User avatar
karlchen
Level 23
Level 23
Posts: 18177
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: My boot is very slow.

Post by karlchen »

Hi, damienbourgeonnui.
We still have got no idea, how slow in seconds or in minutes and seconds, "very slow" is.
Please, let us know which timespan we are talking about.
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: My boot is very slow.

Post by trytip »

do this to "mask" these services

Code: Select all

systemctl mask apt-daily.service
systemctl mask apt-daily-upgrade.service
systemctl mask NetworkManager-wait-online.service
to see that no other dependencies rely on what you masked, when you boot and see the Mint Logo press ESC and look for any entries in RED if you do open Logs and look in the important tab on what else needs to be masked

to undo the masking:
do this to "unmask" these services

Code: Select all

systemctl unmask apt-daily.service
systemctl unmask apt-daily-upgrade.service
systemctl unmask NetworkManager-wait-online.service
then post a complete systemd-analyze blame
Image
damienbourgeonnui

Re: My boot is very slow.

Post by damienbourgeonnui »

Thank you all for your reply. I will try this evening (I am in France at work).
damienbourgeonnui

Re: My boot is very slow.

Post by damienbourgeonnui »

Thank you all for your replies. I deleted both apt-daily.service & NetworkManager-wait-online.service and gained more than 20s at boot.
do this to "mask" these services...
I didn't do this...though when I have time, a week-end, I will re-enable apt-daily.service & NetworkManager-wait-online.service , mask them, to be sure, as you said, that
no other dependencies rely on what you masked
Locked

Return to “Installation & Boot”