Slow Boot

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
ngonzalez

Slow Boot

Post by ngonzalez »

Hello guys,
I have a Toshiba Sattelite Laptop with a 480GB SSD drive that i did a fresh install of Linux Mint 19 and it takes over 2 minutes to start. When i ran systemd-analyze blame the first line that comes out is this one

2min 9.998s systemd-cryptsetup@cryptswap1.service

How can i make that service to start faster? or why is it taking that long to start?

Any help would be appreciated.
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
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Slow Boot

Post by catweazel »

ngonzalez wrote: Tue Jul 10, 2018 2:09 pm 2min 9.998s systemd-cryptsetup@cryptswap1.service
You're probably running kernel 4.15.0-24. Revert to an earlier 4.15 kernel. systemd-cryptsetup@cryptswap1.service is probably waiting around because the random number generator doesn't have enough entropy. Kernel 4.15.0-24 made drastic changes that have now been removed in the next version of 4.15 due out soon.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
sam_glaim

Re: Slow Boot

Post by sam_glaim »

Installed LM 19 and had the same issue with very slow boot and also slow shut down.

I've just installed LM 18.3 'Sylvia' (Cinnamon) on the same system and same hardware and the slow boot/shut down problem is not there.
raywoods

Re: Slow Boot

Post by raywoods »

My sympathies with everyone with slow booting in Linux Mint 19 (all desktops) 64 and 32 bit. My old Dell Latitude D630 which used to boot in <60 seconds now takes >6 minutes today. Changing the Kernel makes no difference (only different Error messages). from GRUB start to Plymouth screen takes 70 odd seconds, then the HD light bursts into life only to extinguish again a minute later when the screen goes blank again. After another four minutes of starring at a blank screen there are a few flashed messages then, finally, the log in screen comes to life. Once my password is entered there is another long wait whilst the Desktop eventually bursts into life. Once the Desktop (MATE in my case) starts everything is fine smooth and Dandy.

I think there is something wrong with Grub/SystemD, probably waiting for something to start or react which isn't on my system.

Each time there is a System Update I scan the lists, looking for a pertinent update but sadly, to date nothing has changed.

I'm a patient man but....
gort2000

Re: Slow Boot

Post by gort2000 »

I've installed LM19 on three old laptops now. 2 ten year old laptops had very slow (over 5 min) boot times with all the 4.15 kernels. While a 12 year old Lenovo 3000 C100 laptop with IDE HDD managed to boot in a respectable 1 min 20 sec with the 4.15 kernels.
My solution for the slow booting laptops was to downgrade the kernels. By installing Ukuu app and downloading the Mainline Linux Kernels. I tested various kernels and found kernel 4.7.10 gave me the fastest boot times I have seen on these old machines.
benali72
Level 4
Level 4
Posts: 278
Joined: Sat Mar 23, 2013 11:49 am

Re: Slow Boot

Post by benali72 »

I installed 19.1 on four 6 -10 year old computers that have been running 17.1 without any problems for several years.

I've experienced several slow boot/shutdown problems with 19.1 I did not have with 17.1 --

(1) The message "Scanning for BTRFS file system" displays for about 25 seconds during boot on every system--
Solution here -- viewtopic.php?f=46&t=272960
(2) Baloo File Daemon was auto-launched at startup and eating a lot of CPU.
The solution was simple -- just un-check the box to auto-start the Baloo Daemon in Settings->Session and Startup.
(3) Shutdown is slow, it displays the message --
"A stop job is running for Session c2 of user... (1m 30s)"
This does not happen every time I shutdown, it's intermittent. I'm currently researching this -- there are many threads on the web about it -- and I'll post the solution if I find one that works for me.
--UPDATE-- So apparently this happens because an app is being sent a SIGTERM during shutdown and refuses to shut itself down politely. You can either identify and fix that process. Or you can edit the default wait of 90 secs before the kernel sends a SIGKILL to that app. To reduce the 90 secs default time, edit /etc/systemd/system.conf and alter the value of #DefaultTimeoutStartSec=90s to something like #DefaultTimeoutStartSec=30s.
More detail at -- https://bugs.launchpad.net/ubuntu/+sour ... ug/1457400 and
https://unix.stackexchange.com/question ... c2-of-user

Meanwhile, thank you to @gort2000 for his tip about using older kernels on older computers. I'll look into this. Cheers.
ngonzalez

Re: Slow Boot

Post by ngonzalez »

catweazel wrote: Wed Jul 11, 2018 1:50 am
ngonzalez wrote: Tue Jul 10, 2018 2:09 pm 2min 9.998s systemd-cryptsetup@cryptswap1.service
You're probably running kernel 4.15.0-24. Revert to an earlier 4.15 kernel. systemd-cryptsetup@cryptswap1.service is probably waiting around because the random number generator doesn't have enough entropy. Kernel 4.15.0-24 made drastic changes that have now been removed in the next version of 4.15 due out soon.
catweazel i switch to 4.15.0-23 and worked like a charm.

978ms systemd-cryptsetup@cryptswap1.service

Thank you for your help :)
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Slow Boot

Post by catweazel »

