[arch-general] Suspend to ram and uresume hook for systemd
Since I'm still wading my way through some of the intricacies (read small details) and in view of the recent discussion on libcrypt, keysize, key values, and systemd; 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 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. 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. The systemctl shutdown and sytemctl reboot work great. I admit to not having done a lot of research but based on the recent discussions and changes with systemd, does anyone know what caused this hiccup? Myra -- Life's fun when your sick and psychotic!
On Mon, Jul 30, 2012 at 10:08 AM, Myra Nelson <myra.nelson@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
On Mon, Jul 30, 2012 at 3:37 AM, Mantas Mikulėnas <grawity@gmail.com> wrote:
On Mon, Jul 30, 2012 at 10:08 AM, Myra Nelson <myra.nelson@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!
On Mon, Jul 30, 2012 at 8:54 PM, Myra Nelson <myra.nelson@hughes.net> wrote:
Manta: "Mantas".
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.
You still haven't explained why do you think you need the "uresume" hook. `systemctl suspend` DOES NOT use it. The hook is only needed for hibernation via `s2disk`.
Why does the reboot with the uresume hook built into the img look for libcrypt and try to decrypt unencrypted volumes?
- The uresume hook shouldn't be looking for for libgcrypt, since it is already part of the hook. If it prints out the libgcrypt version, it doesn't mean "looking for". - The uresume hook needs libgcrypt not because of volumes, but because s2disk can be configured to encrypt the hibernation image. -- Mantas Mikulėnas
On Mon, Jul 30, 2012 at 1:13 PM, Mantas Mikulėnas <grawity@gmail.com> wrote:
On Mon, Jul 30, 2012 at 8:54 PM, Myra Nelson <myra.nelson@hughes.net> wrote:
Manta: "Mantas".
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.
You still haven't explained why do you think you need the "uresume" hook.
`systemctl suspend` DOES NOT use it. The hook is only needed for hibernation via `s2disk`.
Why does the reboot with the uresume hook built into the img look for libcrypt and try to decrypt unencrypted volumes?
- The uresume hook shouldn't be looking for for libgcrypt, since it is already part of the hook. If it prints out the libgcrypt version, it doesn't mean "looking for".
- The uresume hook needs libgcrypt not because of volumes, but because s2disk can be configured to encrypt the hibernation image.
-- Mantas Mikulėnas
I'm not entirely sure I need the uresume hook. I'm attempting to move to systemd as much as possible. I may have made an incorrect assumption in trying it. I'll have to do some more research on it. s2ram works, I just failed to see why the machine failed to boot (on a full reboot not coming out of suspension) with uresume compiled into the image when I do not have any encrypted volumes configured. It seems (to me) if there are no encrypted volumes, libgcrypt should be located, no encrypted volumes found, then continue to boot. It's not so much if I need it or not, but why the boot failed? As usual my brain doesn't always track with others. Back to reading the code and sorting it out. Myra -- Life's fun when your sick and psychotic!
Have you converted your system to /usr/lib? Last time I checked AUR package was not updated. Make sure your uwsusp package is updated to use /usr/lib. Make sure the hook and the install script are updated to both reference correct /usr/lib paths. Make sure your /etc/suspend.conf is correct at the time you run mkinitcpio next time.
Second, systemd does not support uswsusp
Systemd deciding what is good for you, I can not help you with. -- Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618 PGP FP: 02A5 628A D8EE 2A93 996E 929F D5CB 31B7 D20A 0618
participants (3)
-
Adrian C.
-
Mantas Mikulėnas
-
Myra Nelson