[arch-general] Suspend to ram and uresume hook for systemd

Myra Nelson myra.nelson at hughes.net
Mon Jul 30 13:54:36 EDT 2012


On Mon, Jul 30, 2012 at 3:37 AM, Mantas Mikulėnas <grawity at gmail.com> wrote:
> On Mon, Jul 30, 2012 at 10:08 AM, Myra Nelson <myra.nelson at hughes.net> wrote:
>> I've been using uswsusp-git from the aur and s2ram -f for my suspend
>> command. /etc/suspend.conf has /dev/snapshot and /dev/sda4 (swap) for
>> the image. Suspension and reboot have been working fine. After
>
> This is the most confusing part of your post. Are you trying to
> suspend to RAM, to disk, or to both?
>
>> rebuilding my initramfs image with the uresume hook, when I tried to
>> reboot today the boot process hung at waiting for libgcrypt. In my
>> infinite wisdom, after testing the suspend and reboot several times
>> before using the uresume hook, I had uresume in both images. I don't
>> use encrypted volumes and never have. I chrooted in and rebuilt the
>> initramfs image without the uresume hook, rebooted, and everything
>> worked great.
>
> The initramfs hook, the image file, and /etc/suspend.conf are only for
> "suspend to disk" aka hibernation. They are NOT used when suspending
> to RAM, since no image is actually saved anywhere and the machine does
> not go through the boot process when resuming.
>
> Second, systemd does not support uswsusp – it always uses the kernel
> swsusp support. For suspend-to-RAM, this shouldn't matter, as both
> tools do practically the same thing. (But for suspend-to-disk &
> suspend-to-both, you would need the "resume" hook, not "uresume".)
>
>> I tried using systemctl suspend from the wiki article. The machine
>> goes down but won't come back up without a complete restart, fsck
>> volumes that were not cleanly unmounted, etc. Since this is a desktop,
>> I really don't need the suspend option, it's just nice to save a
>> little electricity.
>
> Does `s2ram` still work?
>
> --
> Mantas Mikulėnas

Manta:

Clarification:

When using s2ram -f, suspend works. When including the uresume hook in
the initramfs.img, it works but a reboot, for whatever reason, hangs
waiting for libcrypt, and won't boot. Thus my question. After
rebuilding my initramfs image without the uresume hook s2ram -f works
but obviously systemctl suspend puts the machine into suspension, but
it won't wake up. Here is where my initial confusion came in.

s2ram -f -> machine is not supported but this works

wake up machine --works  -> tested several times over a couple of weeks

work work work

finish switch to systemd and rebuild initramfs.img with uresume hook

work work work

need to reboot

reboot

boot hangs at waiting for libcrypt and won't boot

Why does the reboot with the uresume hook built into the img look for
libcrypt and try to decrypt unencrypted volumes?

Sorry for the confusion. Sometimes my brain doesn't see things like
others see them.

Myra

-- 
Life's fun when your sick and psychotic!


More information about the arch-general mailing list