My boot is very slow.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
damienbourgeonnui
Level 1
Level 1
Posts: 4
Joined: Wed Aug 15, 2018 2:43 pm

My boot is very slow.

Post by damienbourgeonnui » Wed Aug 15, 2018 2:49 pm

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.

User avatar
sdibaja
Level 5
Level 5
Posts: 617
Joined: Sun May 08, 2011 12:57 pm
Location: Baja California, Mexico

Re: My boot is very slow.

Post by sdibaja » Wed Aug 15, 2018 5:58 pm

how slow is "very slow"?

are you struggling to gain 16 seconds? ... your systemd-analyze blame says "16.442s apt-daily.service"

damienbourgeonnui
Level 1
Level 1
Posts: 4
Joined: Wed Aug 15, 2018 2:43 pm

Re: My boot is very slow.

Post by damienbourgeonnui » Thu Aug 16, 2018 7:37 am

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 6
Level 6
Posts: 1085
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: My boot is very slow.

Post by thx-1138 » Thu Aug 16, 2018 7:43 am

No, it's perfectly safe.

Hoser Rob
Level 12
Level 12
Posts: 4084
Joined: Sat Dec 15, 2012 8:57 am

Re: My boot is very slow.

Post by Hoser Rob » Thu Aug 16, 2018 9:09 am

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

User avatar
karlchen
Level 19
Level 19
Posts: 9187
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: My boot is very slow.

Post by karlchen » Thu Aug 16, 2018 9:23 am

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
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

User avatar
trytip
Level 8
Level 8
Posts: 2048
Joined: Tue Jul 05, 2016 1:20 pm

Re: My boot is very slow.

Post by trytip » Thu Aug 16, 2018 10:13 am

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
Level 1
Level 1
Posts: 4
Joined: Wed Aug 15, 2018 2:43 pm

Re: My boot is very slow.

Post by damienbourgeonnui » Thu Aug 16, 2018 10:16 am

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

damienbourgeonnui
Level 1
Level 1
Posts: 4
Joined: Wed Aug 15, 2018 2:43 pm

Re: My boot is very slow.

Post by damienbourgeonnui » Fri Aug 17, 2018 12:34 pm

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

Post Reply

Return to “Installation & Boot”