Bug 540067
Summary: | Hibernation to encrypted swap no longer possible in F12 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tore Anderson <tore> |
Component: | DeviceKit-power | Assignee: | Richard Hughes <richard> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 12 | CC: | abuse, rhughes, richard, sluskyb, thomas.mey, tigeli |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-06-22 22:06:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tore Anderson
2009-11-22 05:18:06 UTC
It's a bug in DeviceKit-power, see: https://bugs.freedesktop.org/show_bug.cgi?id=23196 . Nice catch. I am indeed using encrypted swap. Tore Same here, encrypted swap worked fine with FC11. After upgrade to FC12, the option was no longer available in the Gnome menus. Note that pm-hibernate still works fine with FC12 on my Dell Precision M6300. pm-is-supported --hibernate && echo OK OK devkit-power -d (...) Daemon: (...) can-hibernate no (...) Is nothing being done to fix this very annoying bug? Both hibernation and disk encryption are pretty crucial features to many laptop users... Tore Yes, it is very annoying. I hacked the source of the devkit-power-daemon to allow hibernate on encrypted swap. Hibernation is fine with that hack. In source file dkp-daemon.c, look for the following piece of code: /* encrypted swap? */ if (daemon->priv->hibernate_has_encrypted_swap) { error = g_error_new (DKP_DAEMON_ERROR, DKP_DAEMON_ERROR_GENERAL, "Swap space is encrypted"); g_error_free (error_local); dbus_g_method_return_error (context, error); goto out; } Put #if 0 and #endif around it and you are fine. The devkit-power-daemon lives in /usr/libexec. Replace it and restart the daemon (a reboot is the easy way). Bas, thanks! To me your change does not seem as a hack at all, it seems to me the whole purpose of that code is to prevent hibernation to encrypted swap. However, hibernation to encrypted swap works just as well as hibernation to unencrypted swap. The check is obviously broken and should be removed - your change appears to me as the correct fix. It should really be added to F12/13. By the way, I think the reason for the check must be to prevent hibernation to encrypted swap if the user has no means to unlock the swap and thus resume from it. If this is the case or not depends on unlocking support in initramfs, and Fedora has had that since at least since F11 (probably longer), and it has been working well. There is therefore no reason to have this check in the Fedora packages, but plenty of reason to take it out. Tore Yup, still broken in Fedora 12. Commit that introducted that behaviour: http://cgit.freedesktop.org/DeviceKit/DeviceKit-power/commit/?id=ea6ebd1a526653bb9d59d5143d844c0f7557a351 Above commit tries to fix the freedesktop bugilla bug 23196: http://bugs.freedesktop.org/show_bug.cgi?id=23196 Many thanks to Dustin Kirkland and the eCryptfs guys, that broke hibernate function in Fedora 12 to an encrypted swap, that is pretty good supported in Fedora 12! I'm guessing this commit fixes things for you: http://cgit.freedesktop.org/upower/commit/?id=5f1e64709b62517e4a925e952d255ab16d818df0 It there a rpm available to test, e.g. in koji (or what is it called) or so? Will there be an update for Fedora 12 for this package? Yup, I'll hopefully do it this week at some point. If you need a fix now, rebuild the srpm package from here: http://people.freedesktop.org/~hughsient/fedora/13/SRPMS/ I replaced DeviceKit-power-014-1.fc12.x86_64 by upower-0.9.4-1.fc13.x86_64 and the "Hibernate" button appears and works now. Thanks for the fix. *** Bug 575898 has been marked as a duplicate of this bug. *** Works for me too. Thanks! Fixed in current Fedora 13. Thanks! |