• Issues with Hibernation


    So I have Antergos installed on my computer for about 2 months. I used systemd-boot to make sure it is EFI bootable. I have not checked out Hibernation in a while, however I just tried hibernating to test if it works as intended and it does not work!

    My setup is as follows:
    systemd-boot, MATE desktop, LVM2 with LUKS.

    I have tried using arch wiki but I am just lost.

    Output of lsblk:

    sda                             8:0    0 931.5G  0 disk  
    ├─sda1                          8:1    0   256M  0 part  /boot
    └─sda2                          8:2    0 931.3G  0 part  
      └─cryptAntergos             254:0    0 931.3G  0 crypt 
        ├─AntergosVG-AntergosRoot 254:1    0   928G  0 lvm   /
        └─AntergosVG-AntergosSwap 254:2    0   3.3G  0 lvm   [SWAP]
    sr0                            11:0    1  1024M  0 rom
    

    Output of cat /etc/mkinitcpio.conf

    HOOKS="base udev autodetect modconf block keyboard keymap encrypt lvm2 resume filesystems fsck"
    

    Output of cat /etc/fstab:

    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    #
    UUID=AA27-8F86 /boot vfat defaults,relatime 0 0
    UUID=c6aa0186-f32d-4301-9d4a-c4ca07579dab / ext4 defaults,relatime,data=ordered 0 1
    UUID=07f096f0-e686-48e4-92a6-c8f2999ee9a4 swap swap defaults 0 0
    

    I am kinda lost, I would appreciate if someone could help me solve this issue. Thanks!

  • In order to use hibernation, you need to create a swap partition or file. You will need to point the kernel to your swap using the resume= kernel parameter.

    you need to say the bootloader where the resume device is:

    esp/loader/entries/arch.conf

    title          Arch Linux
    linux          /vmlinuz-linux
    initrd         /initramfs-linux.img
    options        root=PARTUUID=c6aa0186-f32d-4301-9d4a-c4ca07579dab resume=UUID=07f096f0-e686-48e4-92a6-c8f2999ee9a4  rw
    

    where resume=UUID=07f096f0-e686-48e4-92a6-c8f2999ee9a4 is your swap partition…*

    This example is not as yours correctly as you have also the LVM inside this file so the option line will be something like this:

    options rd.lvm.lv=lvm/root rd.lvm.lv=lvm/swap root=UUID=longuuidnumber1 resume=UUID=longuuidnumber2 rw

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3 GNOME

  • @joekamprad Thanks for pointing me in the right direction. I have got it to work!

    For anyone else who comes along trying to get systemd-boot to work with hibernation, there is a simple step needed to be done to enable this. For this to work, you should have a SWAP partition/file enabled. My configuration consisted of LUKS with LVM with 2 partitions: root and swap. To make this work I followed the Arch Wiki on systemd-boot to configure the entries.

    Essentially the conf file had to be modified to specify the resume target. This is not configured in the install (at least as of 17.7) when using systemd-boot.
    My initial configuration under /boot/loader/entries/antergos.conf looked like this:

    title	Antergos
    linux	/vmlinuz-linux
    initrd	/intel-ucode.img
    initrd	/initramfs-linux.img
    options	cryptdevice=UUID=c6aa0186-f32d-4301-9d4a-c4ca07579dab:cryptAntergos:cryptAntergos  root=/dev/dm-1 rw quiet
    

    The UUID will be device install dependant. There was no resume target configured by default. Get root access to the file to edit it (backup file just in case!). I just followed the same syntax as the default root config, in my case /dev/dm-1 points to: AntergosVG-AntergosRoot -> ../dm-1, that is it points to the root LVM partition. Using ls -l /dev/mapper/, I found my swap points to /dev/dm-2. I just added a resume and pointed it to that location. That is changed the options line in antergos.conf:

    options cryptdevice=UUID=c6aa0186-f32d-4301-9d4a-c4ca07579dab:cryptAntergos root=/dev/dm-1 resume=/dev/dm-2 rw quiet

    Bam! Works like a charm.
    TL;DR: Edit antergos.conf file to point to the swap partition.

  • may it is possible to implement for the crypt-setup onto cnchi ?
    @developers but keep cool ;)

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3 GNOME

hibernation7 issues51 Posts 4Views 197
Log in to reply