Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Suspending to Disk (Hibernation) Hangs

  1. #1
    Join Date
    Dec 2012
    Beans
    Hidden!

    Suspending to Disk (Hibernation) Hangs

    I am having an issue suspending ram to disk (aka. Hibernating).

    I am simply issuing this command to the kernel (4.4, 4.7) as root user:

    Code:
    echo disk > /sys/power/state
    On a freshly booted system this works well for the first time. But if the memory consumption goes up to 30+% say then the system just hangs thereby resulting in having to cold boot.

    I have seen this occurring before on previous kernels and other hardware. My Swap partition in all cases is encrypted which is part of a LVM. I wonder if this has any bearing on the issue?

    I'm not using any PM-utils type programme nor any other power management utilities for that matter. The swap partition is 2.5x the amount of total ram. Also there isn't any logging information generated in syslog or kern.log.

    Any thoughts?

  2. #2
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Suspending to Disk (Hibernation) Hangs

    You cannot hibernate to an encrypted swap without significant, critical and very convoluted preparation beforehand. What you are doing just won't work. Moreover, the two directories that you must not put on a LVM are /boot and swap. With respect to swap, instructions are as follows:

    https://help.ubuntu.com/community/En...hEncryptedSwap

  3. #3
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    Sorry but the process isn't critical, convoluted or significant. The swap partition can be anywhere and in any form really, even part of a LVM. /boot is an unencrypted primary volume.

  4. #4
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Suspending to Disk (Hibernation) Hangs

    Quote Originally Posted by os2 View Post
    Sorry but the process isn't critical, convoluted or significant. The swap partition can be anywhere and in any form really, even part of a LVM. /boot is an unencrypted primary volume.
    We may be posting at cross purposes. A regular swap is indeed easy. OP was, I believe, interested in an encrypted swap, which were the instructions I linked to. For most new users, these are not easy steps and they should be aware of that before starting. Otherwise, better to stick to a simple unencrypted swap. I may be mistaken about swap and LVM but was told in past that encrypted swap needs primary partition. In any case, no need to inject my own opinion. OP can decide for self if process is easy or difficult.

  5. #5
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    The partition layout is correct and hibernation works in principle but only to an extent. This is the heart of the issue.

    I changed the LVM arrangements around and also tried a fully encrypted setup but the issue stands. Namely: when memory consumption is around 30-35%+ the system just hangs when issued with the echo disk > /sys/power/state command. Either the screen freezes along with the input devices or the screen goes blank and stays that way indefinitely.
    Last edited by QIII; September 13th, 2016 at 10:49 PM.

  6. #6
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    If we look at a similar issue experienced by this user:

    https://www.reddit.com/r/archlinux/c..._fails_if_the/

    The issue described herein appears to be the antipode of what he's describing. He says under Linux 4.7 this has solved his problem. I am not convinced. I am running Kernel 4.7 as well.

  7. #7
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Suspending to Disk (Hibernation) Hangs

    Hmmm? I use Hibernation on Arch and have no problems...but I use zram for swap
    Code:
    cat /proc/swaps
    Filename                Type        Size    Used    Priority
    /dev/sda2                               partition    3145724    0    -1
    /dev/zram0                              partition    2097148    0    100
    If interested in Zram... info here: http://www.techrapid.co.uk/linux/arc...on-arch-linux/
    And if not kindly disregard.
    And I too am using Kernel: x86_64 Linux 4.7.2-1-ARCH.
    Last edited by 1fallen; September 14th, 2016 at 12:13 AM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  8. #8
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    The machine is one of the new DELLs built around the Skylake platform. I have set Ubuntu up with UEFI. Using Secure Boot or not it's still the same issue. This is what the partition layout looks like:

    Code:
    NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
    nvme0n1               259:0    0 238.5G  0 disk  
    ├─nvme0n1p1           259:1    0   102M  0 part  
    ├─nvme0n1p2           259:2    0  13.8G  0 part  
    ├─nvme0n1p3           259:3    0   244M  0 part  /boot/efi
    ├─nvme0n1p4           259:4    0     1K  0 part  
    ├─nvme0n1p5           259:5    0   243M  0 part  /boot
    └─nvme0n1p6           259:6    0 224.2G  0 part  
      └─nvme0n1p6_crypt   252:0    0 224.2G  0 crypt 
        ├─debian--vg-swap 252:1    0  22.4G  0 lvm   [SWAP]
        └─debian--vg-root 252:2    0 201.8G  0 lvm   /
    Also:

    Code:
    # swapon --summary
    
    Filename                                Type            Size    Used    Priority
    /dev/dm-1                               partition       23437308        20      -1

  9. #9
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    I would appreciate any further ideas..

  10. #10
    Join Date
    Dec 2012
    Beans
    Hidden!

    Re: Suspending to Disk (Hibernation) Hangs

    I've been able to narrow this issue down. I reinstalled the entire system without encryption. After running the same test the problem doesn't arise. So this means it has to do with the swap partition which happens to be part of the encrypted container.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •