Do not offer hibernate with encrypted swap
Bug #423608 reported by
Loïc Minier
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DeviceKit-Power |
Confirmed
|
Medium
|
|||
devicekit-power (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Binary package hint: indicator-applet
Hi
While testing Alpha 5 UNR in Virtualbox (hence lack of usage of ubuntu-bug, sorry), I saw Suspend/Hibernate etc. offered in the session indicator applet. Clicking suspend did nothing and didn't popup any error message. Clicking hibernate caused an hibernate attempt but reported an error message. suspend isn't actually supported by the system and "pm-is-supported --suspend" returns error code 1.
I think the applet shouldn't display suspend or should popup a dialog explaining why suspend failed (not supported).
Thanks
summary: |
- Offers suspend even when not supported + Do not offer hibernate with encrypted swap |
Changed in devicekit-power (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in devicekit-power: | |
status: | Unknown → In Progress |
Changed in devicekit-power: | |
status: | In Progress → Fix Released |
tags: | added: iso-testing |
Changed in devicekit-power: | |
status: | Fix Released → Confirmed |
Changed in devicekit-power: | |
importance: | Unknown → Medium |
Changed in devicekit-power: | |
importance: | Medium → Unknown |
Changed in devicekit-power: | |
importance: | Unknown → Medium |
Changed in devicekit-power: | |
status: | Confirmed → Incomplete |
Changed in devicekit-power: | |
status: | Incomplete → Confirmed |
To post a comment you must log in.
Hello,
I think devicekit-power could be improved by using the pm-is-supported script provided by pm-utils.
It has a bit of logic that can determine if --suspend and --hibernate methods are supported. It goes a bit beyond the basic kernel check that devicekit-power does:
/* does the kernel advertise this */
daemon- >priv-> can_suspend = (g_strstr_len (contents, -1, "mem") != NULL);
daemon- >priv-> can_hibernate = (g_strstr_len (contents, -1, "disk") != NULL);
I'm working on adding some logic to pm-is-supported --hibernate which will also check if swap space exists, for instance (beyond the basic kernel support for hibernation). It would be nice if devicekit could leverage this too.
Cheers,
:-Dustin