Boot delayed for about 90 seconds until 'random: crng init done'

Bug #1685794 reported by Jonas Köritz
104
This bug affects 25 people
Affects Status Importance Assigned to Milestone
broadcom-sta (Debian)
Incomplete
Unknown
linux (Ubuntu)
Confirmed
Medium
Unassigned
plymouth (Debian)
Fix Released
Unknown

Bug Description

Shortened dmesg output, notice the unnaturally long delay before crng init finishes:

[ 8.533630] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated
[ 8.542239] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input18
[ 8.542313] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card1/input19
[ 8.542382] input: HDA Intel PCH Dock Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card1/input20
[ 8.542449] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input21
[ 8.544240] cdc_ether 2-6:2.0 usb0: register 'cdc_ether' at usb-0000:00:14.0-6, CDC Ethernet Device, 02:1e:10:1f:00:00
[ 8.544271] usbcore: registered new interface driver cdc_ether
[ 8.637660] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 8.654022] input: HP WMI hotkeys as /devices/virtual/input/input22
[ 8.688226] cdc_ether 2-6:2.0 enp0s20u6c2: renamed from usb0
[ 8.713288] iwlwifi 0000:02:00.0 wlo1: renamed from wlan0
[ 9.804308] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input23
[ 98.327857] random: crng init done
[ 98.330072] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 98.330073] Bluetooth: BNEP filters: protocol multicast
[ 98.330077] Bluetooth: BNEP socket layer initialized
[ 98.443281] kauditd_printk_skb: 90 callbacks suppressed
[ 98.492927] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[ 98.681030] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[ 98.685672] IPv6: ADDRCONF(NETDEV_UP): enp0s20u6c2: link is not ready
[ 98.685789] cdc_ether 2-6:2.0 enp0s20u6c2: kevent 12 may have been dropped
[ 98.688384] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready
[ 98.690915] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: linux-image-4.10.0-19-generic 4.10.0-19.21 [modified: boot/vmlinuz-4.10.0-19-generic]
ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
Uname: Linux 4.10.0-19-generic x86_64
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/hwC1D0', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p', '/dev/snd/controlC1', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D8p', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/controlC0', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CurrentDesktop: Unity:Unity7
Date: Mon Apr 24 14:58:33 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-04-18 (5 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: Hewlett-Packard HP EliteBook 840 G1
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=9fb9fc1d-15a4-4e98-a2ae-bf572e0900d5 ro quiet splash vt.handoff=7
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-4.10.0-19-generic N/A
 linux-backports-modules-4.10.0-19-generic N/A
 linux-firmware 1.164
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/23/2016
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: L71 Ver. 01.37
dmi.board.name: 198F
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 15.59
dmi.chassis.asset.tag: USH452L0B1
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvrL71Ver.01.37:bd05/23/2016:svnHewlett-Packard:pnHPEliteBook840G1:pvrA3009DD10203:rvnHewlett-Packard:rn198F:rvrKBCVersion15.59:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP EliteBook 840 G1
dmi.product.version: A3009DD10203
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :
Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :

Output of: sudo lspci -vnvn > lspci-vnvn.log

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.11 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc8

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jonas Köritz (jonas-koeritz) wrote : Re: [Bug 1685794] Re: Boot delayed for about 90 seconds until 'random: crng init done'
Download full text (4.7 KiB)

It's a fresh 17.04 installation no upgrade involved. I will try the latest
upstream kernel and report back.
Thanks for the hint!

Joseph Salisbury <email address hidden> schrieb am Mo., 24. Apr.
2017, 19:41:

> ** Changed in: linux (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1685794
>
> Title:
> Boot delayed for about 90 seconds until 'random: crng init done'
>
> Status in linux package in Ubuntu:
> Incomplete
>
> Bug description:
>
> Shortened dmesg output, notice the unnaturally long delay before crng
> init finishes:
>
> [ 8.533630] Bluetooth: hci0: Intel Bluetooth firmware patch completed
> and activated
> [ 8.542239] input: HDA Intel PCH Mic as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input18
> [ 8.542313] input: HDA Intel PCH Line as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input19
> [ 8.542382] input: HDA Intel PCH Dock Line Out as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input20
> [ 8.542449] input: HDA Intel PCH Headphone as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input21
> [ 8.544240] cdc_ether 2-6:2.0 usb0: register 'cdc_ether' at
> usb-0000:00:14.0-6, CDC Ethernet Device, 02:1e:10:1f:00:00
> [ 8.544271] usbcore: registered new interface driver cdc_ether
> [ 8.637660] ieee80211 phy0: Selected rate control algorithm
> 'iwl-mvm-rs'
> [ 8.654022] input: HP WMI hotkeys as /devices/virtual/input/input22
> [ 8.688226] cdc_ether 2-6:2.0 enp0s20u6c2: renamed from usb0
> [ 8.713288] iwlwifi 0000:02:00.0 wlo1: renamed from wlan0
> [ 9.804308] input: ST LIS3LV02DL Accelerometer as
> /devices/platform/lis3lv02d/input/input23
> [ 98.327857] random: crng init done
> [ 98.330072] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> [ 98.330073] Bluetooth: BNEP filters: protocol multicast
> [ 98.330077] Bluetooth: BNEP socket layer initialized
> [ 98.443281] kauditd_printk_skb: 90 callbacks suppressed
> [ 98.492927] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
> [ 98.681030] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
> [ 98.685672] IPv6: ADDRCONF(NETDEV_UP): enp0s20u6c2: link is not ready
> [ 98.685789] cdc_ether 2-6:2.0 enp0s20u6c2: kevent 12 may have been
> dropped
> [ 98.688384] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready
> [ 98.690915] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
>
> ProblemType: Bug
> DistroRelease: Ubuntu 17.04
> Package: linux-image-4.10.0-19-generic 4.10.0-19.21 [modified:
> boot/vmlinuz-4.10.0-19-generic]
> ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
> Uname: Linux 4.10.0-19-generic x86_64
> ApportVersion: 2.20.4-0ubuntu4
> Architecture: amd64
> AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path',
> '/dev/snd/hwC1D0', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p',
> '/dev/snd/controlC1', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D8p',
> '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/controlC0',
> '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
> CurrentDesktop: Unity:Unity7
>...

Read more...

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :

I just booted 4.11-rc8 as per your instructions and the issue is still present.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Adam Hill (sidepipe) wrote :

I've got a similar issue in that there's a pause of around 90 seconds during boot, though the messages either side of the pause are different. Thing is, there's no way of knowing whether the messages either side are even relevant - I can't believe that an almost identical length pause is not related to this issue though. I'm using 17.04 that was upgraded, though after the upgrade I also swapped the motherboard/processor to an Asus Prime X370-Pro and Ryzen 7 1700. I'm now using mainline kernel 4.11.0-041100-generic but the delay was also there with the stock 4.10.

The messages either side of the pause for me are:

[ 11.667273] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.1/0000:28:00.1/sound/card0/input15
[ 11.667317] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.1/0000:28:00.1/sound/card0/input16
[ 11.667350] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.1/0000:28:00.1/sound/card0/input17
[ 11.971125] input: gspca_zc3xx as /devices/pci0000:00/0000:00:07.1/0000:29:00.3/usb5/5-2/5-2.4/input/input18
[ 11.971454] usbcore: registered new interface driver gspca_zc3xx
[ 12.022162] usbcore: registered new interface driver snd-usb-audio
[ 101.921672] IPv6: ADDRCONF(NETDEV_UP): enp38s0: link is not ready
[ 101.923166] NVRM: Your system is not currently configured to drive a VGA console
[ 101.923168] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 101.923168] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 101.923169] NVRM: drivers including, but not limited to, vesafb, may result in
[ 101.923169] NVRM: corruption and stability problems, and is not supported.
[ 101.923846] nvidia-modeset: Allocated GPU:0 (GPU-69ab0986-ebf2-246d-307c-7267ee509b56) @ PCI:0000:28:00.0
[ 101.947753] IPv6: ADDRCONF(NETDEV_UP): enp38s0: link is not ready
[ 101.979165] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 101.993045] Ebtables v2.0 registered
[ 103.244058] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 103.306651] kvm1e2-kvm2e3: port 1(kvm1e2-k2e3-nic) entered blocking state
[ 103.306653] kvm1e2-kvm2e3: port 1(kvm1e2-k2e3-nic) entered disabled state
[ 103.306719] device kvm1e2-k2e3-nic entered promiscuous mode

