You are not logged in.

#1 2025-08-30 13:25:11

keystrok3
Member
Registered: 2020-09-19
Posts: 4

sdhci register dump when swapfile resume enabled on root with LUKS

I am trying to enable hibernation with /swapfile in a LUKS encrypted root partition using the instructions from  https://wiki.archlinux.org/title/Power_ … _hibernate with the following set up:

mkinitcpio hooks:

HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems resume fsck)

lsblk -f

NAME        FSTYPE      FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1      ntfs                    01DAC0A4DB850B70
├─sda2      ext4        1.0         2ae2efc3-2bc5-4af7-898d-3c006e2ec829
└─sda3      ext4        1.0         7f983109-a9ea-4ae3-988a-154d63ff16f3
zram0       swap        1     zram0 fb3715ff-e9ac-4690-871f-465a32572e26                [SWAP]
nvme0n1
├─nvme0n1p1 vfat        FAT32       0225-FBED                             451.9M    56% /boot
├─nvme0n1p2 crypto_LUKS 2           531dc128-7d88-421a-af2b-cfe228b2a8c6
│ └─root    ext4        1.0         8a21a67d-3c08-4876-97e0-f4c95f0303ef  130.3G    28% /
└─nvme0n1p3 crypto_LUKS 2           9607f4e3-2eb9-4cb2-8f29-e48f8e57436d
  └─home    ext4        1.0         e69fc098-80b5-4137-a468-889cb7687b0d  182.6G    27% /home

Default systemd boot entry options:

options cryptdevice=UUID=531dc128-7d88-421a-af2b-cfe228b2a8c6:root root=/dev/mapper/root resume=/dev/mapper/root resume_offset=8454144 rw rootfstype=ext4

Fallback systemd boot entry options:

options cryptdevice=UUID=531dc128-7d88-421a-af2b-cfe228b2a8c6:root root=/dev/mapper/root rw rootfstype=ext4 noresume

swapon --show:

NAME       TYPE      SIZE USED PRIO
/swapfile  file       16G   0B   -2
/dev/zram0 partition  16G   0B  100

fstab contents:

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/root
UUID=8a21a67d-3c08-4876-97e0-f4c95f0303ef       /               ext4            rw,relatime     0 1

# /dev/nvme0n1p1
UUID=0225-FBED          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro     0 2

# /dev/mapper/home
UUID=e69fc098-80b5-4137-a468-889cb7687b0d       /home           ext4            rw,relatime     0 2

/swapfile none swap defaults 0 0

I am using wayland with niri, with NVIDIA 3050 Mobile on a laptop on 6.16.3-arch1-1

If I have resume in  mkinitcpio.conf I do not get prompted for a decryption password and the boot process hangs and displays SDHCI REGISTER DUMP:

[ 8.822968] mmc0: Reset 0x1 never completed.
[ 8.713137] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 8.7137071 mmc0: sdhci: Sys addr: 0xffffffff | Version: 0x0000ffff
[ 8.714283] mmc0: sdhci: Blk size: 0x0000ffff | Blk cnt: 0x0000ffff
[ 8.714852] mmc0: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
[ 8.715425] mmc0: sdhci: Present: 0xffffffff | Host ct1: 0x000000ff
[ 8.715998] mmc0: sdhci: Power: 0x000000ff | Blk gap: 0x000000ff
[ 8.716568] mmc0: sdhci: Wake-up: 0x000000ff | Clock: 0x0000ffff
[ 8.717136] mmc0: sdhci: Timeout: 0x000000ff | Int stat: 0xffffffff
[ 8.717709] mmc0: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
[ 8.718279] mmc0: sdhci: ACmd stat: 0x0000ffff | Slot int: 0x0000ffff
[ 8.718847] mmc0: sdhci: Caps: 0xffffffff | Caps_1: 0xffffffff
[ 8.719418] mmc0: sdhci: Cmd: 0x0000ffff | Max curr: 0xffffffff
[ 8.719989] mmc0: sdhci: Resp[0]: 0xffffffff | Resp[1]: 0xffffffff
[ 8.720558] mmc0: sdhci: Resp[2]: Oxffffffff | Resp[3]: 0xffffffff
[ 8.721119] mmc0: sdhci: Host ct12: 0x0000ffff
[ 8.721683] mmc0: sdhci: ADMA Err: 0xffffffff I ADMA Ptr: 0xffffffffffffffff
[ 8.722245] mmc0: sdhci: ============================================

I could not get more out of the dump and it seemed to be repeating similar blocks with this as the last entry before just hanging with a blinking cursor.
This happens whether I shut down using `systemctl  hibernate`, `poweroff` , or `reboot`. In order to boot properly in this state, I have to hold the power button to hard poweroff and use the fallback boot loader. Only then do I get prompted for a LUKS password and I am able to get to the desktop.
If I re-install the linux kernel the boot entries are overwritten and so the noresume option is removed, so I have to readd it before rebooting. Adding the option on the boot manager edit menu does not seem to work.  I tried setting the options to persist change  /etc/kernel/cmdline file but I was not able to isolate the fallback boot entry to keep the noresume flag.
I tried removing resume parameters from the boot entries to allow systemd to automatically set and detect the swapfile,  but had the same issue

Journalctl -r showed the following for hibernate and reboot:

Aug 30 14:53:42 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:53:41 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:53:41 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:53:40 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:42:55 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:42:53 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:42:53 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:42:52 athena systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Aug 30 14:41:13 athena systemd[1]: Reached target System Reboot.
Aug 30 14:41:13 athena systemd[1]: Finished System Reboot.

Thanks in advance for you help.

Offline

Board footer

Powered by FluxBB