I'm lately having slow startup times (90sec vs 20sec in the past) since I upgraded from Ubuntu 18.04 to 20.04.
I'm on Ubuntu 20.04.1 LTS 64-bit. I'm working on a hybrid SSD (120GB) + HHD (500GB) system, Intel Core i3-6100U CPU @ 2.30GHz × 4 and 8GB of RAM DDR4. My partitions are: SSD: 249MB EFI (/boot/efi
), 40GB FileSystem (/
), 8GB Swap and 72 GB FileSystem (/home
). The HDD is not mounted.
I've formatted my system and re-installed Ubuntu, but the booting time is pretty much the same.
I also tried to Open /etc/fstab
(as superuser), remove
(or comment out) the line contains old swap partition, set up a new swap:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdc2 during installation
UUID=cf116583-5203-458c-855e-6f412a1ba35d / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sdc1 during installation
UUID=4C04-C9BD /boot/efi vfat umask=0077 0 1
# /home was on /dev/sdc4 during installation
UUID=a5f9b844-bb2a-49e0-9a8e-d88c76eeb832 /home ext4 defaults 0 2
# swap was on /dev/sdc3 during installation
# UUID=3bd915e8-cdd5-4ffd-a477-b355a73d53b3 none swap sw 0 0
And, I also cancelled the Press Ctrl+C to cancel all filesystem checks in progress
message at the booting by adding fsck.mode=skip
to /etc/default/grub
.
Here are some commands I ran for troubleshooting along with their respective output:
$ systemd-analyze time
Startup finished in 23.446s (firmware) + 9.900s (loader) + 5.114s (kernel) + 41.224s (userspace) = 1min 19.686s
graphical.target reached after 40.975s in userspace
$ systemd-analyze blame
24.614s plymouth-quit-wait.service
11.743s dev-sdb2.device
10.361s snapd.service
9.676s NetworkManager-wait-online.service
6.549s dev-loop8.device
6.492s dev-loop10.device
6.460s dev-loop9.device
6.413s dev-loop11.device
4.894s dev-loop0.device
4.856s dev-loop4.device
4.707s dev-loop2.device
4.705s dev-loop1.device
4.693s dev-loop6.device
4.688s dev-loop3.device
4.582s dev-loop7.device
4.526s dev-loop5.device
3.761s upower.service
3.310s systemd-rfkill.service
2.588s udisks2.service
2.232s fwupd.service
2.108s systemd-logind.service
2.025s accounts-daemon.service
1.931s networkd-dispatcher.service
1.497s user@1000.service
1.383s polkit.service
1.264s avahi-daemon.service
1.223s bluetooth.service
1.214s NetworkManager.service
1.119s systemd-resolved.service
1.037s switcheroo-control.service
1.022s apport.service
1.009s keyboard-setup.service
954ms systemd-timesyncd.service
900ms systemd-journald.service
868ms snapd.apparmor.service
826ms systemd-udev-trigger.service
822ms grub-common.service
In the following command the time when unit became active or started is printed after the @
character. The time the unit took to start is printed after the +
character.
$ systemd-analyze critical-chain
graphical.target @40.975s
└─multi-user.target @40.956s
**└─kerneloops.service @25.596s +293ms**
└─network-online.target @25.548s
**└─NetworkManager-wait-online.service @15.866s +9.676s
└─NetworkManager.service @14.638s +1.214s**
└─dbus.service @14.590s
└─basic.target @14.444s
└─sockets.target @14.443s
**└─snapd.socket @14.434s +6ms**
└─sysinit.target @14.374s
**└─snapd.apparmor.service @13.504s +868ms**
└─apparmor.service @13.042s +452ms
└─local-fs.target @13.032s
└─run-user-1000-doc.mount @30.724s
└─run-user-1000.mount @18.199s
└─swap.target @12.881s
**└─dev-sdb3.swap @12.750s +114ms**
└─dev-sdb3.device @12.730s
Please, take into account that I'm a general user of Ubuntu, so practical solutions will be appreciated.
EDIT 16:35 2020/10/06
Screenshots and info asked by @heynnema:
$ grep -i swap /etc/fstab
# swap was on /dev/sdc3 during installation
UUID=316dc5cd-e888-48b8-868a-0e5d6072e480 none swap sw 0 0
$ sudo blkid
/dev/sdb2: UUID="cf116583-5203-458c-855e-6f412a1ba35d" TYPE="ext4" PARTUUID="8767a42b-380a-45af-87f9-84c9fe0a6bc4"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="HDD" UUID="42365cfd-df11-4b02-9f9b-9047da487338" TYPE="ext4" PARTUUID="ee264f0e-6367-4360-9216-a3b24c63d56b"
/dev/sdb1: UUID="4C04-C9BD" TYPE="vfat" PARTUUID="8648f750-04c5-4508-8b4e-82f7b947e6b9"
/dev/sdb3: UUID="316dc5cd-e888-48b8-868a-0e5d6072e480" TYPE="swap" PARTLABEL="lol" PARTUUID="86bf4b4a-0d1e-4341-94fb-c674c1c39b88"
/dev/sdb4: UUID="a5f9b844-bb2a-49e0-9a8e-d88c76eeb832" TYPE="ext4" PARTUUID="3833323d-93a2-4961-9ba8-a3aee724153e"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
$ ls -al /var/crash
total 8
drwxrwsrwt 2 root whoopsie 4096 jul 31 18:31 .
drwxr-xr-x 14 root root 4096 jul 31 18:35 ..
Screenshots from GParted and Disks (SMART):
EDIT 18:07 2020-10-06
@heynnema here are the last requests:
$ systemctl status plymouth-quit-wait
Loaded: loaded (/lib/systemd/system/plymouth-quit-wait.service; stat>
Active: inactive (dead) since Tue 2020-10-06 17:11:13 CEST; 42min ago
Process: 1056 ExecStart=/bin/plymouth --wait (code=exited, status=0/S>
Main PID: 1056 (code=exited, status=0/SUCCESS)
oct 06 17:10:48 matheus-Vostro-15-3568 systemd[1]: Starting Hold until bo>
oct 06 17:11:13 matheus-Vostro-15-3568 systemd[1]: plymouth-quit-wait.ser>
oct 06 17:11:13 matheus-Vostro-15-3568 systemd[1]: Finished Hold until bo>
$ free -h
total used free shared buff/cache available
Mem: 7,6Gi 1,9Gi 3,9Gi 196Mi 1,9Gi 5,3Gi
Swap: 7,4Gi 0B 7,4Gi
$ sysctl vm.swappiness
vm.swappiness = 60
$ ls -al /
total 84
drwxr-xr-x 20 root root 4096 oct 5 23:57 .
drwxr-xr-x 20 root root 4096 oct 5 23:57 ..
lrwxrwxrwx 1 root root 7 oct 5 23:49 bin -> usr/bin
drwxr-xr-x 4 root root 4096 oct 6 00:09 boot
drwxrwxr-x 2 root root 4096 oct 5 23:57 cdrom
drwxr-xr-x 21 root root 4540 oct 6 17:10 dev
drwxr-xr-x 127 root root 12288 oct 6 16:20 etc
drwxr-xr-x 4 root root 4096 oct 5 23:58 home
lrwxrwxrwx 1 root root 7 oct 5 23:49 lib -> usr/lib
lrwxrwxrwx 1 root root 9 oct 5 23:49 lib32 -> usr/lib32
lrwxrwxrwx 1 root root 9 oct 5 23:49 lib64 -> usr/lib64
lrwxrwxrwx 1 root root 10 oct 5 23:49 libx32 -> usr/libx32
drwx------ 2 root root 16384 oct 5 23:48 lost+found
drwxr-xr-x 3 root root 4096 oct 6 16:49 media
drwxr-xr-x 2 root root 4096 jul 31 18:27 mnt
drwxr-xr-x 2 root root 4096 jul 31 18:27 opt
dr-xr-xr-x 251 root root 0 oct 6 17:10 proc
drwx------ 6 root root 4096 oct 6 00:19 root
drwxr-xr-x 34 root root 880 oct 6 17:11 run
lrwxrwxrwx 1 root root 8 oct 5 23:49 sbin -> usr/sbin
drwxr-xr-x 12 root root 4096 oct 6 02:15 snap
drwxr-xr-x 2 root root 4096 jul 31 18:27 srv
dr-xr-xr-x 13 root root 0 oct 6 17:10 sys
drwxrwxrwt 21 root root 4096 oct 6 17:57 tmp
drwxr-xr-x 14 root root 4096 jul 31 18:28 usr
drwxr-xr-x 14 root root 4096 jul 31 18:35 var
$ sudo dmidecode -s bios-version
2.6.0
Exact make/model # of my computer/motherboard: DELL vVstro 15 3568, i3-6100u
EDIT 18:05 2020-10-08
Messages shown when hitting Esc at boot:
/dev/sdb2
or is it/dev/sdb3
) to/etc/fstab
? Secondly, the more proper way to skip fsck might be to change the last column of /etc/fstab to0
(see https://askubuntu.com/questions/9939/what-do-the-last-two-fields-in-fstab-mean) - but why do you want to disable it? – d1bro Oct 06 '20 at 13:21grep -i swap /etc/fstab
andsudo blkid
. Show me a screenshot ofgparted
and theDisks
SMART Data (scrollable) window. Do thefsck
in my partial answer. – heynnema Oct 06 '20 at 14:21ls -al /var/crash
. Please explain your disk configuration, as I see reference to sdb and sdc. Where's sda? Start comments to me with @heynnema or I'll miss them. – heynnema Oct 06 '20 at 14:32Disks
SMART Data. StartDisks
, then select the disk, go to the "hamburger" menu, and select SMART Data & Tests there. It's a scrollable window, so you might need 2 screenshots per disk. Did you do thefsck
on both disks? Whenever you update your question with requested info, remember to send a comment to the requester, using the "@heynnema" to start the comment, like I did with this comment. – heynnema Oct 06 '20 at 15:03systemctl status plymouth-quit-wait
, andfree -h
, andsysctl vm.swappiness
, andls -al /
, andsudo dmidecode -s -bios-version
, and tell me the exact make/model # of your computer or motherboard. Sorry for all of the tedious questions, but I'm trying to nail down where your problem is. – heynnema Oct 06 '20 at 15:35