You are not logged in.

#1 2025-05-18 12:03:01

endor43
Member
Registered: 2012-11-04
Posts: 22

Resume from suspend w swapfile on encrypted filesystem, black screen

Hi all,

I have already looked at
https://bbs.archlinux.org/viewtopic.php?id=299637
among others. That is most similar to my issue, but nothing I have seen in there made a difference.

after selecting kernel at grub menu it decrypts and then I get the following message :

Reported hibernation image: ID=arch.....

though I can't fully visually catch the rest
and then it goes black with zero ability to interact

I uploaded latest journal to
https://0x0.st/8vn6.txt
as per user Seth's instructions

sudo journalctl -b | curl -F 'file=@-' 0x0.st

I have tried the following:
regenerating initramfs with mkinitcpio -R
updating grub with grub-mkconfig
moving resume parameter in HOOKS before and after filesystems (but always after encrypt and lvm2)
Tried regular kernel and LTS kernel
I tried "logging in" by typing my password on the blackscreen, then opening terminal with a hotkey, then rebooting, but nothing
tried switching tty but nothing
Tried with resume and resume_offset parameters in grub, and without (grub finds the same uuid and offset with out without thanks to systemd v255) also setting /sys/power/resume and resume_offset

I followed https://wiki.archlinux.org/title/Swap for swap file word for word incl fstab except mine is 48G.
I also followed https://wiki.archlinux.org/title/Dm-cry … encryption for "Using a swapfile" (though there is not much there)
I also followed https://wiki.archlinux.org/title/Power_ … _initramfs regarding the hooks

The only thing I can see that is remotely suspicious in journal is the following:

Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b......

I also have windows, but with fastboot disabled, and haven't booted it in ages

The UUID of lvm where encrypted root starts with 4e4fca93, which is different than what is in that journal message above, but I have also manually set the resume location before to 4e4fca93 UUID in GRUB, and the behaviour is the same as setting nothing with no offset.

I am not actually sure what that 8cf2644b UUID is.

My fstab is:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/vg0-root
UUID=4e4fca93-ae3f-443c-a19e-c4c9f1a4dbf2	/         	ext4      	rw,relatime	0 1
/swapfile none swap defaults 0 0

My mkinitcpio.conf is:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=(/etc/cryptsetup-keys.d/cryptlvm.key)

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt lvm2 resume filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

Here is the relevant part of my /etc/default/grub

#GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 resume=UUID=4e4fca93-ae3f-443c-a19e-c4c9f1a4dbf2 resume_offset=140951552"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
GRUB_CMDLINE_LINUX="fbcon=rotate:1 cryptdevice=/dev/nvme0n1p7:cryptlvm root=/dev/vg0/root cryptkey=rootfs:/etc/cryptsetup-keys.d/cryptlvm.key"

The commented line was when I manually set the swapfile location and offset, but behaviour was the same with and without

Ok, I hope that is enough information.
I tried reading all the threads here related to hibernation resume in the last year and haven't found a solution, so any help would be appreciated!

Offline

#2 2025-05-18 16:28:37

seth
Member
Registered: 2012-09-03
Posts: 63,982

Re: Resume from suspend w swapfile on encrypted filesystem, black screen

May 18 18:11:36 cp4 kernel: Linux version 6.14.6-102.bazzite.fc42.x86_64 (builder@8c40ee88a1ec) (gcc (GCC) 15.1.1 20250425 (Red Hat 15.1.1-1), GNU ld version 2.44-3.fc42) #1 SMP PREEMPT_DYNAMIC Wed May 14 21:03:33 UTC 2025
May 18 18:11:36 cp4 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-linux-bazzite root=/dev/mapper/vg0-root rw fbcon=rotate:1 cryptdevice=/dev/nvme0n1p7:cryptlvm root=/dev/vg0/root cryptkey=rootfs:/etc/cryptsetup-keys.d/cryptlvm.key loglevel=3

The journal is from a fedora boot?

though I can't fully visually catch the rest

I bet you've a phone with a camera that can read faster than you.
Pro-tip: use a tripod. If you don't have a tripod, makeshift one by wedging the phone between two books -\_ so the camera points at the panel (handheld will be too shaky to read anything)
There's also the boot_delay parameter: "boot_delay=1000" shall stall a second after each line.

Then see whether you can hibernate and resume from the multi-user.target
Since this is on amdgpu, also see https://bbs.archlinux.org/viewtopic.php … 9#p2241979 for a similar-ish situation.
Try to reboot out of the black screen™ w/ https://wiki.archlinux.org/title/Keyboa … el_(SysRq) (the entire REISUB sequence) and then check the journal of the previous boot (which hopefully is the botched return from hibernation)

Offline

Board footer

Powered by FluxBB