avaldes added a comment.

  In D16425#349588 <https://phabricator.kde.org/D16425#349588>, @ngraham wrote:
  
  > We'll need a spinbox to display time options for the amount of delay before 
hibernating if this is the UI we go with. But I kinda like Martin's idea and 
present this in the form of an additional control sort of like this:
  >
  >   While suspended, hibernate after: [combobox with some carefully selected 
intervals, plus "Never", which is the default choice]
  >
  >
  > Also, how does this handle hardware or distro configurations that don't 
support hibernation? I might suggest that it would be best to hide the option 
entirely in such a case. On this subject, the HIG says:
  >
  > > If some of the program’s settings are only applicable in certain 
contexts, do not hide the inapplicable ones. Instead, disable them and hint to 
the user why they’re disabled. **Exception:** it is acceptable to hide settings 
for non-existent hardware. For example, it’s okay to hide the touchpad 
configuration when no touchpad is present.
  >
  > It's not //exaaaactly// the same thing, but I think the principle applies 
here.
  
  
  If the hardware you are running doesn't support hibernation, logind 
canSupportThenHibernate method should return no, I tested this code in a 
machine without hibernation and it currently hides the new option. I added some 
checks before saving so we don't accidentally enable this suspend option by 
error.
  
  On the amount of time to hibernate, afaik this can only be configured by 
modifying /etc/systemd/sleep.conf and adding HibernateDelaySec= with the amount 
of seconds that you want to wait to hibernate, by default the wait time is 3 
hours. I have no knowledge of an API to configure this time.

REPOSITORY
  R122 Powerdevil

REVISION DETAIL
  https://phabricator.kde.org/D16425

To: avaldes, broulik
Cc: graesslin, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

Reply via email to