The Nvidia warnings are irrelevant - I've just changed my console resolution to 1280x1024 which the nvidia drivers moan about, but the pause was there before doing that.

I've tried disabling on-board audio ( it's an S1220A ) and the USB 3.1 chip, because they're fairly new and I thought one of them may be the problem... but neither made any difference.

Revision history for this message
Adam Hill (sidepipe) wrote :

Typical - been looking at this off and on for a week or so, but posting here got me looking again. Searched for "linux 90 second boot delay" and found a few people who'd found that the swap partition was incorrectly configured, causing a 90 second delay.

I'd also changed my SSD for a bigger one during the mb/cpu swap, and my cryptoswap partition was identified by id, so.....

Odd that the delay looking for swap is around 90 seconds though - maybe the issue here is actually the same?

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :

I just checked my system and discovered configuration in my fstab and crypttab that pointed to a nonexisted file. I created a swapfile and corrected the configuration. Now my system boots in 13 seconds total! Thanks for the hint!

As my system is a clean install, maybe there is a bug in the installer generating this configuration?

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :

I completely disabled swap now and it's working flawlessly.

Revision history for this message
John Oberhauser (johnocc) wrote :

I'm having the same issue. Running Ubuntu Gnome on a Macbook Pro.

Here is a snippet of my dmesg

