4

On my MacBook Air, I upgraded from Ubuntu 16.04 to Ubuntu 18.04. Everything is fine, but booting with Ubuntu takes approx. 6 minutes!

Running $ systemd-analyze time outputs:

Startup finished in 4.480s (kernel) + 6min 545ms (userspace) = 6min 5.026s
graphical.target reached after 6min 535ms in userspace

The final part of $ systemd-analyze time:

...
[    7.005447] Bluetooth: BNEP socket layer initialized
[    7.354030] IPv6: ADDRCONF(NETDEV_UP): enx00e04c6800c5: link is not ready
[    7.359359] IPv6: ADDRCONF(NETDEV_UP): enx00e04c6800c5: link is not ready
[    7.363620] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[    8.977999] r8152 2-1.4:1.0 enx00e04c6800c5: carrier on
[    8.978018] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c6800c5: link becomes ready
[  359.996525] random: crng init done
[  693.520385] thunderbolt 0000:07:00.0: resetting error on 0:b.
[  693.520465] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[  693.520471] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[  693.820626] thunderbolt 0000:07:00.0: resetting error on 0:b.
[  693.820711] thunderbolt 0000:07:00.0: 0:b: got unplug event for disconnected port, ignoring
[ 1338.638266] thunderbolt 0000:07:00.0: resetting error on 0:b.
[ 1338.638283] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[ 1338.638288] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[ 1338.938543] thunderbolt 0000:07:00.0: resetting error on 0:b.
[ 1338.938568] thunderbolt 0000:07:00.0: 0:b: got unplug event for disconnected port, ignoring
[ 1357.411889] Bluetooth: RFCOMM TTY layer initialized
[ 1357.411894] Bluetooth: RFCOMM socket layer initialized
[ 1357.411900] Bluetooth: RFCOMM ver 1.11
[ 1358.945100] rfkill: input handler disabled

The etc/fstab file:

...
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID=2ef34bb8-5360-460a-8a8a-646d3a102a3a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=67E3-17ED  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda5 during installation
UUID=7c820859-65c5-44ac-9704-b3e0bb8c8020 none            swap    sw              0       0

How can I further troubleshoot and possibly solve this problem? Thank you in advance.

Mario

  • you should also show first few lines from systemd-analyze blame. and look at main system log for suspicious jumps in timestamps or timeout errors etc: journalctl -b. If you like timestamps in seconds since boot, use journalctl -b -o short-monotonic. but, maybe it is same as https://askubuntu.com/a/1029880/20709 – sourcejedi Jul 15 '18 at 08:45
  • Ah, no, I found one I thought was more common & you should absolutely look at: https://askubuntu.com/questions/1051762/long-boot-delay-on-ubuntu-loading-splash-screen-following-regular-dist-upgrade-o – sourcejedi Jul 15 '18 at 09:33
  • Thank you @sourcejedi, I run $ systemd-analyze blame and get these over 1 sec:
    `5min 57.755s plymouth-quit-wait.service
    
    4min 23.726s snapd.seeded.service
    
    1min 22.474s snapd.service
    
         30.044s NetworkManager-wait-online.service
    
         25.984s apt-daily.service
    
          1.582s dev-sda4.device`
    

    So definitely it looks like the problem mentioned at https://askubuntu.com/questions/1051762/long-boot-delay-on-ubuntu-loading-splash-screen-following-regular-dist-upgrade-o

    – user2364174 Jul 15 '18 at 11:17
  • I think that matches the symptoms on the second link I posted. – sourcejedi Jul 15 '18 at 11:21
  • 1
    Yes, I also tried the workaround of moving the mouse / hitting keys and the boot time is reduced to a little more than 1 minute, see the new $ systemd-analyze blame output: 1min 14.492s plymouth-quit-wait.service 1min 11.148s snapd.service 30.046s NetworkManager-wait-online.service 1.513s dev-sda4.device 1.112s dev-loop2.device Still it's quite a lot of time compared to before the upgrade, so I will hope for a real final solution. – user2364174 Jul 15 '18 at 11:30

1 Answers1

2

I've seen this manifest on two desktops I manage.

This is a kernel related regression, the launchpad bug is: https://bugs.launchpad.net/ubuntu/+bug/1779827

As a workaround, press keys and/or move the mouse at boot. This will increase the randomness entropy.

Or running the following command to install rng-tools solves the issue for me:

sudo apt install rng-tools

From Arch wiki: The rng-tools is a set of utilities related to random number generation in kernel. This is mainly useful to increase the quantity of entropy in kernel to make /dev/random faster.

psiphi75
  • 946
  • 1
  • 13
  • 25
  • Long "Start and Stop Jobs" ∘ "acpi int3400 unsupported event" ERRORS OVER 285 FARG!@#$ING Times • sudo gedit /etc/systemd/system.conf ‣ #DefaultTimeoutStartSec=90s ‣ DefaultTimeoutStartSec=5s ∘ and ‣ #DefaultTimeoutStopSec=90s ‣ DefaultTimeoutStopSec=5s • sudo update-initramfs -u – markackerman8-gmail.com Jan 27 '19 at 17:55