UM 18.04 taking long time (like 5 minutes) to complete boot

slow_booting.txt notes. Please see -

https://www.dedoimedo.com/computers/ubuntu-beaver-slow-boot.html

This guy explains how he chased down the causes of slow boot times on 18.04. Very good.

https://ubuntuforums.org/showthread.php?t=2417453&page=4

More slow boot times. - Thread includes removing snaps and using several systemd tools such as

systemd-analyze     
systemd-analyze critical-chain      
systemd-analyze blame

Also see -

Good luck jaybo.

1 Like

I have reviewed those links again. I have tried the following, all resulting in no improvement.

  1. Changed Grug line to:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"

  2. Changed networking.service line to:
    TimeoutStartSec=5s

  3. Run “sudo rm /etc/initramfs-tools/conf.d/resume” followed by “sudo update-initramfs -u”

  4. Changed lines in /etc/systemd/system.conf to:
    DefaultTimeoutStartSec=5s
    DefaultTimeoutStopSec=5s
    This change did bring up the desktop instantly, but the desktop was unusable, you could not click on an icon until the boot process finished.

  5. $ systemd-analyze

Startup finished in 4.009s (kernel) + 5.767s (userspace) = 9.776s
graphical.target reached after 5.757s in userspace
$ systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target 5.757s
└─multi-user.target 5.757s
└─smbd.service 5.678s +78ms
└─nmbd.service 5.606s +70ms
└─network-online.target 5.604s
└─NetworkManager-wait-online.service 1.834s +3.768s
└─NetworkManager.service 1.522s +305ms
└─dbus.service 1.303s
└─basic.target 1.291s
└─sockets.target 1.291s
└─snapd.socket 1.290s +1ms
└─sysinit.target 1.284s
└─systemd-timesyncd.service 838ms +445ms
└─systemd-tmpfiles-setup.service 821ms +13ms
└─systemd-journal-flush.service 309ms +510ms
└─systemd-journald.service 183ms +118ms
└─syslog.socket 181ms
└─system.slice 172ms
└─-.slice 170ms

$ systemd-analyze blame
3.768s NetworkManager-wait-online.service
1.417s dev-sda1.device
1.073s snapd.service
853ms udisks2.service
516ms vboxdrv.service
510ms systemd-journal-flush.service
445ms systemd-timesyncd.service

Nothing stands out to me. This issue started after a recent updates. It does seem like some sort of timeout issue before displaying the desktop. The task bars do come up immediately and are usable.

I am willing to try restarting with the network card, including wireless and other IOT disabled. But I am not sure how.

@jaybo Pull out the ethernet cable to ensure wired networking is disabled. Click on the wireless connection icon in the upper panel and uncheck Enable Networking. System, Shut Down..., Restart. That should do it.

Thanks. So that identified the problem. I even rebooted again to ensure it was not a fluke. After re-enabling the network, the issue returned. Now I do have network connectivity prior to the desktop being enabled. Also, there is no wifi or bluetooth interface, just ethernet.

See this link to a post of mine responding to a similar problem.

You should try disabling NetworkManager-wait-online.service .

Thanks for the suggestion, but I noticed no difference in boot time. I do have network activity instantly, and composed and posted this entire post before my desktop was displayed.

What happens when you disconnect/disable all networking, reboot, give your system about 5 seconds to settle down, enable networking (only) and then plug in your ethernet cable? Does the spinner display or does everything work just fine?

All worked just fine. I then hit disconnect and unchecked Enabled networking, but leaving the ethernet plugged in, rebooted. All came up fine, re-enabled the networking and all worked fine without delay.

So it appears that something to do with your wireless is at the root of your slow boot problem. Perhaps there is something you can do about your wireless/bluetooth driver? Happy googling @jaybo .

As I mentioned earlier in the thread, my hardware does not have bluetooth or wifi. Thanks anyway for your help.

I misunderstood your comment in post #8. So your problem is solved? post #13?

If I understand you correctly, you suspect for some reason my system is trying to use Bluetooth and/or wifi drivers even though the hardware never existed. Is this correct?

That was my understanding, yes, based on your response in post #8, "there is no wifi or bluetooth interface" and in post #6, "restarting with the network card, including wireless and other IOT disabled".