[ 4.102749] brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
[ 4.612866] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Nov 10 2015 06:38:10 version 7.35.177.61 (r598657) FWID 01-ea662a8c
[ 4.651763] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
[ 4.657551] brcmfmac 0000:03:00.0 wlp3s0: renamed from wlan0
[ 93.922245] random: crng init done
[ 93.945010] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 93.945011] Bluetooth: BNEP filters: protocol multicast
[ 93.945013] Bluetooth: BNEP socket layer initialized

My fstab looks like this:

# /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/sda4 during installation
UUID=a0ebb0b2-138e-4b20-b223-3940a7efc98b / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
#UUID=67E3-17ED /boot/efi vfat umask=0077 0 1
#/swapfile none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0
~

I commented out the last 3 lines. I have a file at /swapfile, but no file at /dev/mapper/cryptswap1.

Any suggestions on how to fix my boot time?

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :
Download full text (6.1 KiB)

What does your /etc/crypttab look like?

John Oberhauser <email address hidden> schrieb am Mo., 8. Mai 2017,
20:45:

> I'm having the same issue. Running Ubuntu Gnome on a Macbook Pro.
>
> Here is a snippet of my dmesg
>
> [ 4.102749] brcmfmac 0000:03:00.0: Direct firmware load for
> brcm/brcmfmac43602-pcie.txt failed with error -2
> [ 4.612866] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0:
> Nov 10 2015 06:38:10 version 7.35.177.61 (r598657) FWID 01-ea662a8c
> [ 4.651763] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
> (0x30 0x30)
> [ 4.657551] brcmfmac 0000:03:00.0 wlp3s0: renamed from wlan0
> [ 93.922245] random: crng init done
> [ 93.945010] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> [ 93.945011] Bluetooth: BNEP filters: protocol multicast
> [ 93.945013] Bluetooth: BNEP socket layer initialized
>
>
> My fstab looks like this:
>
> # /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/sda4 during installation
> UUID=a0ebb0b2-138e-4b20-b223-3940a7efc98b / ext4
> errors=remount-ro 0 1
> # /boot/efi was on /dev/sda1 during installation
> #UUID=67E3-17ED /boot/efi vfat umask=0077 0 1
> #/swapfile none swap sw
> 0 0
> #/dev/mapper/cryptswap1 none swap sw 0 0
> ~
>
> I commented out the last 3 lines. I have a file at /swapfile, but no
> file at /dev/mapper/cryptswap1.
>
> Any suggestions on how to fix my boot time?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1685794
>
> Title:
> Boot delayed for about 90 seconds until 'random: crng init done'
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
>
> Shortened dmesg output, notice the unnaturally long delay before crng
> init finishes:
>
> [ 8.533630] Bluetooth: hci0: Intel Bluetooth firmware patch completed
> and activated
> [ 8.542239] input: HDA Intel PCH Mic as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input18
> [ 8.542313] input: HDA Intel PCH Line as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input19
> [ 8.542382] input: HDA Intel PCH Dock Line Out as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input20
> [ 8.542449] input: HDA Intel PCH Headphone as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input21
> [ 8.544240] cdc_ether 2-6:2.0 usb0: register 'cdc_ether' at
> usb-0000:00:14.0-6, CDC Ethernet Device, 02:1e:10:1f:00:00
> [ 8.544271] usbcore: registered new interface driver cdc_ether
> [ 8.637660] ieee80211 phy0: Selected rate control algorithm
> 'iwl-mvm-rs'
> [ 8.654022] input: HP WMI hotkeys as /devices/virtual/input/input22
> [ 8.688226] cdc_ether 2-6:2.0 enp0s20u6c2: renamed from usb0
> [ 8.713288] iwlwifi 0000:02:00.0 wlo1: renamed from wlan0
> [ 9.804308] in...

