gabbo wrote: ⤴Sun Sep 26, 2021 8:35 am
Hi,
I'm trying to configure my new PC with Linux Mint 20.2.
I'd like to enable hibernation (as I had in my previous Linux Mint PC). I have tried to run
sudo pm-hibernate
as a test, but it restarted afterwards normally and without the few programs I had open, even though it did a bit of flickering before shutting down (as the old pc would do).
I currently have 16 Gb of RAM and a 17.8 Gb swap partition in order to allocate all the RAM.
How could I make it work?
Thanks!
I was just looking for the solution to this problem myself, and just discovered the solution.
First of all, you will want to resize the swap partition to double the size of your RAM (in this case, 32 GB or 34,359,738,368 bytes), so that hibernation can safely suspend to RAM.
Second, make sure Secure Boot is disabled in your BIOS settings.
Third, open the command line (terminal), and type in the following:
sudo -i
(Type in your password)
Code: Select all
echo -e "[Enable hibernate in upower]\nIdentity=unix-user:*\nAction=org.freedesktop.upower.hibernate\nResultActive=yes\n\n[Enable hibernate in logind]\nIdentity=unix-user:*\nAction=org.freedesktop.login1.hibernate\nResultActive=yes" >> /etc/polkit-1/localauthority/50-local.d/enable-hibernate.pkla
Next, close that terminal window, and open up a new terminal window. Type in the following:
inxi -u
Copy the 'uuid' value of your swap partition to somewhere - you're going to need that later on.
Next:
sudo -i
(Type in your password)
xed /etc/default/grub
This will open up the text editor for the 'grub' file.
Look for the line of text that says
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Now, you're going to need to paste the 'uuid' value from earlier. Change that line of text within the 'grub' file to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=PASTE THE UUID VALUE HERE"
Save the 'grub' file, and close the text editor.
Finally, in a new terminal window, type in the following:
sudo update-grub
(Type in your password)
After that, restart your computer, and then make sure hibernate works properly thereafter.