LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > elementary OS
User Name
Password
elementary OS This forum is for the discussion of elementary Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-28-2017, 01:48 AM   #1
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 17
Posts: 9,003
Blog Entries: 14

Rep: Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107
How To Make Elementary OS Loki Boot Faster


For some reason Elementary OS Loki (Ubuntu 16.04) is taking a long time to boot up and I'm having trouble figuring out why and which service to disable. It's about 3 seconds short of 3 minutes to the full screen DE.

Amazingly it shuts down in 3 seconds.

I installed BUM (Boot Up Manager) and unchecked bluethooth, services associated with cups and the printer. Boot up time was a little less but not by much.

Here's the output of the services running at start up.

Code:
MS-7845:~$ systemd-analyze blame

         23.969s apt-daily.service
          8.734s dev-sdb1.device
          7.062s NetworkManager-wait-online.service
          6.536s apparmor.service
          5.641s ufw.service
          5.329s libvirt-bin.service
          3.774s qemu-kvm.service
          3.235s systemd-tmpfiles-setup-dev.service
          3.162s ModemManager.service
          2.901s accounts-daemon.service
          2.694s console-setup.service
          2.409s NetworkManager.service
Now when I ran systemd-analyze plot > boot and looked at all of the services running at start up in FF "Plymouth-start.service" was all the way across the board for 2 min's. Here's the 7 services that are taking the longest:

1. -ufw.service 6.958 seconds
2. -systemd-tmpfiles-setup-dev.service 2.470 seconds
3. -qemu-kvm.service 1.933 seconds
4. -apparmor.service 5.819 seconds
5. -console-setup.service 1.949 seconds
6. -plymouth-start.service 13 seconds
7. -modemnanager.service 2.268 seconds

I found these 2 threads but I not so sure what the answer is or the fix really is. I really don't want to "try" things. Instead I want to fix the booting issue:-

https://askubuntu.com/questions/8004...-daily-service

https://nateofnine.com/2017/02/18/fi...os-slow-boots/

How can I be certain which service is taking so long and which one to disable?
 
Old 11-28-2017, 11:15 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,637

Rep: Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789Reputation: 2789
While you are waiting maybe take a peek at these ideas. https://wiki.debian.org/BootProcessSpeedup

Someone may have a guide on it somewhere.
 
Old 11-28-2017, 11:50 PM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 17
Posts: 9,003

Original Poster
Blog Entries: 14

Rep: Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107
Quote:
Originally Posted by jefro View Post
While you are waiting maybe take a peek at these ideas. https://wiki.debian.org/BootProcessSpeedup

Someone may have a guide on it somewhere.
Thanks

I have a few ideas now:-
 
Old 11-29-2017, 12:02 AM   #4
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 17
Posts: 9,003

Original Poster
Blog Entries: 14

Rep: Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107
I was able to solve the 3 minute booting issue.

After editing the /etc/systemd/system.conf file and changing the DefaultTimeoutStartSec=90s to 10 seconds and rebooted......
the system now boots in 45 seconds:-

Yahoo!
 
Old 11-29-2017, 01:12 AM   #5
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 289Reputation: 289Reputation: 289
UUID mismatch?

Hi. Great thread/details!!! From something I has seen, by any chance,
Might there be a mismatch of UUID in fstab (vs current 'real', per lsblk)?
(I was wondering why systemd would hang 'without good reason')
 
Old 11-29-2017, 01:19 AM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 17
Posts: 9,003

Original Poster
Blog Entries: 14

Rep: Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107
Quote:
Originally Posted by !!! View Post
Hi. Great thread/details!!! From something I has seen, by any chance,
Might there be a mismatch of UUID in fstab (vs current 'real', per lsblk)?
(I was wondering why systemd would hang 'without good reason')
Thanks-

No, don't think there was a mismatch of the UUID.

Are you running Elementary OS Loki !!!?
 
Old 11-29-2017, 01:42 AM   #7
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 289Reputation: 289Reputation: 289
No, just a thirst for theoretical learning
IF you've ever changed partitions since initial install, it might be worth a quick check. I once saw on LQ something about a grub resume=UUID... mismatch after partition changes, causing slowness.

I also saw the mention of ipv6. I tried researching "Plymouth-start.service" slow, but didn't notice anything. I just wish I knew every last exact detail about how all this works (yea, I know: the million lines of source code)

Anyway, if it works for you, that's all that counts. Despite the theoretical purists
 