Read more...

Revision history for this message
John Oberhauser (johnocc) wrote :

This is my cryptswap:

cryptswap1 UUID=31d32112-3452-744f-a8be-bf0648ace031 /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Revision history for this message
John Oberhauser (johnocc) wrote :

crypttab*

Revision history for this message
John Oberhauser (johnocc) wrote :

I commented that line out. My boot is under 10 seconds now! Thanks!

Revision history for this message
Jonas Köritz (jonas-koeritz) wrote :
Download full text (4.6 KiB)

You're welcome!

John Oberhauser <email address hidden> schrieb am Mo., 8. Mai 2017,
21:31:

> I commented that line out. My boot is under 10 seconds now! Thanks!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1685794
>
> Title:
> Boot delayed for about 90 seconds until 'random: crng init done'
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
>
> Shortened dmesg output, notice the unnaturally long delay before crng
> init finishes:
>
> [ 8.533630] Bluetooth: hci0: Intel Bluetooth firmware patch completed
> and activated
> [ 8.542239] input: HDA Intel PCH Mic as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input18
> [ 8.542313] input: HDA Intel PCH Line as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input19
> [ 8.542382] input: HDA Intel PCH Dock Line Out as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input20
> [ 8.542449] input: HDA Intel PCH Headphone as
> /devices/pci0000:00/0000:00:1b.0/sound/card1/input21
> [ 8.544240] cdc_ether 2-6:2.0 usb0: register 'cdc_ether' at
> usb-0000:00:14.0-6, CDC Ethernet Device, 02:1e:10:1f:00:00
> [ 8.544271] usbcore: registered new interface driver cdc_ether
> [ 8.637660] ieee80211 phy0: Selected rate control algorithm
> 'iwl-mvm-rs'
> [ 8.654022] input: HP WMI hotkeys as /devices/virtual/input/input22
> [ 8.688226] cdc_ether 2-6:2.0 enp0s20u6c2: renamed from usb0
> [ 8.713288] iwlwifi 0000:02:00.0 wlo1: renamed from wlan0
> [ 9.804308] input: ST LIS3LV02DL Accelerometer as
> /devices/platform/lis3lv02d/input/input23
> [ 98.327857] random: crng init done
> [ 98.330072] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> [ 98.330073] Bluetooth: BNEP filters: protocol multicast
> [ 98.330077] Bluetooth: BNEP socket layer initialized
> [ 98.443281] kauditd_printk_skb: 90 callbacks suppressed
> [ 98.492927] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
> [ 98.681030] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
> [ 98.685672] IPv6: ADDRCONF(NETDEV_UP): enp0s20u6c2: link is not ready
> [ 98.685789] cdc_ether 2-6:2.0 enp0s20u6c2: kevent 12 may have been
> dropped
> [ 98.688384] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready
> [ 98.690915] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
>
> ProblemType: Bug
> DistroRelease: Ubuntu 17.04
> Package: linux-image-4.10.0-19-generic 4.10.0-19.21 [modified:
> boot/vmlinuz-4.10.0-19-generic]
> ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
> Uname: Linux 4.10.0-19-generic x86_64
> ApportVersion: 2.20.4-0ubuntu4
> Architecture: amd64
> AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path',
> '/dev/snd/hwC1D0', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p',
> '/dev/snd/controlC1', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D8p',
> '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/controlC0',
> '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
> CurrentDesktop: Unity:Unity7
> Date: Mon Apr 24 14:58:33 2017
> EcryptfsInUse: Yes
> InstallationDate: Installed on 2017-04-18 (5 days ago)
> In...

