I had problems recently with my system and reinstalled it completely. I may have (or not: I’m just not sure) missed to indicate the swap partition during the installation of manjaro KDE.
Since then I’ve been trying the following (in this specific order):
Create swap partition of 30G (for 16GB of RAM, so normally way more than enough)
Enable swap with mkswap and swapon commands
Add swap partition to fstab with UUID
Add resume HOOK to /etc/mkinitcpio.conf
run sudo mkinitcpio (I only have one kernel, so I don’t need the -P option which for some reason wiped out my grub file the first time I tried to make hibernation a thing, which now makes me nervous about it)
Add resume=UUID=myswappartitionuuid right after udev in /etc/default/grub
sudo update-grub
When I try to hibernate via GUI, it only turns the screen black (not even suspend).
When I try to hibernate via ‘systemctl hibernate’, I get ‘Failed to hibernate system via logind: Not enough swap space for hibernation’
Please help, why is it so darn complicated to hibernate?!
MMhhh okay I removed the resume_offset, and ran sudo update-grub, then rebooted.
Now systemctl hibernate turns the computer off, but it boots in a new session instead of finding previous state. So basically now it turns off instead of hibernating.
Maybe this following can help you … maybe not, but you can read that…
when you create manually partitions on ssd, swapfiles is created but not mounted !
See throught “gparted” if it’s the case.
If yes, you could solve the problem by ordering permanent activation of the SWAPfiles by console commands as follows :
From Wiki swap of NGr - to do the fat commands(past) :
a/ we need to enable the swap partition with the swapon command. sudo swapon /dev/sda3 (Be sure that sda3 is the good swap-partition, before launch the command “swapon”)
b/ In order to ensure that the swap is enabled at boot we can add an entry to /etc/fstab .
It is best to use the UUID instead of the device name for this purpose. You can add the line to fstab manually or using the command:
I’d check with: swapon -s
and with free
whether the swap space is now in use as it should be.
no
I’m not on Manjaro, so I don’t know whether that tmpfs line in /etc/fstab is standard.
I don’t have it.
But that shouldn’t affect anything re hibernation - it’s just something I noticed when comparing with my configuration.
… as an addition to my previous post - and after you have checked that the swap indeed works:
if suspending still doesn’t want to work I’d try to alter the /etc/mkinitcpio.conf
such that the “resume” hook will not be at the third position
but at the very last.
In my file it is the very last hook.
… just try to move it to the end, regenerate the initramfs, see if that really makes a difference
Other than that I have no more bright ideas.
I think because I tried ‘hibernator’ script, it got me that second resume parameter. I removed it.
I tried moving the ‘resume’ hook to the very last position, ran sudo mkinitcpio, but doesn’t work. I’ll try the swap file and see if that works… getting tired of trying stuff.