Skip to content

pietryszak/fedora-hibernation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Btrfs hibernation script

mkdir -p ~/.gc && cd ~/.gc && git clone --quiet https://github.com/pietryszak/fedora-hibernation.git && cd fedora-hibernation && chmod +x hibernation.sh after-restart.sh

Before run script adjust your swap size

sudo sed -i 's/sudo fallocate --length 96GiB /swap/swapfile/sudo fallocate --length YOUR_SWAP_FILE_GiB /swap/swapfile/g' ~/.gc/fedora-hibernation/hibernation.sh && ./hibernation.sh

Redhat swap size recommendations

RAM Swap size (With Hibernation)
⩽ 2 GB 3 times the amount of RAM
> 2 GB – 8 GB 2 times the amount of RAM
> 8 GB – 64 GB 1.5 times the amount of RAM
> 64 GB Hibernation not recommended

Source

After automatic restart of PC after first script use second script (script restart PC once again)

sh -c ~/.gc/fedora-hibernation/after-restart.sh

Based on @jorp solution and information on this gist provided by @eloylp and comment by @miXwui.

About

Btrfs hibernation script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages