Slow Boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
ngonzalez
Level 1
Level 1
Posts: 3
Joined: Sat Mar 17, 2018 4:46 pm

Slow Boot

Post by ngonzalez » Tue Jul 10, 2018 2:09 pm

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.

User avatar
catweazel
Level 17
Level 17
Posts: 7755
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Slow Boot

Post by catweazel » 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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

sam_glaim
Level 1
Level 1
Posts: 5
Joined: Wed Jul 11, 2018 9:33 am

Re: Slow Boot

Post by sam_glaim » Wed Jul 11, 2018 12:30 pm

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
Level 2
Level 2
Posts: 80
Joined: Mon Aug 10, 2009 5:48 pm
Location: Barkingside, ILFORD, Essex. UK
Contact:

Re: Slow Boot

Post by raywoods » Wed Jul 11, 2018 3:14 pm

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....

User avatar
smgordon1259
Level 2
Level 2
Posts: 71
Joined: Tue Jul 30, 2013 6:12 pm
Location: Wisconsin, USA

Re: Slow Boot

Post by smgordon1259 » Wed Jul 11, 2018 3:42 pm

I am using 4.15.0-24 with no issue , shutdown 8 seconds , boot time from post 1 minute, sshd hybrid drive
ASUS M5A78L-M/USB3
AMD FX-4350 (4.2gHz)
MSI GeForce GT730 - 2gb Memory
Linux Mint 19 MATE amd64/ Kernel 4.15.0-30
Primary: Seagate 500GB SSHD, Secondary: Seagate 1TB SSHD, Tertiary: Hitachi 750GB HD

gort2000
Level 1
Level 1
Posts: 10
Joined: Wed Jul 04, 2018 4:49 pm

Re: Slow Boot

Post by gort2000 » Wed Jul 11, 2018 3:58 pm

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: 217
Joined: Sat Mar 23, 2013 11:49 am

Re: Slow Boot

Post by benali72 » Wed Jul 11, 2018 4:41 pm

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
Level 1
Level 1
Posts: 3
Joined: Sat Mar 17, 2018 4:46 pm

Re: Slow Boot

Post by ngonzalez » Wed Jul 11, 2018 5:39 pm

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 17
Level 17
Posts: 7755
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Slow Boot

Post by catweazel » Thu Jul 12, 2018 2:19 am

ngonzalez wrote:
Wed Jul 11, 2018 5:39 pm
Thank you for your help :)
You're more than welcome. Cheers.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

benali72
Level 4
Level 4
Posts: 217
Joined: Sat Mar 23, 2013 11:49 am

Re: Slow Boot

Post by benali72 » Thu Jul 12, 2018 11:56 am

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 5
Level 5
Posts: 743
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Slow Boot

Post by AndyMH » Sun Jul 15, 2018 8:14 pm

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'. :)
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

raywoods
Level 2
Level 2
Posts: 80
Joined: Mon Aug 10, 2009 5:48 pm
Location: Barkingside, ILFORD, Essex. UK
Contact:

Re: Slow Boot

Post by raywoods » 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 "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
Level 1
Level 1
Posts: 1
Joined: Sun Jul 22, 2018 11:56 am

Re: Slow Boot

Post by greensam88 » Sun Jul 22, 2018 11:59 am

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.

Post Reply

Return to “Installation & Boot”