View previous topic :: View next topic |
Author |
Message |
donguss n00b
Joined: 18 Apr 2018 Posts: 22
|
Posted: Thu Apr 19, 2018 12:58 pm Post subject: [SOLVED] swsusp with genkernel and LVM-on-LUKS doesn't work |
|
|
First, some data:
Code: | # zcat /proc/config.gz | grep HIBER
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
# zcat /proc/config.gz | grep SUSP
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set
# cat /proc/cmdline
BOOT_IMAGE=/kernel-genkernel-x86_64-4.16.2-gentoo root=/dev/mapper/lvm-root ro crypt_root=UUID=74f4955f-b422-4abe-8bcf-8329919222aa dolvm real_root=UUID=bbd59fba-ed35-4289-86a1-5c16106f2317 real_resume=UUID=a6401d1c-1769-45b0-b582-8b16e238f6bf
# lsblk -o name,type,mountpoint
NAME TYPE MOUNTPOINT
sda disk
├─sda1 part /boot/efi
├─sda2 part
│ └─cboot crypt /boot
└─sda3 part
└─root crypt
├─lvm-swap lvm [SWAP]
├─lvm-root lvm /
└─lvm-home lvm /home
sr0 rom
|
I want to suspend and resume system using tools from sys-power/suspend.
It seems to go INTO hibernation just fine: I execute s2disk, it tells me about writing something into swap partition and then turns laptop off.
Problems appear when I turn it on and try to resume.
Usually I get keyphrase prompt on boot. AFAIK it happens when kernel is loaded from cboot by grub and executes initramfs init script, which, in its turn, prompts me to decrypt clvm and get to the root partition.
After the keyphrase, I'd expect initramfs to detect real_resume kernel cmdline option and resume from there instead of booting fresh system. In fact, I've seen something flicker about real_resume being on /dev/dm-1 after keyphrase, but it didn't help since fresh system was booted anyway, corrupting my filesystems.
One more interesting detail, after fresh boot it gives me this:
Code: | # cat /sys/power/resume
253:1
# file /dev/dm-1
/dev/dm-1: block special (253/1)
|
Seems like something was actually written in the right place, but was the right thing written there?
Maybe the problem is with timing (too late/early)? Something with genkernel (initramfs/init contents, kernel configs)?
Last edited by donguss on Thu Apr 19, 2018 7:09 pm; edited 1 time in total |
|
Back to top |
|
|
donguss n00b
Joined: 18 Apr 2018 Posts: 22
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Apr 19, 2018 7:52 pm Post subject: |
|
|
donguss wrote: | wtf i hate genkernel now :evil: |
donguss ... I have a similar setup to yourself ... only I use suspend2/tuxonice and not swsusp, and use better-initramfs in place of genkernel.
The advantages: everything is self-contained, you build everything using Aboriginal Linux (or experimentally, Alpine Linux) and so its separate from the system installed packages (so, no USE="static" for those packages). You don't have to rebuild the initramfs on kernel updates, because no modules are involved (that does require that necessary modules are builtin ... but that isn't an issue, as you'll be using dm-crypt at all times regardless). It's small (here 2.9mb uncompressed with lvm, cryptsetup, dropbear, etc). The feature set is good, including optional network configuration, and ssh, if needed ... etc, etc.
cat /proc/cmdline: | \\EFI\linux\vmlinuz-3.12.72-ck.efi quiet ro nopat elevator=bfq video.use_native_backlight=1 rootfstype=ext4 luks enc_root=UUID=55862fb9-d4b0-4962-8795-ccb8a7043b7a lvm root=/dev/mapper/vg-root tuxonice resume=/dev/mapper/vg-swap |
best ... khay |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|