0

I'm trying to set up hibernate in Ubuntu 18.4, however it's not working.

First of all I'm checking the swap according to the guide :

root@athos-ThinkPad-T460p:~# cat /proc/swaps
Filename                Type        Size    Used    Priority
/swapfile                               file        2097148 0   -2

it seems the swap is on.

Then I tried kernel (aka suspend or swsusp), option 1 of official ubuntu document on PowerManagement/Hibernate. The guide says

The way you manually trigger hibernation using this 'kernel' method is to write 'disk' to /sys/power/state. There are two modes of 'kernel' hibernation: platform and shutdown. If one does not work, you can try the other:

sudo -s
echo platform > /sys/power/disk
echo disk > /sys/power/state

Or:

sudo -s
echo shutdown > /sys/power/disk
echo disk > /sys/power/state

But I got write error: No such device error on both case:

root@athos-ThinkPad-T460p:~# echo platform > /sys/power/disk
root@athos-ThinkPad-T460p:~# echo disk > /sys/power/state    
bash: echo: write error: No such device
root@athos-ThinkPad-T460p:~# 
root@athos-ThinkPad-T460p:~# echo shutdown > /sys/power/disk
root@athos-ThinkPad-T460p:~# echo disk > /sys/power/state
bash: echo: write error: No such device

Then I would like to try toxonice, option 3 of official ubuntu document on PowerManagement/Hibernate. But there is no step-by-step guide, only some links such as tuxonice-userui or PPA Available, leading only to lots of documents and codes.

Pls kindly suggest how can I set up hibernate in ubuntu 18.04.

0

I think you need a swap partition instead of swapfile. I only managed to get hibernate working with the swap partition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.