LVM on Luks decryption (or wakeup) takes longer than usual

I can’t remember when this started happening, but I think it started after upgrading to Fedora 34 from 33.

When I boot or wake up from hibernate, I’m presented with a prompt to enter my encryption passphrase to decrypt my partition. After that, the boot process hangs for longer than I remember.
Why is that, and how can I fix or further troubleshoot?
I can’t tell if this is a LUKS/cryptsetup issue or a hibernate/boot issue.

I’ve got a standard LVM on LUKS setup that can be seen here:

$ lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1                                       259:0    0 238.5G  0 disk  
├─nvme0n1p1                                   259:1    0   250M  0 part  /boot
├─nvme0n1p2                                   259:2    0   144M  0 part  /boot/efi
└─nvme0n1p3                                   259:3    0 238.1G  0 part  
  └─luks-ffffffffffffffffffffffffffffffff     253:0    0 238.1G  0 crypt 
    ├─lvg-root                                253:1    0  43.1G  0 lvm   /
    ├─lvg-swap                                253:2    0    10G  0 lvm   [SWAP]
    └─lvg-home                                253:3    0   185G  0 lvm   /home

Here’s the output of dmesg around the time I think it’s hanging:

[   17.743274] Key type trusted registered
[   17.803074] kauditd_printk_skb: 20 callbacks suppressed
[   17.803078] audit: type=1130 audit(1626223585.104:31): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-cryptsetup@luks\ffffffffffffffffffffffffffffffffffffffffff
1de973af comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  108.166268] PM: Image not found (code -22)
[  108.167615] audit: type=1130 audit(1626223675.469:32): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-hibernate-resume@dev-mapper-lvg\x2dswap comm="systemd" exe=
"/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  108.167637] audit: type=1131 audit(1626223675.469:33): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-hibernate-resume@dev-mapper-lvg\x2dswap comm="systemd" exe=
"/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  108.169065] audit: type=1334 audit(1626223675.470:34): prog-id=15 op=LOAD
[  108.182623] audit: type=1130 audit(1626223675.484:35): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=dbus-broker comm="systemd" exe="/usr/lib/systemd/systemd" hostname=
? addr=? terminal=? res=success'
[  108.231646] audit: type=1130 audit(1626223675.533:36): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=dracut-initqueue comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  108.273486] audit: type=1130 audit(1626223675.575:37): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-fsck-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  108.290440] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[  108.329873] audit: type=1334 audit(1626223675.631:38): prog-id=14 op=UNLOAD
[  108.329882] audit: type=1334 audit(1626223675.631:39): prog-id=13 op=UNLOAD
[  108.329886] audit: type=1334 audit(1626223675.631:40): prog-id=12 op=UNLOAD
[  108.332983] audit: type=1334 audit(1626223675.634:41): prog-id=15 op=UNLOAD
[  108.596562] systemd-journald[254]: Received SIGTERM from PID 1 (systemd).

2 Likes
1 Like

Thanks! That’s definitely it, and I think some updates got pushed to the repos that fixed the issue as well for me.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.