Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello,

First of all, your swap partition should be at least the size of your memory so your system can be suspended to disk. Then, you need to add a resume=/dev/mapper/swap or resume=UUID=xxxxxx-xxxxx-xxxxxx-xxxxxxxxx boot command line so your system knows where to load data from. The UUID can be obtained with: blkid | grep swap

The command line needs to be added in /etc/default/grub like GRUB_CMDLINE_LINUX="resume=UUID=xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxx"

You also need to regenerate your grub.cfg file with grub2-mkconfig > /etc/grub-efi.cfg (replace grub-efi with grub if you don't use UEFI boot)

After this, reboot and try the hibernation with: systemctl hibernate

Last, edit /etc/UPower/UPower.conf

UsePercentageForPolicy=true PercentageLow=15 PercentageCritical=8 PercentageAction=5

(adjust values to your needs)

and reload upower: systemctl reload upower

Regards, Ozy.

Hello,

First of all, your swap partition should be at least the size of your memory so your system can be suspended to disk. Then, you need to add a resume=/dev/mapper/swap or resume=UUID=xxxxxx-xxxxx-xxxxxx-xxxxxxxxx boot command line so your system knows where to load data from. The UUID can be obtained with: blkid | grep swap

The command line needs to be added in /etc/default/grub like GRUB_CMDLINE_LINUX="resume=UUID=xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxx"

You also need to regenerate your grub.cfg file with grub2-mkconfig > /etc/grub-efi.cfg (replace grub-efi with grub if you don't use UEFI boot)

After this, reboot and try the hibernation with: systemctl hibernate

Last, edit /etc/UPower/UPower.conf

UsePercentageForPolicy=true PercentageLow=15 PercentageCritical=8 PercentageAction=5

(adjust values to your needs)

and reload upower: systemctl reload upower

Oh, if systemctl hibernate works but echo disk > /sys/power/state fails, you can try bypassing platform specific code by using echo shutdown > /sys/power/disk This can be rendered permanent by creating a /etc/systemd/sleep.conf file containing: HibernateMode=shutdown HibernateState=disk

Regards, Ozy.