• Hibernation doesn't function properly


    Hello!

    I have done the following:

    • Creating swap file on /swapfile with 19GB size
    • Updated my kernel, added these 2 parameters:
    resume=/dev/nvme0n1p4
    resume_offset=5711872
    
    • Applied changes using grub-mkconfig
    • Rebooted

    Now I see the option of hibernation, but when I click on it, it just behaivs like ‘Switch User’. Takes me to login screen and the screen remains on.

  • [[email protected] ~]$ swapon --show
    NAME      TYPE SIZE USED PRIO
    /swapfile file  18G   0B   -2
    [[email protected] ahassoun]# filefrag -v /swapfile 
    Filesystem type is: ef53
    File size of /swapfile is 19327352832 (4718592 blocks of 4096 bytes)
     ext:     logical_offset:        physical_offset: length:   expected: flags:
       0:        0..       0:    5711872..   5711872:      1:            
       1:        1..   30719:    5711873..   5742591:  30719:             unwritten
       2:    30720..   55295:    5742592..   5767167:  24576:             unwritten
    [[email protected] ahassoun]# df -T /swapfile 
    Filesystem     Type 1K-blocks     Used Available Use% Mounted on
    /dev/nvme0n1p4 ext4 140345676 49002560  89890248  36% /
    
  • @ahassoun said in Hibernation doesn't function properly:

    /swapfile

    https://wiki.archlinux.org/index.php/Swap#Swap_file

    And you need an entry inside /etc/fstab too:
    /swapfile none swap defaults 0 0

    And insert the hook inside /etc/mkinitcpio.conf

    HOOKS=(base udev autodetect keyboard modconf block filesystems resume fsck)

    then rebuild it sudo mkinitcpio -p linux

    https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file

  • Thanks @joekamprad ,

    /etc/fstab was already edited.

    I jused edited /etc/mkinitcpio.conf and added the hooks, rebuilt (without errors), rebooted, but didn’t work.

    I noticed this line in my /etc/mkinitcpio.conf :

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

    It was already there. Do I need to remove it? Or maybe just add resume to it?

  • @ahassoun said in Hibernation doesn't function properly:

    resume

    is missing here yes…

properly24 hibernation8 Posts 5Views 323
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.