Difficulty: ★★☆☆☆
This tutorial is to ensure you correctly turn off hibernation completely. You need to do this in 3 places in that order :
-
systemd
Create the following files:
-
/etc/systemd/sleep.conf.d/no-hibernate.conf
-
Add:
[Sleep] # disable hibernation # doc : https://archived.forum.manjaro.org/t/turn-off-disable-hibernate-completely/139939 AllowHibernation=no AllowHybridSleep=no AllowSuspendThenHibernate=no
-
-
/etc/systemd/logind.conf.d/no-hibernate.conf
-
Add:
[Login] # disable hibernation HibernateKeyIgnoreInhibited=no
-
-
Save and exit all
-
Test:
sudo systemctl hibernate
should fail with:
Failed to hibernate system via logind: Sleep verb "hibernate" not supported
I'm a N00b! I don't know how to to this: give me more help!
Don’t worry! Here is an example for the first file:
- Execute:
sudo mkdir /etc/systemd/sleep.conf.d/ sudo mkdir /etc/systemd/logind.conf.d/ # If the above give: "mkdir: cannot create directory: File exists" that's OK! sudo nano --backup /etc/systemd/sleep.conf.d/no-hibernate.conf
- copy-paste the following text in there:
[Sleep] # disable hibernation # doc : https://archived.forum.manjaro.org/t/turn-off-disable-hibernate-completely/139939 AllowHibernation=no AllowHybridSleep=no AllowSuspendThenHibernate=no
- Ctrl+X, then Y and Enter to save.
- Repeat for each of the files in the section above.
- Desktop Environment
-
In KDE:
Details
- Go to System settings:
- Type
hibernate
- Click Energy Saving: and remove any traces of Hibernate and change it to Sleep or Shutdown
Do this for all 3 tabs! :- On AC Power
- On Battery
- On Low Battery
- Hibernation also happens when your battery reaches critical condition during sleep, so click Advanced settings:
and change that to Shutdown as well.
-
In Gnome:
Details
Adapt your
gnome-shell
extension to remove hibernate from the options. -
In XFCE:
- Kernel
-
Change the
/etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT
and remove theresume=UUID=
parameter. -
Remove the
resume
item from theHOOKS=
line in/etc/mkinitcpio.conf
and perform asudo mkinitcpio --allpresets
I'm a N00b! I don't know how to to this: give me more help!
Don’t worry!
/etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT
just means there is a file/etc/default/grub
which contains the wordGRUB_CMDLINE_LINUX_DEFAULT
and that you need to change it!-
Execute:
sudo nano --backup /etc/default/grub
-
Press Ctrl+W to start searching
-
Type
GRUB_CMDLINE_LINUX_DEFAULT
Enter -
You’ll now see:
GRUB_CMDLINE_LINUX_DEFAULT=
-
with a whole bunch of behind it all separated by spaces.
-
You’re looking for
resume=UUID=SomeWeirdNumberCalledAGUID
-
Before you do the next step, ensure there is at least one space left between the previous and next parameter.
-
Remove
resume=UUID=SomeWeirdNumberCalledAGUID
and maximum one space! -
Verify again there is at least one space left before and after each parameter in that line or your computer will not boot any more! . If you’re unsure at this stage, press Ctrl+X then press N and try again at step 1
-
You’re sure??? Well, then press Ctrl+X then press Y and Enter to save.
For
mkinitcpio
:-
sudo nano --backup /etc/mkinitcpio.conf
-
Start the search functionality by pressing Ctrl+W (Meaning: W here is?) and type
HOOKS=
and Enter -
You will now see a line that has the word
resume
in it: remove that word and if you don’t see that word, just exit without saving by pressing Ctrl+X -
If you did find and remove the word, save and exit by Ctrl+X Y Enter and execute:
sudo mkinitcpio --allpresets
-
-
Execute:
sudo update-grub
So you’ve done all the above in one session?
-
Reboot
-
Final test:
sudo systemctl suspend
Which should still suspend your system but not hibernate it any more!