ngonzalez wrote: Wed Jul 11, 2018 5:39 pm Thank you for your help :)
You're more than welcome. Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
benali72
Level 4
Level 4
Posts: 278
Joined: Sat Mar 23, 2013 11:49 am

Re: Slow Boot

Post by benali72 »

This thread also addresses "slow boot" problems for 19.1 --- viewtopic.php?f=46&t=273111

It's all too much for me... I'm managing a bunch of older machines and I'm getting various "slow boot" problems on all of them after the 19.1 install.

The problems are minor -- boot and shutdown times that are longer than 17.x -- but I don't want to manage kernels, etc.

I'm going back to 17. I'll try again when 19.2 is available.

Thanks everyone for your help.
User avatar
AndyMH
Level 21
Level 21
Posts: 13704
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Slow Boot

Post by AndyMH »

Kernel 4.15.0-24 boot time > 3mins, 4.15.0-23 ~ 20 secs. This on an old Dell latitude E4200.

Playing on another laptop before I commit to upgrading my 'daily driver'. :)
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
raywoods

Re: Slow Boot

Post by raywoods »

Good news at last. I've just tried the GRUB_CMDLINE_LINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d" edit in my GRUB file and my Dell Latitude D630 which, after installing the 4.15.0-29 kernel slowed my Mint 18.3 boot time right down to > 6 minutes. Application of this edit has changed the boot time down to < 1 minute, including POST, through Logging in to fully operational GUI. (And this is with spinning disks too.) It even radically sped up my earlier 4.13 Kernel as well; obviously this problem has been slowly creeping up upon us until 4.15 put the boot in!

I would be very interested as to why this small change in the GRUB script brought about such a dramatic change in performance as, at the moment I feel like a Script Kiddie who has entered some random keyboard strokes and achieved magic!

In case you too are suffering a similar problem, here is what I did.
1. I entered into the /ect folder as the Administrator (Right click on the folder and select "Open as Administrator").
2. From the new window, open the /default folder.
3. Find the file "grub", right click on it and open in the Text Editor.
3a. It is a good idea to do a quick "Save As" and generate a grub.bak file (just in case)!
4. Find the line starting "GRUB_CMDLINE_LINE_LINUX_DEFAULT=" and place a "#" at the start of the line to make it a 'comment' and stop it from being read by the system.
5. Insert a line underneath and type/copy GRUB_CMDLINE_LINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d"
6. Save the file as grub (not grub.bak!)
7. You now need to open the Terminal Command Line and enter "sudo update-grub". This sets up the system to enact your new grub file on rebooting.
8. Close all your open windows and check all those backup files again, you never know!

Once this has been done, reboot your computer and hopefully your box will be hot and kicking! If not, you will still have your grub.bak file to fall back upon.

Don't forget, always ensure you have up to date backups on hand so, if the worse occurs, you can reinstall from scratch.

My thanks to gort2000 who put me onto the track of this solution.
Last edited by raywoods on Sun Jul 22, 2018 2:39 pm, edited 1 time in total.
greensam88

Re: Slow Boot

Post by greensam88 »

raywoods wrote: Sat Jul 21, 2018 2:18 pm Good news at last. I've just tried the GRUB_CMDLINE_LINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d" edit in my GRUB file and my Dell Latitude D630 which, after installing the 4.15.0-29 kernel slowed my Mint 18.3 boot time right down to > 6 minutes. Application of this edit has changed the boot time down to < 1 minute, including POST, through Logging in to fully operational GUI. (And this is with spinning disks too.) It even radically sped up my earlier 4.13 Kernel as well; obviously this problem has been slowly creeping up upon us until 4.15 put the boot in!

I would be very interested as to why this small change in the GRUB script brought about such a dramatic change in performance as, at the moment I feel like a Script Kiddie who has entered some random keyboard strokes and achieved magic!

In case you too are suffering a similar problem, here is what I did.
1. I entered into the /ect folder as the Administrator (Right click on the folder and select "Open as Administrator").
2. From the new window, open the /default folder.
3. Find the file "grub", right click on it and open in the Text Editor.
3a. It is a good idea to do a quick "Save As" and generate a grub.bak file (just in case)!
4. Find the line starting "GRUB_CMDLINE_LINE_LINUX_DEFAULT=" and place a "#" at the start of the line to make it a 'comment' and stop it from being read by the system.
5. Insert a line underneath and type/copy GRUB_CMDLINE_LINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d"
6. Save the file as grub (not grub.bak!)
7. You now need to open the Terminal Command Line and enter "update-grub". This sets up the system to enact your new grub file on rebooting.
8. Close all your open windows and check all those backup files again, you never know!

Once this has been done, reboot your computer and hopefully your box will be hot and kicking! If not, you will still have your grub.bak file to fall back upon.

Don't forget, always ensure you have up to date backups on hand so, if the worse occurs, you can reinstall from scratch.

My thanks to gort2000 who put me onto the track of this solution.
Thanks so much for this solution. Worked perfectly for my Inspiron 1420 laptop which was having boot times in excess of 5 minutes. Now it's a more respectable minute or so for bootup.
Locked

Return to “Installation & Boot”