• Hibernation not working after enabling inactive swap


    Hi everyone!
    For some reason, after of a new installation, hibernate option was disabled. A few days ago I noticed swap partition was inactive so I enabled it and hibernate button showed up in turn off options automatically. Unfortunately hibernate is not working because my PC shut down instead (by the way suspend works ok).

    # /etc/fstab: static file system information.
    
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    #
    UUID=XXXX-XXXX /boot/efi vfat defaults,relatime 0 0
    UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX / ext4 defaults,relatime,data=ordered 
    0 1
    UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX /home ext4 defaults,relatime,data=orde
    red 0 0
    UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX none swap sw 0 0
    

    I really would appreciate any suggestion.

  • I really would appreciate any suggestion. :grinning:

  • I really would appreciate any suggestion. :grinning:

  • I really would appreciate any suggestion. :grinning:

  • I don’t really have any helpful suggestions or advice to give:disappointed: other than to take a look at this wiki post by @joekamprad.

    Hope it helps!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @edconocerte can you show us the info from running

    swapon --show
    

    I would also reference this article since that’s what I am thinking will eventually get to your answer.

    Sys01: Antergos + Mate; GTX 1070 + nvidia package :)
    Sys02: Antergos + Mate on Surface Pro 3

  • @Keegan I use Cinnamon :/

  • @n_mag Sure.

    [[email protected] ~]$ swapon --show
    NAME      TYPE      SIZE USED PRIO
    /dev/sda6 partition 3,8G   0B   -1
    
  • @edconocerte said in Hibernation not working after enabling inactive swap:

    @Keegan I use Cinnamon

    OK. Sorry about that then:smile:

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @edconocerte try this structure for your swap partition line instead of what you have in your fstab
    UUID=<UUID> none swap defaults 0 0

    Sys01: Antergos + Mate; GTX 1070 + nvidia package :)
    Sys02: Antergos + Mate on Surface Pro 3

  • @edconocerte, Hi edconocer, like nick…, after enable swap, you need update grub. try with root:
    # grub-mkconfig -o /boot/grub/grub.cfg then reboot.

  • @n_mag @aderbal Done, same problem :/

    UUID=046b0XXX-dc76-XXX-889c-2b3XXX16b5X9 none swap defaults 0 0
    
  • @edconocerte Hum, try check UUID: 046b0XXX-dc76-XXX-889c-2b3XXX16b5X9 with UUID of your swap partition in HD, mabe diferent…

  • @edconocerte

    ls -l /dev/disk/by-uuid/
    

    will show the valid UUIDS…

    Do you have “resume” inside HOOKS?

    cat /etc/mkinitcpio.conf | grep resume
    

    @edconocerte said in Hibernation not working after enabling inactive swap:

    Unfortunately hibernate is not working because my PC shut down instead

    This is what hibernate is doing: it writes current files to swap and power off, after power on it resume system with files from swap… and you will be inside the state as before hibernate …

    [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

  • @aderbal They are the same
    alt text

    @joekamprad what do you mean? command “cat /etc/mkinitcpio.conf | grep resume” show empty. The problem is my PC doesn’t resume after hibernation, it starts SO as a new turn on with all my files/apps closed instead.

  • then edit mkinitcpio.conf and rebuild kernel images:

    $ sudo nano /etc/mkinitcpio.conf
    

    go to line 53:

    HOOKS="base udev autodetect modconf block keyboard keymap filesystems fsck"
    and add resume to it that it looks similar to this:

    HOOKS="base udev autodetect modconf block keyboard keymap resume filesystems fsck"
    then save file with [Ctrl + X] and rebuild kernel images:

    $ sudo mkinitcpio -p linux
    

    [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 Yep, it worked! :clap_tone1:

    P.S: My wi-fi adapter doesn’t work after resume from hibernate :(

  • @edconocerte this is something i hear often… but there are solutions for it too…
    /usr/lib/systemd/system-sleep/ can include skript to unload the module for wifi before hibernate and reload it after rewoke the system…

    I need to do some research here to help on this…

    [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 could you give an example please? :bulb:

  • i do not know, and i can not test this caus i do not have wireless and o not have a notebook at the moment…

    [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

inactive1 hibernation7 enabling2 swap5 Posts 22Views 817
Log in to reply