4

upgraded lubuntu 16.04 to 18.04 and hibernation stopped working. I used to hibernate by doing

systemctl hibernate

on 18.04 it seems like it does the hibernation, but when I load the os it gives me a new workspace and the old image is not loaded. This seems to be a bug. Please, advise if anybody knows how to fix. I tried to report a bug on launchpad, but could not pass the paperwork requirements. the ubuntu bug report tool expects the bug to come from an app after os is loaded and cannot catch any bugs that happen during the load. see launchpad question #676281. anyway seems like

cat: /tmp/initrd/main/conf/conf.d/zz-auto-resume: No such file or directory

is the problem Thanks

5

to fix hibernate not working on lubuntu 18.04 you need to add a kernel parameter to the bootloader

you would first edit grub:

sudo nano /etc/default/grub

and change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sdXY"

where /dev/sdXY is the swap partition

save the file then update grub:

sudo update-grub

then update the initramfs:

sudo update-initramfs -u

now it should work when you use sudo systemctl hibernate

edit: instead of using GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sdXY" you could use GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/X"

replace X with the uuid of the swap partition which you could find using ls -l /dev/disk/by-uuid

4
  • is there a way to test if the new grub works? also, is there a way to tell it that if the specified resume does not load then use the usual load from the hd? finally, if I do it and it gives me a black screen with failure, what is the way to revert? do I load the os from a usb? Really appreciate your help. – Stephen Dec 18 '18 at 16:56
  • also, I think that using /dev/sdb is considered risky and UUID is encouraged. can you provide an example how to use the UUID? – Stephen Dec 18 '18 at 17:04
  • Yee-haw. It works. I tried to vote up the solution, but it does not allow me because of low reputation. – Stephen Dec 29 '18 at 21:59
  • the update-grub does not report errors: on my second laptop I typed ressume instead of resume and update-grub completed without messages. it did not work and I almost posted a question on how to fix hibernate on Mate 18.04. lucky my sharp eyes saw the typo. – Stephen Feb 12 '19 at 14:21
0

The answer up worked (for me). It worked before and then failed to read the image.... I don't know what it can be, but it is definitely broken..... Write command below to find out UUID of Partition:

sudo blkid | grep UUID=

If you did a mistake, Boot from live DVD/any boot medium, go to your root partition, go to path were you have to correct, revert, then write down below:

sudo chroot /PATHOFROOTPART-ForExample/media/ubuntu/skjdfksdj
sudo update-grub
sudo update-initramfs -u

I hope I helped you recover your system

4
  • I again: Next day it doesn't read the swap partition anymore!!! It doesn't work f linux.. Windows doesn't have such as bugs, Apple doesn't support it and Linux damn it.. EDIIT: I fixed it by running this: sudo update-grub; sudo update-initramfs -u; sudo sync; sudo hibernate – france1 Apr 5 at 9:01
  • IDK why it doesn't save it, but here: I again: Next day it doesn't read the swap partition anymore!!! It doesn't work f linux.. Windows doesn't have such as bugs, Apple doesn't support it and Linux damn it.. EDIIT: I fixed it by running this: sudo update-grub; sudo update-initramfs -u; sudo sync; sudo hibernate: I think the UUID changed... That caused mouse freeze in my MAcBook Air, I fixed it just with this: sudo hibernate My MacBook Air restart automatically after shutdown-hibernate.... – france1 Apr 5 at 9:32
  • It doesn't work anymore, also running these commands!! HUH! The UUID HAS to be the PROBLEM!! Every restart changes... How can I fix it? Removw sync? – france1 Apr 5 at 9:58
  • sync can change UUID??? I didn't know that, but now it works:/ Linux is very special os +_+ – france1 Apr 5 at 11:01

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.