Weel, i think this technology isn’t but seems as far as know, vista already had have this. just don’t activate by default. So what is this Hybrid Sleeping? Basically on simple terms, suspend + hibernate at the same time. Get it? if you don’t please read this first. Now i wan’t to share my setup to USWSUSP + systemd , well systemd hinernate , sleep , and hybrid-sleep doesn’t bad, it works flawlessly on my machine, but the problem is the speed how long hibernate time taken and sleep taken, i don’t mind if there was some tweaking to compress hibernate image with systemd, because i don’t know how to do it.
to use USWSUSP using systemd is pretty easy.
#yaourt -S uswsusp-git
#nano /etc/suspend.conf
In this case see my config to help you mods your suspend.conf
# /etc/suspend.conf
#
# Configuration for s2disk
#
# >>> Remember to update your initcpio after changing!
#
## You shouldn’t need to change this.
snapshot device = /dev/snapshot
## Location of swap space used
# Swap-partition or partition containing the swapfile
resume device = /dev/disk/by-uuid/30b95ee9-5907-495e-bf33-32ffa02ccce6
# Output from swap-offset
#resume offset = 123456
## Misc. options
# Try to limit the size of the image created on disk
#image size = 350000000
# Shutdown method as found in /sys/power/disk
shutdown method = poweroff
# Kernel console loglevel during suspend/resume
suspend loglevel = 2
# Kernel console loglevel in case resume failes
#max loglevel = 8
# Compute MD5 sum to verify image integrity
compute checksum = y
# Compress image to save time and space
compress = y
# Encrypt image (see HOWTO)
#encrypt = y
#RSA key file = # Speed up disk sync
early writeout = y
# Enable suspend splash
# Note: The uresume hook looks at the kernel cmdline only.
# splash = y
# Speed up encryption if more then one CPU
threads = y
See? pretty easy right? Now the systemd system caller, there was three files to modify.
#cp /etc/systemd/system/systemd-hybrid-sleep.service /etc/systemd/system/
#cp /etc/systemd/system/systemd-hibernate.service /etc/systemd/system/
#cp /etc/systemd/system/systemd-suspend.service /etc/systemd/system/
Edit every file :
systemd-hybrid-sleep.service
Change the “ExecStart” value to
ExecStart=/usr/sbin/s2both
systemd-hibernate.service
Change the “ExecStart” value to
ExecStart=/usr/sbin/s2disk
systemd-suspend.service
Change the “ExecStart” value to
ExecStart=/usr/sbin/s2ram
And also don’t forget to rebuild your kernel image, add “uresume” HOOKS to your mkinitcpio, also remove “resume” HOOKS which default in systemd, reboot your linux, try your flashy suspend, hibernate, and ybrid-sleep 😀