To me (mistakenly) that meant that your slow boot was due to some interference from the non-existent hardware or their drivers. You might check what is being automatically sought after in your start-up items.

And is your problem solved?

I can't find anything in the start-up items. I disabled a few, but no change.

Not sure if this means anything but the syslog showed the following errors:

Jul 8 21:40:31 UM18 system-tools-ba[2804]: No such method ServicesConfig->getFiles
Jul 8 21:41:37 UM18 gvfsd-metadata[2612]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Jul 8 21:41:40 UM18 gvfsd-metadata[2612]: message repeated 15 times: [ g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed]

Earlier mentioned all my apps are usable. But I found Caja is not. Not sure if this means anything.

Also, I have read many had this problem due to swap partition on another drive being used. My 18.04 system is using a swap file. I do have another SSD with UM 16.04 with a swap partition. However, I assumed this issue was eliminated when the system boots normally with the network disabled.

So not solved yet. The business of the problem seemingly vanishing with networking disabled is pointing at the solution. And enabling your network after booting will eventually become an annoyance even if this workaround does the job today.

You might check my notes below for whatever applies to your situation regarding SWAP. Just take the following as things to read. If you want more help, you're gonna have to tell me what your system actually is.

And to do that, please post the results of inxi -F I'll look at it as soon as time permits.

resume_variable - notes

See - https://ubuntuforums.org/showthread.php?t=2401012

If you change your hard drive, you might have to set the RESUME variable. Check /etc/initramfs-tools/conf.d/resume Since you have a swap file, maybe RESUME=NONEis appropriate.

Make sure that fstab has the correct UUID for a swap device (if any). On my newton box, I have no swap whatsoever not ever using hibernate and having 16 GiB RAM. My upstairs laptop benefited from following the fix outlined in the forum page above.

I learned that not only fstab should be correct but that /etc/initramfs-tools/conf.d/resume needs to have the correct UUID for swap.

After correcting the resume file, I ran this code - sudo update-initramfs -u -k all My boot images were processed without a message like the one below:

initramfs-tools configuration sets RESUME=UUID=6752bc85-87bd-4f55-a01d-d966557ff115W: but no matching swap device is available. A couple more lines and then this: Set the RESUME variable to override this.

And more - https://askubuntu.com/questions/33697/how-do-i-add-swap-after-system-installation

I don’t understand how that points to the SWAP file or partition? I am also baffled why Caja is disabled during this process? Trust me, I am searching for a solution.

There is no “resume”, just “splash”

UUIDs seem correct to me. Is a resume file required? This problem only started recently, the OS build is over a year old. There have been no hardware changes.

My fstab:

UUID=cf5bba43-4311-4bfc-a8f3-575afd062a74 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0

$ top -bn1 | grep -i swap

KiB Swap: 2097148 total, 2097148 free, 0 used. 14411536 avail Mem
83 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0

$ sudo blkid

/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: UUID="cf5bba43-4311-4bfc-a8f3-575afd062a74" TYPE="ext4" PARTUUID="bee52fb6-01"
/dev/sdb: LABEL="DataFiles" UUID="7cdbf0c0-d4df-471e-a1db-07fbfdb61ef2" TYPE="ext4"
/dev/sdc1: LABEL="MultiMedia" UUID="1986ba60-63d8-49aa-a4c2-47317d18ed79" TYPE="xfs" PARTUUID="000ba044-01"
/dev/sdd1: UUID="fa83ad0f-b87c-4640-82a8-786f18f91ba5" TYPE="ext4" PARTUUID="2ef6e257-01"
/dev/sdd2: UUID="9c9e4ba3-1ece-4048-91bf-c8da70bf6f13" TYPE="swap" PARTUUID="2ef6e257-02"
/dev/loop8: TYPE="squashfs"

$ lsblk -f

