16.04: Slow boot no matter what I remove or do (Files for analysis provided)
I've abandoned the version I was trying to run after countless attempts to speed it up, and downgraded to Ubuntu Gnome 14.04. I had stripped away so much of Ubuntu 16.04 that it was starting to cause problems.
Switching to Gnome 14.04 made everything boot and run so much faster. My boot time went from 55 seconds with Unity 16.04 to 20 seconds with Gnome 14.04.
In the end, no matter what I did, I could not speed anything up any faster with 16.04. The solution for me was a downgrade, even running on newer hardware.
To confirm this, I decided to also downgrade my PC from Kubuntu 16.04 to Gnome 14.04. It's a quad-core i7 @ 4Ghz with 16GB RAM and SSD drives. My boot time was originally ~8 seconds and it's now ~5 seconds.
Related videos on Youtube
Delorean
PROGRAMMER [proh-gram-er] noun Someone who solves a problem you didn't know you had in a way you don't understand. See also : Cisco Certified Network Associate Router>enable Router#show ? me Someone you only call when there's problems you Someone I only talk to when you have problems problems Always mine
Updated on September 18, 2022Comments
-
Delorean over 1 year
I'm very frustrated with now long it takes my laptop to boot since I installed Ubuntu.
Prior to Ubuntu, I had Kubuntu 15.04 which booted from Grub to desktop in less than 20 seconds. I switched to Ubuntu (64-bit) because I heard it was faster. So far, it's so much worse. With autologin it takes 55 seconds. Without, I get from Grub to my login screen in 35 seconds. Then after entering my password and hitting ENTER, it takes another 21 seconds to show the desktop.
Also should mention that while booting, there is no purple screen at all or Ubuntu splash logo with scrolling dots.
Once I'm at my desktop, everything runs fine and fast. It sleeps and resumes fine etc. It's just the booting that concerns me. Since I have a dual-boot system, I tend to reboot into Windows 10 to do certain things. Booting into Win10 is super fast, but booting back into Ubuntu takes way too long.
I'm using the exact same partition I was before (which I formatted for a fresh install of Ubuntu).
I've been using
systemd-analyze
to figure out what's causing the delays. So far I've tried the following:- Updated Kernel to 4.6
- Disabled NetworkManager-wait-online service
- Disabled Samba-ad-dc service
- Disabled smbd service
- Disabled mnbd service
- Disabled and uninstalled apparmor
- Disabled grub-common service
Here is the screen I see between the Grub menu and login screen:
I'm aware this is
fsck
and it pops up pretty much right away after the Grub menu. I'm also aware that because it comes up right away, that it's not really taking much time. But that screen is what I see until the login screen comes up. No splash screen with scolling dots on the bottom, no purple screen.Here is a link to my dmesg output
My dmesg for some reason only goes to 25 seconds.
Also, I plotted my boot with
systemd-analyze plot > file.svg
and end up with times that don't make sense. And actually, the chart only goes to 20 seconds, yet it takes much longer for my login screen to come up. Here's my output (I linked the image instead of posting it because of the size of the image):Output of
systemd-analyze blame
(below)Output of
systemd-analyze critical-chain
(below)Here is the output of
fdisk -l
(below)Like I said before, I'm using the same partitions as before (sdb6 for /, sdb3 for /home, sdb5 for swap). They were formatted. So I'm at a loss as to why this could possibly be happening.
sda is an SSD drive, sdb is a mechanical 1TB drive.
The rest of my hardware:
HP DV7 laptop. Intel i7 processor, 8GB Ram, AMD Radeon HD 7960M XT graphics (dual switchable with Intel graphics).
I've been working at this for a while, hopefully my digging shows this, and I could really use some help here. I'll provide any other outputs you need.
Thanks in advance!
UPDATE
I tried booting with
network-manager
disabled and there was no difference in boot time. For some reason,networking.service
still shows in the blame list.Here are my systemd-analyze blame and critical-chain outputs:
BLAME
8.410s networking.service 7.267s ModemManager.service 7.138s accounts-daemon.service 5.327s systemd-logind.service 4.939s alsa-restore.service 4.595s systemd-user-sessions.service 4.166s dev-sdb6.device 3.683s loadcpufreq.service 3.455s apport.service 3.353s ondemand.service 3.261s cpufreqd.service 2.063s gpu-manager.service 1.643s polkitd.service 1.508s rsyslog.service 1.322s lm-sensors.service 1.224s lightdm.service 1.144s plymouth-start.service 1.026s systemd-modules-load.service 1.005s thermald.service 918ms systemd-tmpfiles-setup-dev.service 907ms avahi-daemon.service 772ms systemd-journald.service 534ms upower.service
Critical-chain
graphical.target @16.982s └─multi-user.target @16.982s └─cpufrequtils.service @16.976s +5ms └─loadcpufreq.service @13.268s +3.683s └─basic.target @8.324s └─sockets.target @8.324s └─avahi-daemon.socket @8.324s └─sysinit.target @8.230s └─systemd-update-utmp.service @8.102s +127ms └─systemd-tmpfiles-setup.service @7.768s +333ms └─local-fs.target @7.767s └─home.mount @7.704s +63ms └─systemd-fsck@dev-disk-by\x2duuid-e715a619\x2de892\x2d40dc\x2dbc17\x2d235e98e3ffe6.service @7.180s +463ms └─dev-disk-by\x2duuid-e715a619\x2de892\x2d40dc\x2dbc17\x2d235e98e3ffe6.device @7.167s
UPDATE 2
After disabling so much, and removing tons of apps, I'm still not getting anywhere. I do think however now, that this may be a problem with the DM or the DE... But going through all the logs are getting me nowhere so far.
-
GreggD almost 8 yearsSo... system itself and apps are still working with good speeds? My old machine started to work slower and slower, then I scanned system SSD using MHDD and found out that max read speed dropped to ~70MB/s (was >300MB/s previous time I checked). Drive must have been dying.
-
Delorean almost 8 yearsYes, everything else works fine and fast once booted. This is a fresh installation of Ubuntu.
-
GreggD almost 8 yearsNot sure if this could be the cause, but... Did you try disabling Radeon and switching to Intel? Apparently 16.04 does not support Radeons (although my HD 2600 works fine and very stable).
-
Delorean almost 8 yearsThere is no option in my BIOS to disable the Radeon adapter. From what I can tell, Ubuntu is only using the Intel graphics.
-
Rmano almost 8 yearsCheck with top. I had
appstreamcli
running at 100% slowing all down during the update check at the boot. See askubuntu.com/questions/775049/16-04-apt-update-never-ends -
Delorean almost 8 years@Rmano but top is real-time monitoring. I can't use it to check while booting. Besides, once I get to the desktop, everything is fine and runs fast. My CPU is idle and doesn't go above 1-2% when no apps are running. No processes are using CPU time.
-
Braiam almost 8 yearsTry to boot up without networking, also, don't blindly trust systemd analize output, it sometimes lies. Try to reboot the system couple of times first.
-
Delorean almost 8 years@Braiam I've rebooted dozens of times since I posted this with the same results. I'll try without networking. Is that by going to advanced options in Grub? As for trusting systemd, that's the only method I know of... Can you suggest a better way?
-
Braiam almost 8 yearsNo, just disconnecting the cable/flipping the switch should be enough. Another option is disabling network manager service with
systemctl disable NetworkManager
. -
Kanhiya almost 8 yearsi also have exactly same problem with 64 bit, i tried e4rat, now applications open faster, make sure to follow step by step tutorial given on net properly, boot times are still not improved, you need to remove ureadhead and ubuntu-minimal package before installing e4rat
-
Delorean almost 8 years@Braiam So I tried booting with
network-manager
disabled and posted my results in my question. No real change. -
Braiam almost 8 yearsCan you copy the text output instead of screenshots?
-
Delorean almost 8 years@Braiam Done. Is text output usually preferred?
-
Admin over 7 yearsCan you expand your answer please? Link only answers are not highly regarded.