How to enable hibernation in manjaro-xfce?

when i run this command

xfce4-session-logout --hibernate

in my manjaro-xfce installation it want run so how i can enable hibernation in my system

Hello @the_beast48 :wink:

Have you done a web search? You are not the only one who asked that. Just saying…

Do you have a specific question?

1 Like
1 Like
  1. You need a swap partition as big as or bigger than your entire RAM size, as hibernation means dumping everything currently in RAM into the swap partition. Of course since the swap itself may already have been used by the time you want to hibernate, most tutorials will tell you to have 1.5-2x your RAM. I don’t strictly follow, I just simply ensure that currently used RAM + currently used swap don’t exceed swap size before hibernating. By default, hibernation does use compression so it isn’t actually 1:1 in size, but that previous formula is a safe bet.
  2. If you didn’t set up swap during installation and rather add it afterwards, you have to either manually call swapon -a (for simplicity, -a means all) or set it to automatically mount in /etc/fstab to activate it.
1 Like

you have a point i am trying to do this in btrfs file system and i found it difficult

@the_beast48 Yes, using a swap file is not that easy for a newbie:

but when using a swap partition, it is pretty straight forward.

  1. Create a partition, format it as swap and activate it plus add it to fstab.
  2. For hibernation add:

to the kernel parameters at /etc/default/grub and run sudo update-grub on the terminal and add:


to the HOOKS at /etc/mkinitcpio.conf and run sudo mkinitcpio -P.

Done. That are the basic steps. Now reboot and test it: systemctl hibernate

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.