NAME FSTYPE LABEL UUID MOUNTPOINT
loop0 squashfs /snap/software-boutique/31
loop1 squashfs /snap/software-boutique/39
loop2 squashfs /snap/ubuntu-mate-welcome/319
loop3 squashfs /snap/ubuntu-mate-welcome/335
loop4 squashfs /snap/ubuntu-mate-welcome/324
loop5 squashfs /snap/pulsemixer/250
loop6 squashfs /snap/pulsemixer/23
loop7 squashfs /snap/core/7169
loop8 squashfs /snap/core/7270
sda
└─sda1 ext4 cf5bba43-4311-4bfc-a8f3-575afd062a74 /
sdb ext4 DataFiles 7cdbf0c0-d4df-471e-a1db-07fbfdb61ef2
sdc
└─sdc1 xfs MultiMedia 1986ba60-63d8-49aa-a4c2-47317d18ed79
sdd
├─sdd1 ext4 fa83ad0f-b87c-4640-82a8-786f18f91ba5
└─sdd2 swap 9c9e4ba3-1ece-4048-91bf-c8da70bf6f13

$ inxi -F

System: Host: UM18 Kernel: 4.15.0-54-generic x86_64 bits: 64 Desktop: MATE 1.20.1 Distro: Ubuntu 18.04.2 LTS
Machine: Device: desktop Mobo: ASUSTeK model: M5A97 LE R2.0 v: Rev 1.xx serial: N/A
BIOS: American Megatrends v: 2701 date: 03/24/2016
CPU: 8 core AMD FX-8320E Eight-Core (-MCP-) cache: 16384 KB
clock speeds: max: 3200 MHz 1: 1720 MHz 2: 1445 MHz 3: 1502 MHz 4: 1513 MHz 5: 1403 MHz 6: 1402 MHz
7: 1429 MHz 8: 1413 MHz
Graphics: Card: NVIDIA GK208B [GeForce GT 710]
Display Server: x11 (X.Org 1.19.6 ) drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
Resolution: [email protected]
OpenGL: renderer: GeForce GT 710/PCIe/SSE2 version: 4.6.0 NVIDIA 390.116
Audio: Card-1 NVIDIA GK208 HDMI/DP Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.15.0-54-generic
Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: 38:d5:47:e1:55:94
Drives: HDD Total Size: 3860.8GB (0.4% used)
ID-1: /dev/sda model: PNY_CS1311_240GB size: 240.1GB
ID-2: /dev/sdb model: WDC_WD20EZRZ size: 2000.4GB
ID-3: /dev/sdc model: WDC_WD15EARS size: 1500.3GB
ID-4: /dev/sdd model: OCZ size: 120.0GB
Partition: ID-1: / size: 220G used: 16G (8%) fs: ext4 dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 22.8C mobo: N/A gpu: 45C
Fan Speeds (in rpm): cpu: 0
Info: Processes: 233 Uptime: 20 min Memory: 1305.3/15942.8MB Client: Shell (bash) inxi: 2.3.56

My twopence: Is that possible that you have some (unavailable) networking resource set (accidentally) to auto-mount in caja?

I reread your post #22 in regard to the syslog errors. I googled searched on
"ubuntu: 'G_UDEV_IS_DEVICE (device)' failed"
and came up with quite a few bug reports. Some of them mentioned that their file browsers weren't functioning too. I now think that you've come upon a bug.

I don't think this has anything to do with SWAP in any form. Your inxi -F report shows plenty of unused space on your drives and plenty of memory so things look good in that respect.

From what I can tell, something in your setup is phoning out somewhere and not making its connection. And this is probably a result of a bug, reportedly in gvfs. See -
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1752091
for an example. If one of these looks like what you're dealing with, I'd mark myself affected by whatever bug looks spot on to you.

Just this morning, the three systems I can boot into on my old laptop displayed upgrades to GVFS, at least six files each for MATE 16.04, 18.04 and 19.04. So perhaps you have updated today and your problem is fixed?

One other thing that you might try if you haven't already done so is to boot into an older kernel and see if that removes the problem. Otherwise, if it were me, I'd reinstall as that might be a whole lot faster and easier to do than chase down this bug. Good luck jaybo.

Resolved: I am guessing some how caja got messed up. Here is the error I got when attempting to reboot prior to the completion of boot.
Screenshot

So I restored an image back up from 17 June, applied all updates. No issues

Thanks to all who responded for their patience in assisting me in finding a solution.