Read more...

Revision history for this message
The EYE (maxtheman) wrote :

Ubuntu 16.04.3 - 64bit - Gnome

I can confirm the same bug - but my delay more like 8 minutes between the login screen and the desktop showing up. My system is like that since September 2017. I've reinstalled the kernel yesterday, which didn't work.

Thomas_Do from ubuntuusers.de referred me to this bug report (it's in German: https://forum.ubuntuusers.de/topic/lange-wartezeit-zwischen-login-und-desktop/)

snippet of my dmesg
[ 18.917504] vboxdrv: loading out-of-tree module taints kernel.
[ 18.917810] vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
[ 18.925777] vboxdrv: Found 4 processor cores
[ 18.946026] vboxdrv: TSC mode is Invariant, tentative frequency 2127998901 Hz
[ 18.946028] vboxdrv: Successfully loaded version 5.0.40_Ubuntu (interface 0x00240000)
[ 18.955652] VBoxNetFlt: Successfully started.
[ 18.961871] VBoxNetAdp: Successfully started.
[ 18.967888] VBoxPciLinuxInit
[ 18.971003] vboxpci: IOMMU not found (not registered)
[ 128.568975] random: crng init done
[ 1064.972565] wlp2s0: disconnect from AP 5c:49:79:a2:15:b4 for new auth to 9c:c7:a6:35:b5:62

I've attached the output of systemd-analyze plot > chart.svg.

Revision history for this message
The EYE (maxtheman) wrote :

And here is a part of the gnome-system-log.

Revision history for this message
The EYE (maxtheman) wrote :

My etc/fstab looks like this:

# /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/sda2 during installation
UUID=dff81be3-ae49-438f-a56e-d3e96d0c4dd3 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=34b2e7e7-11b0-4271-bfc5-0905e14172cc /home ext4 defaults 0 2
# swap was on /dev/sda1 during installation
#UUID=1278b31c-7396-4995-8664-f6ab6e0421de none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0

I've a file at /dev/mapper/cryptswap1.

My etc/crypttab looks like this:
cryptswap1 UUID=1278b31c-7396-4995-8664-f6ab6e0421de /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

johnocc commented the line in etc/crypttab out and it worked afterwards (but he was lacking the file in /dev/mapper/cryptswap1). (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1685794/comments/11)).