1 members found this post helpful.
Old 11-29-2017, 02:07 AM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 17
Posts: 9,003

Original Poster
Blog Entries: 14

Rep: Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107Reputation: 1107
A thirst for theoretical learning is a-ok with me.

In fact the more you learn about Linux you'll have an incredible education and great resources.

Learn all you can !!! and you'll be a Guru before you know it:-

Nope, never changed partitions.

Like you I researched Plymouth-start.service too and didn't find anything worth writing home about.
At first I thought it was systemd-tmpfiles-setup-dev.service which creates, deletes and cleans up volatile and tmp files and directories based on the configuration file.

Tho the article you linked said it's not wise to set the DefaultTimeoutStart to 10 sec's it worked like a charm for me.
That article was created in May of 2016 so maybe the Dev's changed something since than?

Sometimes the Tips and Tricks Tech's are mistaken. Or at least in this case for Elementary OS they were:-

It's late:-

Cheers and thanks for sharing.
 
Old 05-25-2018, 03:03 PM   #9
sbanga95
LQ Newbie
 
Registered: May 2018
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
I was able to solve the 3 minute booting issue.

After editing the /etc/systemd/system.conf file and changing the DefaultTimeoutStartSec=90s to 10 seconds and rebooted......
the system now boots in 45 seconds:-

Yahoo!
That sounds awesome. I'm new to Linux and I just installed Elementary OS Loki. Can you give a quick step-by-step on how to do this? Really appreciate it man!
 
Old 05-28-2018, 11:42 AM   #10
TheTKS
Member
 
Registered: Sep 2017
Location: Canada
Distribution: Slackware, Ubuntu, elementary, Puppy, TinyCore, OpenBSD
Posts: 48

Rep: Reputation: Disabled
Quote:
Originally Posted by sbanga95 View Post
That sounds awesome. I'm new to Linux and I just installed Elementary OS Loki. Can you give a quick step-by-step on how to do this? Really appreciate it man!
sbanga95, I know you're asking Ztoracat, but I'll refer you to one of Ztoracat's links to answer what worked for me.

TL DR: for my elementaryOS Loki, changing the default timers to 14 sec or more gave me better boot time without causing errors (that I know of), changing apt daily service didn't make a difference for me. See instructions in https://askubuntu.com/questions/8004...-daily-service, post by cat Feb 28 '17 at 15:12.

Longer version:

I used this for elementaryOS Loki, Xubuntu 16.04 and Kubuntu 16.04 on two computers, and it worked for all 3 Ubuntu flavours / derivatives.

I went to the post linked by Ztoracat earlier
https://askubuntu.com/questions/8004...-daily-service

In one of my OSs, I tried the steps that start with "# apt-daily timer configuration override", but that didn't shorten boot time.

Then in the same OS I tried the steps posted by cat Feb 28 '17 at 15:12, changing default timers. One caution: that link and Ztoracat use 10 sec, someone else wrote not less than 30 sec. I tried 10 sec and booting was faster, but an error appeared in startup. No idea if it affected anything, I could sign into the OSs and didn't pursue it, but I tried a few different timer lengths. On all 3 OSs, 14 sec was the shortest timer without the startup error popping up. I added safety factor and made both timers 20 sec for boot time. Total boot time under 50 sec (from picking *buntu/elementary in GRUB menu to sign in block under 40 sec, from sign in to desktop in under 10 sec.)

I don't remember if I removed the "# apt-daily timer configuration override" from the one OS, but I didn't do it in the other two OSs, and got the same boot times in all three OSs.

Thanks Ztoracat for publishing your posts and links!

TKS

Adding two things:
- I used nano instead of gedit, and ran sudo not gksudo.
- I've removed Kubuntu 16.04 and installed Ubuntu 18.04 in its place. Total boot times 36 sec without these extra steps needed.

Last edited by TheTKS; 05-28-2018 at 11:52 AM. Reason: Add: alternative editor; problem not in my Ubuntu 18.04
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
elementary OS 0.4 Loki Screencast and Screenshots jeremy Linux - Screencasts and Screenshots 3 09-01-2017 05:14 PM
Elementary OS Loki - How do I install drivers? 18yu9wdef Linux - Newbie 1 11-04-2016 09:26 AM
elementary 0.4 loki on acer iconia tab w510 Swoncen elementary OS 1 09-15-2016 12:04 PM
LXer: elementary OS 0.4 Loki Screencast and Screenshots LXer Syndicated Linux News 0 09-13-2016 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > elementary OS

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration