Ubuntu – How to make hibernation work again on 15.10 after disabling encrypted swap

encryptionhibernateswap

on my clean install of Xubuntu 15.10 I am unable to make hibernation work, although it's been working on my laptop successfully since 11.10 or so.

The only thing changed is that I have selected "encrypt home" during install and so I have it encrypted. But I noticed swap was also being encrypted. OK, so it couldn't work.

So I decided to unecrypt my swap in order to make hibernation work again.

What I did:

sudo swapoff -a

sudo cryptsetup remove /dev/mapper/cryptswap1

removed the only line in /etc/crypttab

sudo /sbin/mkswap /dev/sdaX

sudo swapon /dev/sdaX

removed the line with "/dev/mapper/cryptswap1" in /etc/fstab and replaced it with "UUID=d30170d7-b3a2-41b5-a389-541a6d0013c7 none swap sw 0 0" (new UUID taken from the mkswap's output)

reboot

tried sudo pm-hibernate again with no luck :/ – after booting-up several apport errors have been generated…

So, please, any hints how to make it work again? Thanks!

Best Answer

Solution: the problem was in /etc/initramfs-tools/conf.d/resume where was still some wierd old UUID. After replacing with the new one and invoking sudo update-initramfs -u it works now!

Maybe if I just did these steps, it would work:

  1. comment-out the line with /dev/mapper/cryptswap1 in /etc/fstab and enable the line with UUID under the # swap was on /dev/sda5 during installation line (= enabling swap with no encryption)
  2. comment-out the only line in /etc/crypttab
  3. edit /etc/initramfs-tools/conf.d/resume in order to contain the swap's UUID from /etc/fstab
  4. sudo update-initramfs -u
  5. reboot and check