4

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):

01_disks_smart_SSD

02_disks_smart_SSD

disks_smart_HDD

gparted_sda

gparted_sdb

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:

messages shown when hitting ESC at boot

Mat S
  • 41
  • 1
  • 4
  • there seems to be something wrong with your swap setup ... why did you not enter the new swap (/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 to 0 (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:21
  • First, after I removed the swap partition and created a new one, I didn't know how to change etc/fstab, how do I do it? Second, I disable it because this message was showing up every time after I reboot and I read somewhere that it wasn't normal (I'll apply the proper way, thanks) – Mat S Oct 06 '20 at 14:02
  • 1
    Where do I start? If your system is doing a file system check at every start, there's probably a good reason for it, and you shouldn't try to disable it. Describe how you setup a new swap. Edit your question and show me grep -i swap /etc/fstab and sudo blkid. Show me a screenshot of gparted and the Disks SMART Data (scrollable) window. Do the fsck in my partial answer. – heynnema Oct 06 '20 at 14:21
  • I just added the new UUID to the /etc/fstab file using https://help.ubuntu.com/community/SwapFaq – Mat S Oct 06 '20 at 14:24
  • Also show me ls -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:32
  • @db429 You shouldn't recommend "to skip fsck might be to change the last column of /etc/fstab to 0". It's there for a good reason. – heynnema Oct 06 '20 at 14:34
  • @MatS Thank you for the screenshots. But what I was looking for was the Disks SMART Data. Start Disks, 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 the fsck 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:03
  • @heynnema I did everything you told me. On the "Try ubuntu" since I have 2 partitions with "Linux FileSystem" I did the change on both and no error showed. – Mat S Oct 06 '20 at 15:27
  • @MatS Excellent job! Your disks look fine. Edit your question once more, and show me systemctl status plymouth-quit-wait, and free -h, and sysctl vm.swappiness, and ls -al /, and sudo 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
  • @MatS Status please... – heynnema Oct 23 '20 at 17:49
  • @heynnema No improvement so far. – Mat S Nov 21 '20 at 16:40
  • @MatS Did you re-seat the modem card, update the BIOS, and add pci=noaer? Is your software up to date... plymouth updates may help in your situation. – heynnema Nov 21 '20 at 16:48
  • @heynnema Yes, I just did it. 1 min and 28 sec to initiate computer. Besides, my system is getting even more slow. I'm thinking about migrating to Ubuntu 18.04, what do you think? – Mat S Nov 21 '20 at 18:00
  • @MatS Is your /dev/sda really running at 201F? – heynnema Nov 21 '20 at 18:22
  • @heynnema according to "Disks" yes. But according to hddtemp is 19 ºC – Mat S Nov 21 '20 at 22:48
  • Last update: I reinstalled Ubuntu 20.04. It still starting relatively slow (80 sec). I'm suspicious about a malfunctioning ssd (but no idea how to test it) – Mat S Dec 01 '20 at 21:47

1 Answers1

0

fsck

Remove fsck.mode=skip from /etc/default/grub, and do sudo update-grub.

Let's check your file system first...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot

BIOS

Dell Vostro 15 3568

You have BIOS version 2.6.0.

There's a newer BIOS available, version 3.6.0, dated Jul 27, 2020, and can be downloaded here.

Installation instructions are here.

Note: Confirm that I have the correct web page for your model #.

Note: Have good backups before updating the BIOS.

Update #1:

You have AER (Advanced Error Reporting) errors on your wireless or ethernet interfaces. If this is a desktop computer, re-seat the wireless card and the ethernet card... otherwise do this...

sudo -H gedit /etc/default/grub # edit this file

Find:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"

sudo update-grub # update GRUB

reboot # reboot the computer

heynnema
  • 70,711