I haven't changed anything so far. You can find a screenshot of gparted attached, seems to fit with my fstab.

Revision history for this message
DLCBurggraaff (burdi) wrote :

I had the same problem (or a problem like the one at hand).
In posts #12 through #15 the user commenting out a line in hist /etc/cryptsetup file resolved the problem.
As I did not have that file I installed the cryptsetup{,-bin} packages and rebooted: problem resolved!
:D

Revision history for this message
DLCBurggraaff (burdi) wrote :

Cheered too soon: after a few reboots the problem is back.
:(

Revision history for this message
Lastique (andysem) wrote :

For me this problem appeared after I upgraded from 17.10 to 18.04 two of my machines. Both machines increased their boot times substantially (by around 30 seconds).

Revision history for this message
Bruno Xavier (brunocqd) wrote :

First of all, I do not use Ubuntu, I use Debian, but I thought it would be a nice input anyway, feel free to delete this if this don't help.
I had the same problem the first reboot I did after a system update to:

Linux version 4.9.0-6-amd64 (<email address hidden>) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.88-1 (2018-04-29)

Boot got stuck everytime at random: crng init, varying from 1min to 20min. A friend told me it was because the random pool was being populated everytime I booted and for some reason it was taking too long. I installed the havenge package (deb free repo) that contains an alternative algorithm to populate de RNG seeds. Apparently the problem is now solved, as my system is now booting in 13s.
Hopefully this will be of some help. Anyway, if installing havenge does not work, you could purge it afterwards and no harm done...

Revision history for this message
Matthew D. Mower (mdmower) wrote :

In case it is helpful to anyone else, I found a resolution for my specific case. This askubuntu question helped: https://askubuntu.com/questions/1018907/ubuntu-installation-stuck-at-random-crng-init-done . In sum: sudo apt install rng-tools

About 1 week ago, my Ubuntu 18.04 boot time went from ~15sec to ~2min. When I looked at kern.log, every boot had something very similar to this in common:

Jul 8 13:28:37 localhost kernel: [ 6.933299] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
Jul 8 13:32:09 localhost kernel: [ 217.508340] random: crng init done

After installing rng-tools (and just in case, updating initramfs and grub: sudo update-initramfs -u and sudo update-grub), my boot time returned to normal, ~15sec. More info on rng-tools is here: wiki.archlinux.org/index.php/Rng-tools

Revision history for this message
VPablo (villumar) wrote :

Since the last kernel update it is fixed form me.

$ uname -r
4.15.0-29-generic

Revision history for this message
Pavel Nikitin (doomkin) wrote :

At boot, the kernel waits for mouse movements to initialize the random number generator.
Kernel messages on boot:
[code]
sudo dmesg | less
[/code]

The problem:
[code]
kernel: random: crng init done
[/code]

The solution:
[code]
sudo apt install haveged
sudo systemctl enable haveged
[/code]

Revision history for this message
silviop (far5893) wrote :

haveged not solve for me.

Revision history for this message
Mihal Zemsky (mzemsk) wrote :

Haveged and rng-tools5 or rng-tools didn't help me too.

I reported my problem to near topic
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1767782/comments/13

tags: added: bionic
tags: added: performance
Revision history for this message
Grzegorz Szymaszek (gszymaszek) wrote :

Debian stretch with backports (kernels 4.17 and 4.18) on a Dell Latitude E6420 with a Dell Wireless 1530 (Broadcom BCM43228) card.

This problem (although the delay is of about three minutes) has started occurring on every boot after installing broadcom-sta-dkms (drivers for the above wireless card). Installing rng-tools (or uninstalling broadcom-sta-dkms) fixes it.

Revision history for this message
Grzegorz Szymaszek (gszymaszek) wrote :

Again Debian stretch with backports (kernel 4.18) on an Asus B53F with another wireless card and without that broadcom-sta-dkms package. Installing rng-tools solves the problem.

Apparently it also affects a Latitude E6410, but does not affect an E4310 and an E5450 (none of them has broadcom-sta-dkms installed).

Changed in broadcom-sta (Debian):
status: Unknown → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note that "random: crng init done" appearing very late is not a problem by itself. User-noticeable delays only arise if some components (like Bluetooth?) require the crng init to be completed in order for themselves to initialize. This indicates poor design in those components (they should never block indefinitely waiting for /dev/random) and is not a problem with the random number generator itself.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

... so using haveged is a workaround and not a fix.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Neither rng-tools nor haveged solves this problem for me.

Revision history for this message
Andrew (cactus-man) wrote :

Ive had this problem numerous times, and my solution works in all situations.

When running dsmeg, the error shows up as:

[CODE]
[ 6.382044] random: crng init done
[ 6.382048] random: 7 urandom warning(s) missed due to ratelimiting
[ 32.162934] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)[/CODE]

