I tried to hibernate ubuntu-budgie from the top panel, but it doesn't hibernate, it only locks the computer.
Seeing that, I tried to hibernate from the terminal using sudo systemctl hibernate
, but I got the same result.
I used the command systemctl status hibernate.target
, and I saw theses errors :
systemd[1]: Dependency failed for Hibernate.
systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
PS : This is a fresh installation of ubuntu budgie, and I have enough swap size (4Gb RAM and 4Gb swap).
PS2 : I am using a swap file and not a swap partition (That's how the new version of ubuntu creates by default)
Best Answer
@fossfreedom gave me a link to an answer, the answer is great, but didn't completely solve my problem. So I will put what I did to make my computer hibernate under ubuntu-budgie 17.04
Create Swap File (go to the next step if you already have a swapfile)
These commands create a formatted 4GiB swap file, mounted and added to /etc/fstab:
Install Userspace Software Suspend (uswsusp)
Verify Swap File Partition
Configure uswsusp
This will create /etc/uswsusp.conf and recreate initramfs using those details:
sudo dpkg-reconfigure -pmedium uswsusp
Yes
to 'Continue without a valid swap space?' (Wizard hasn't set swap file yet.)findmnt
above. (Note: not the swap-file itself)Create the file
/etc/initramfs-tools/conf.d/resume
if it doesn't exist, and put your swap_id in it like this :Test Hibernate
Use s2disk with systemd Hibernate
Edit the new file:
Replace the last line of the file (starts ExecStart=...) with the following:
Update the systemd daemon and test hibernate:
Allow hibernation from top panel buttons
Open the file :
and find both sections :
and change both values from no to yes :