Why no answer accepted
For the simple reason that I haven't been using Ubuntu for a long time, so I couldn't test the answers.
Actually my question can appear identical to this one in this forum (and also this one elsewhere); indeed the question is the same, but I'm asking it anyway because I can give more informations and because I tried some solution found on the web (possibly getting things worse).
I used to hibernate Ubuntu 15.10 (closing the lid). Now that I've updated it to 16.04 (I thought it was a good thing, since this version is LTS, unlike the 15.10), I cannot use hibernation (nor suspension!) anymore: if I try to use it, Ubuntu doesn't shut down, just the screen goes black, the power led is on, and I cannot do anything else than shutting it down manually (long press of the power button). When I power it on again, I see the following lines
then Ubuntu boots up.
From here I tried with
sudo -s echo shutdown > /sys/power/disk echo disk > /sys/power/state
sudo -s echo platform > /sys/power/disk echo disk > /sys/power/state
Only the first partially worked and only once: by partially I mean that after the brutal shut down the session was recovered.
Then I tried to follow this suggestion. I didn't understand the comments written after the commands, so I literally entered the commands as they are (thinking that some error like "this command/folder doesn't exist" would have been occurred if there was something to substitute in the commands):
cat /proc/meminfo sudo swapoff -a sudo dd if=/dev/zero of=/swapfile bs=1024 count=8M sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile sudo -b gedit /etc/fstab free -m swapon mount | grep " / " sudo blkid -g sudo blkid sudo filefrag -v /swapfile | grep "First block:" sudo filefrag -v /swapfile echo "resume=UUID=cdXX--X18 resume_offset=66050" | sudo tee /etc/initramfs-tools/conf.d/resume sudo -b gedit /boot/grub/menu.lst sudo -b gedit /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="... resume=UUID=cdXX--X18 resume_offset=66050" sudo update-grub -y sudo update-initramfs -u
Maybe this has been a terrible idea, since now I get this.
In the end I found the question linked above and I went here, but I don't know what to do.
EDIT 2 At the moment if I enter
...$ sudo swapon -s
I obtain absolutely nothing