I've created a larger swapfile on ubuntu 18.04. But now hiberation no longer works.

I do see some remarks about a swap containing software suspend:

okt 14 10:06:26 hvdb-ThinkPad-T480s swapon[349]: swapon: /swapfile: software suspend data detected. Rewriting the swap signature.

But it simply boots normally.


You probably changed the physical location of the swapfile on disk when you enlarged it. In fact, you probably made a new file altogether, and not simply added to the end

During boot it needs that exact location to stream the suspend image to memory.

Find the location of the swapfile with swap-offset which is in the uswsusp package. Then

$ sudo swap-offset /swapfile

Use the number in the output of the above command and fill it in /etc/default/grub after the 'resume=' key in the GRUB_CMDLINE_LINUX_DEFAULT= variable.

Afterwards,make grub aware of the change by doing:

$ sudo update-grub 

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.