I want to hibernate on encrypted swap space

Daniel Troeder daniel at admin-box.com
Mon Nov 2 14:43:20 PST 2009


Hello :)

I have an encrypted root and swap in an encrypted LVM-VG, which I
"decrypt" (luksOpen) with my initramfs. Pretty standard setup with
Debian and Ubuntu when using encryption btw. (though I'm using Gentoo :)

So it is perfectly OK for me to hibernate to my swap, because I can also
restore from it.

$ dbus-send --system --dest=org.freedesktop.DeviceKit.Power --type=method_call --print-reply=yes /org/freedesktop/DeviceKit/Power org.freedesktop.DeviceKit.Power.Hibernate
Error org.freedesktop.DeviceKit.Power.GeneralError: Swap space is encrypted

I was thinking why you do this, and think the problem for devkit-power
is, that you cannot know easily how an encrypted swap is used (with
fixed key like mine or with random key). So you choose the safe way to
disallow it.

I don't know of a portable way to check for this. I think people with
random key have to set this up in /etc/crypttab (which I don't have).
Maybe this can be detected and distinguished from people with fixed key
setups?

Another idea would be to have the UI (gnome-power-manager?) ask the user
for desired behavior.

Is this maybe something devkit-disks should find out?

(In the meantime I'll live with "$ sudo pm-hibernate" or suspend :)


A different matter is, that I cannot hibernate (due to the above), but
"can-hibernate" is nevertheless "yes" (in "$ devkit-power -d").
Thus gnome-power-manager gives me the option to choose "hibernate"...


Anyway, thanx for all your work :)
Bye, Daniel


-- 
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/devkit-devel/attachments/20091102/ba88ca04/attachment.pgp 


More information about the devkit-devel mailing list