Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


1) I am using systemd to suspend to disk using: systemctl hibernate

2) I have mounted a filesystem on an encrypted block device, that I suspend using dmsetup suspend device in order to wipe the key before I go into hibernation.

The problem:

The hibernation hangs at

systemd-sleep[7366]: Suspending system...
kernel: PM: Hibernation mode set to 'platform'
kernel: PM: Syncing filesystems ...

If I resume (dmsetup resume device), then the syncing can be completed and hibernation will continue

Is there another way to either issue the suspend command AFTER the sync when entering hibernation? Or another way to wipe the encryption keys, that allows me to safely enter hibernation (besides encryption the swap partition)?

share|improve this question
up vote 0 down vote accepted

one solution seems to be to use the following systemd unit:




<target> is the corresponding target of your desired mode. From the systemd-suspend.service Manpage:,, or

And the wipe script:

dmsetup suspend "$name"
dmsetup message "$name" 0 key wipe
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .