By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2601 - TDEpowersave + Logout menu should offer Suspend2Hybrid
Summary: TDEpowersave + Logout menu should offer Suspend2Hybrid
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.1.x [Trinity]
Hardware: Other Linux
: P5 enhancement
Assignee: Michele Calgaro
URL:
Depends on:
Blocks: R14.1.0
  Show dependency treegraph
 
Reported: 2016-02-27 03:05 CST by ThoMaus
Modified: 2016-05-06 13:15 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ThoMaus 2016-02-27 03:05:29 CST
"Suspend2Both" aka "Hybrid Suspend"

This is a synthetic mode provided by the Linux kernel, and not an original ACPI mode. It sets up the swap area as for Suspend2Disk AND then does a 
Suspend2RAM (ACPI G1/S3). The net effect is, that you normally have quick resume from RAM, but should power fail, nothing is lost as the kernel can resume from disk upon the next boot. 
Essentially a failsafe suspend ...

Its the only suspend-mode I'd use for desktop systems, and my preferred mode for 
laptop lid-close action as it always does "the right thing" (at the little cost in terms of time and disk IO for always setting up Suspend2Disk).

It should be available as a user choice both in the Logout Menu and the TDEpowersave configuration (IMHO, as default and recommended suspend action, sparing users frustration from lost Suspend2RAM states.)

(Not a duplicate of http://bugs.pearsoncomputing.net/show_bug.cgi?id=2412)
Comment 1 ThoMaus 2016-02-27 03:17:36 CST
To be considered:
Suspend triggers like lid-close, suspend+hibernate buttons can be handled via "logind" (config: "/etc/systemd/logind.conf").

Perhaps worth considering: if feasible, let "logind" do all kind of suspends thus isolating TDE from the specifics.
If somebody in the know kindly indicates, where to look in the TDE sources, I'll try to investigate the possibility and provide a concrete proposal.
Comment 2 deloptes 2016-04-20 04:03:56 CDT
If I press CTRL+ALT+DEL I see the shutdown screen and there is

* Freeze
* Suspend
* Hibernate

Are you talking about adding another option Freeze+Suspend?

BTW I do not know how it looks at the moment - cause no time to play, but these options were not available to me unless i installed older versions of 
policykit-1 and upower and flagged them as hold

hi  policykit-1                            0.105-3
hi  upower                                 0.9.23-2+b1
Comment 3 ThoMaus 2016-04-20 05:09:20 CDT
(In reply to deloptes from comment #2)
> If I press CTRL+ALT+DEL I see the shutdown screen and there is
> 
> * Freeze
> * Suspend
> * Hibernate
> 
> Are you talking about adding another option Freeze+Suspend?

Thanking you for confirming my argumentation in bug 2602 (alas ignored).
You just demonstrated how the current (and future) terminology provokes fundamental misunderstandings!

To answer your question:
Waht I'm talking about would be equivalent to Suspend+Hibernate in TDE terminology (but you are excused: "Hibernate" and "Freeze" were used as synonyms formerly (see bug 2602) ...)
Comment 4 Michele Calgaro 2016-04-24 04:42:23 CDT
Initial support added in commit 3b095cf and e972ff0.
There is some more code that needs to be written, will be added in a separate commit.

Hybrid suspend will only be added to R14.1.x, not R14.0.x.
Comment 5 Michele Calgaro 2016-04-24 04:55:12 CDT
> Perhaps worth considering: if feasible, let "logind" do all kind of suspends 
> thus isolating TDE from the specifics.
> If somebody in the know kindly indicates, where to look in the TDE sources, 
> I'll try to investigate the possibility and provide a concrete proposal.

Hi Thomas, sorry I just noticed this today.
You can look at tdelibs/tdecore/tdehw/tderootsystemdevice.cpp as a starting point.
For your info, if suspend can not be achieved by writing to /sys/power/state and tde has been compiled with WITH_LOGINDPOWER, TDE will try to achieve suspend using a dbus call to org.freedesktop.login1.Manager
But we can not make this the default way to suspend the system because TDE is dcop based and dbus is not installed by default. On older distros or if the user does not install the tde dbus packages, this would probably fail. So first choice will remain to write to /sys/power/state directly
Comment 6 Michele Calgaro 2016-04-26 04:47:30 CDT
DBus support for hybrid suspend added in commit ba3ed71.
Comment 7 Michele Calgaro 2016-04-26 05:13:46 CDT
Previous commit was incomplete (one file was forgotten by mistake). Completed in commit a297127.
Comment 8 Michele Calgaro 2016-05-03 04:13:00 CDT
Improved code in commit 92394e2 and added support in TDE Control/Hardware manager in commit b491941
Comment 9 Michele Calgaro 2016-05-03 21:48:33 CDT
Added support for hybrid suspend in Kickoff menu in commit fb91cbd.
Comment 10 Michele Calgaro 2016-05-03 21:59:58 CDT
Fixed hybrid suspend support using HAL in commit c7171b9
Comment 11 Michele Calgaro 2016-05-06 13:06:43 CDT
Added support for hybrid suspend in tdepowersave in commit a3caab9