The solution is to:

First compare your fstab and blkid:

[CODE]$ blkid
/dev/sda1: UUID="C0C0-7641" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="1085d848-f8b9-45e2-a6be-087acb32a820"
/dev/sda3: LABEL="Windows" UUID="8662302C623022FB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="de399a3e-c832-4dca-a09d-f65789425b89"
/dev/sda4: LABEL="Windows RE tools" UUID="2262513962511341" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="18feb4e1-5770-4e13-92b8-bb8ba8005536"
/dev/sda5: UUID="81a474ab-98bf-4d40-b03e-e5e647163d7e" TYPE="ext4" PARTLABEL="Arco Linux" PARTUUID="3759200f-6317-4487-8b10-3a0140c67bd5"
/dev/sda6: LABEL="rootMX17" UUID="7bae9e4d-61fa-4187-b11f-517c799f7c94" TYPE="ext4" PARTLABEL="MX Linux" PARTUUID="417c8cbd-11b7-4fe6-9b15-ac9082d74460"
/dev/sda7: UUID="d9539219-1c29-468f-bbd0-106663fdef59" TYPE="swap" PARTLABEL="Swap" PARTUUID="fefe3061-bf7b-4a26-8c20-08e209acc28e"

$ sudo nano /etc/fstab

# /etc/fstab: static file system information
#
# Created by make-fstab on Mon Nov 19 17:10:30 EST 2018

# <file system> <mount point> <type> <$

#-> /dev/sda6 label=rootMX17
UUID=7bae9e4d-61fa-4187-b11f-517c799f7c94 / ext4 d$
#-> /dev/sda1
UUID=C0C0-7641 /boot/efi vfat d$
#-> /dev/sda7
UUID=42e5a9cd-b6e1-4d57-9a3a-2ad910862579 swap swap d$[/CODE]

As you can see my swap at /dev/sda7 has a different UUID in fstab than it does in blkid. This was, in my case, caused by another linux install repartitoning the swap
and causing the UUID to change. The boot delay is caused by the system trying to find the new UUID of the swap. To fix it, just copy the UUID in blkid that doesnt match to the fstab file then save.

If after restart the boot error is still there, you need to additionally edit your initramfs.conf file.

Do this by:

$ sudo nano /etc/initramfs-tools/conf.d/resume

Then either by making a new file, or editing the current resume file, write on the first line
RESUME=UUID=<< UUID of swap>>

For example, mine looks like

RESUME=UUID=d9539219-1c29-468f-bbd0-106663fdef59

Then run the below command to update your initramfs file.

sudo update-initramfs -u

Then restart. The error will be gone

Revision history for this message
Hami Torun (hamitorun) wrote :

To add to Andrew's solution, in my case, the UUID in /etc/initramfs-tools/config.d/resume was correct. But my swap was on an LVM partition.

I have found this blog post: https://www.hiroom2.com/2018/05/01/ubuntu-1804-lvm-swap-wait-for-root-en/

and changed the line in /etc/initramfs-tools/config.d/resume from using UUID to using device path of LVM swap partition, i.e.:

from something like:

RESUME=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx

to something like:

RESUME=/dev/mapper/ubuntuvg-lvswap

After that,

sudo update-initramfs -u

Then restart and the problem was solved.

Revision history for this message
sabby (sabby) wrote :

This debian bug

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897572

discuss 4.15.0-54 the issue quite well, with the associated kernel changes that brought the issues. Since I came across this bug first I thought I would document this for others in the future. I came upon this issue while running a custom kernel 4.19 which did not have the fix for this which I'm assuming were later added to the kernel somewhere between that and 5.1 since running both the default kernel 4.15.0-54 in 18.04 and 5.1.6 did not have this problem while 4.19.57 did.

Revision history for this message
sabby (sabby) wrote :
Download full text (3.2 KiB)

Just to add more ubuntu/debian specific details because this includes a kernel config options that was changed from vanilla kernel and that not everyone may agree with and I had missed myself.

This seem to have started when crg_init was changed in the kernel to 1 to fix a CVE. This caused a change in behavior and after that fix when calls to getrandom in the early boot were done it was now properly blocking until it was securely initialized.

As described in this systemd discussion

https://github.com/systemd/systemd/issues/4167

This caused software that were calling getrandom without GRND_NONBLOCK to now properly block. The problem is if any of those software did not require this, e.g. they could use urandom instead or did not even need a random number in the first place, and were called during the early boot process they would cause the system to hang unnecessarily. This was what happened with

"plymouth/fontconfig/libuuid (generating uuids requires randomness). That specific UUID generation can be prevented, and util-linux 2.32 makes the getrandom call non-blocking."

which was fixed in util-linux 2.32 and was causing my long boot delay before the login screen appeared. Now I was using 18.04 LTS which still has util-linux 2.31 so the reason kernel 5.1.x was working when kernel 4.19 did not, was not because the source of the problem was really in the kernel, it was because of this change in the ubuntu/debian kernel that is not in the vanilla kernel

https://bugs.launchpad.net/ubuntu/+source/linux-azure/+bug/1823754

which sets CONFIG_RANDOM_TRUST_CPU=y instead of N on the vanilla kernel. This kernel option was added in 4.19 by Theodore Ts'o and must have landed somewhere in the ubuntu/debian kernel between 4.19 and 5.1

https://lwn.net/Articles/760121/

This is why a kernel who has CONFIG_RANDOM_TRUST_CPU=y and software that wrongly call a blocking getrandom during boot time where crg_init is still 1, i.e. random number generator is not fully initialized, does not block if they have a CPU that support random number generation like many modern CPU. Note that there is an associated boot option to change this manually

random.trust_cpu=on/off

It seems like there might have been a time where the crg_init patch landed and the CONFIG_RANDOM_TRUST_CPU=y was not there yet that may have caused issues, but at least the state of the packages in 18.04 does not have this problem for me. Nevertheless, while I will probably keep CONFIG_RANDOM_TRUST_CPU=y I can see some hardware where this might not be an appropriate default.

Therefore if someone wants to run with CONFIG_RANDOM_TRUST_CPU=N, and util-linux < 2.32 or any other software that calls a blocking getrandom at boot when it is not required, the only options left are software that were suggested here like rng-tools and haveged to attempt to speed up the kernel entropy generation.

In addition, to libuuid I also saw that the Bluetooth library may have also at one point using wrongly a blocking getrandom call which seems to be the problem of the original poster. However, I do not have this library on this machine so I cannot verify but assume at some point that library must have also been fix...

Read more...

Changed in plymouth (Debian):
status: Unknown → Fix Released
Changed in broadcom-sta (Debian):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.