all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* acpi, suspend, hibernate
@ 2015-03-28  1:44 白い熊@相撲道
  2015-03-28  8:01 ` Tomáš Čech
  2015-03-28 17:30 ` Ludovic Courtès
  0 siblings, 2 replies; 11+ messages in thread
From: 白い熊@相撲道 @ 2015-03-28  1:44 UTC (permalink / raw)
  To: guix-devel

I have GuixSD installed on the Gluglug X200 and would like to issue 
suspend and hibernate commands. Upon inspecting /proc/acpi however it 
seems that this is not built in the current kernel that I have booted.

Do I need to add some acpi, acpi-service etc. to config.scm and 
reconfigure? Could someone specify what exactly is needed?

Many thanks.
-- 
白い熊@相撲道

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28  1:44 acpi, suspend, hibernate 白い熊@相撲道
@ 2015-03-28  8:01 ` Tomáš Čech
  2015-03-28 17:30 ` Ludovic Courtès
  1 sibling, 0 replies; 11+ messages in thread
From: Tomáš Čech @ 2015-03-28  8:01 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

On Sat, Mar 28, 2015 at 02:44:42AM +0100, 白い熊@相撲道 wrote:
>I have GuixSD installed on the Gluglug X200 and would like to issue 
>suspend and hibernate commands. Upon inspecting /proc/acpi however it 
>seems that this is not built in the current kernel that I have booted.
>
>Do I need to add some acpi, acpi-service etc. to config.scm and 
>reconfigure? Could someone specify what exactly is needed?

I'm not aware of any solution for this. To trigger suspend to RAM
manually on kernel level you need to run:

echo mem > /sys/power/state

HTH,

S_W

[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28  1:44 acpi, suspend, hibernate 白い熊@相撲道
  2015-03-28  8:01 ` Tomáš Čech
@ 2015-03-28 17:30 ` Ludovic Courtès
  2015-03-28 18:37   ` Mark H Weaver
  2015-03-31 21:50   ` 白い熊@相撲道
  1 sibling, 2 replies; 11+ messages in thread
From: Ludovic Courtès @ 2015-03-28 17:30 UTC (permalink / raw)
  To: 白い熊@相撲道; +Cc: guix-devel

白い熊@相撲道 <guix-devel_gnu.org@sumou.com> skribis:

> I have GuixSD installed on the Gluglug X200 and would like to issue
> suspend and hibernate commands. Upon inspecting /proc/acpi however it
> seems that this is not built in the current kernel that I have booted.

We currently lack the pm-utils package, which provides ‘pm-suspend’
(currently I use a script that writes to /sys/power/state as Tomáš
suggested.)  Would you like to give it a try?

> Do I need to add some acpi, acpi-service etc. to config.scm and
> reconfigure? Could someone specify what exactly is needed?

We also lack a service to run acpid.  You’re welcome to try it as well
;-).  The main thing is that it requires studying a bit acpid’s options
and possibly provide an API for the /etc/acpi/events rules.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28 17:30 ` Ludovic Courtès
@ 2015-03-28 18:37   ` Mark H Weaver
  2015-03-28 20:59     ` Tomáš Čech
  2015-03-31 12:18     ` acpi, suspend, hibernate Ludovic Courtès
  2015-03-31 21:50   ` 白い熊@相撲道
  1 sibling, 2 replies; 11+ messages in thread
From: Mark H Weaver @ 2015-03-28 18:37 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> 白い熊@相撲道 <guix-devel_gnu.org@sumou.com> skribis:
>
>> I have GuixSD installed on the Gluglug X200 and would like to issue
>> suspend and hibernate commands. Upon inspecting /proc/acpi however it
>> seems that this is not built in the current kernel that I have booted.
>
> We currently lack the pm-utils package, which provides ‘pm-suspend’
> (currently I use a script that writes to /sys/power/state as Tomáš
> suggested.)  Would you like to give it a try?

I wonder if it might be better to implement suspend/resume in dmd, so
that services could easily define actions to be run before suspend and
after resume.  I guess the pm-utils approach is to put shell scripts
into /etc/pm.

       Mark

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28 18:37   ` Mark H Weaver
@ 2015-03-28 20:59     ` Tomáš Čech
  2017-07-04  0:45       ` Implement power management (suspend, hibernate, resume) in Shepherd? Mekeor Melire
  2015-03-31 12:18     ` acpi, suspend, hibernate Ludovic Courtès
  1 sibling, 1 reply; 11+ messages in thread
From: Tomáš Čech @ 2015-03-28 20:59 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

On Sat, Mar 28, 2015 at 02:37:11PM -0400, Mark H Weaver wrote:
>ludo@gnu.org (Ludovic Courtès) writes:
>
>> 白い熊@相撲道 <guix-devel_gnu.org@sumou.com> skribis:
>>
>>> I have GuixSD installed on the Gluglug X200 and would like to issue
>>> suspend and hibernate commands. Upon inspecting /proc/acpi however it
>>> seems that this is not built in the current kernel that I have booted.
>>
>> We currently lack the pm-utils package, which provides ‘pm-suspend’
>> (currently I use a script that writes to /sys/power/state as Tomáš
>> suggested.)  Would you like to give it a try?
>
>I wonder if it might be better to implement suspend/resume in dmd, so
>that services could easily define actions to be run before suspend and
>after resume.  I guess the pm-utils approach is to put shell scripts
>into /etc/pm.

I second this idea. Dmd is proper place to implement such actions as
services may benefit from performing actions before suspend or after
resume.

Pm-utils package was collection of hacks and workarounds for broken
hardware. It hopefully won't be needed anymore.

To have the list of options richer, there is also UPower
(http://upower.freedesktop.org/) which is designed to take care of
power management.

Best regards,

S_W

[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28 18:37   ` Mark H Weaver
  2015-03-28 20:59     ` Tomáš Čech
@ 2015-03-31 12:18     ` Ludovic Courtès
  1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2015-03-31 12:18 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> 白い熊@相撲道 <guix-devel_gnu.org@sumou.com> skribis:
>>
>>> I have GuixSD installed on the Gluglug X200 and would like to issue
>>> suspend and hibernate commands. Upon inspecting /proc/acpi however it
>>> seems that this is not built in the current kernel that I have booted.
>>
>> We currently lack the pm-utils package, which provides ‘pm-suspend’
>> (currently I use a script that writes to /sys/power/state as Tomáš
>> suggested.)  Would you like to give it a try?
>
> I wonder if it might be better to implement suspend/resume in dmd, so
> that services could easily define actions to be run before suspend and
> after resume.

Good point, and this would be quite easy.

I wonder where things like X session locking should take place though.
(I guess this is one of the things that ConsoleKit and its replacements
took care of.)

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: acpi, suspend, hibernate
  2015-03-28 17:30 ` Ludovic Courtès
  2015-03-28 18:37   ` Mark H Weaver
@ 2015-03-31 21:50   ` 白い熊@相撲道
  1 sibling, 0 replies; 11+ messages in thread
From: 白い熊@相撲道 @ 2015-03-31 21:50 UTC (permalink / raw)
  To: ludo, 白い熊@相撲道; +Cc: guix-devel



On March 28, 2015 7:30:43 AM HST, ludo@gnu.org wrote:
>白い熊@相撲道 <guix-devel_gnu.org@sumou.com> skribis:
>We currently lack the pm-utils package, which provides ‘pm-suspend’
>(currently I use a script that writes to /sys/power/state as Tomáš
>suggested.)  Would you like to give it a try?

This is an OK solution for suspend. Unfortunately it doesn't allow to hibernate to a swap partition... 
-- 
白い熊@相撲道

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Implement power management (suspend, hibernate, resume) in Shepherd?
  2015-03-28 20:59     ` Tomáš Čech
@ 2017-07-04  0:45       ` Mekeor Melire
  2017-07-04 19:31         ` Mark H Weaver
  2017-07-09 12:15         ` Ricardo Wurmus
  0 siblings, 2 replies; 11+ messages in thread
From: Mekeor Melire @ 2017-07-04  0:45 UTC (permalink / raw)
  To: help-guix


I'm bumping this old thread:

    https://lists.gnu.org/archive/html/guix-devel/2015-03/msg00757.html

because I'd like to discuss if it still makes sense to implement power
management, i.e. suspend (to memory=RAM), hibernate (to (hard) disk) and
resume in GNU Shepherd. As far as I can see, Shepherd currently only
provides ‘halt’ and ‘reboot’.

As far as I understand, currently GuixSD uses elogind (“systemd
project's ‘logind’, extracted to a standalone package”) to suspend,
hibernate and resume when some events happen, like pressing the
suspend-key etc.

Is there any nice way to suspend GuixSD by command? (I didn't yet try
out ‘echo mem > /sys/power/state’.) Is it still desirable that Shepherd
itself could get this job done?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Implement power management (suspend, hibernate, resume) in Shepherd?
  2017-07-04  0:45       ` Implement power management (suspend, hibernate, resume) in Shepherd? Mekeor Melire
@ 2017-07-04 19:31         ` Mark H Weaver
  2017-07-08 22:09           ` Ludovic Courtès
  2017-07-09 12:15         ` Ricardo Wurmus
  1 sibling, 1 reply; 11+ messages in thread
From: Mark H Weaver @ 2017-07-04 19:31 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: help-guix

Mekeor Melire <mekeor.melire@gmail.com> writes:

> As far as I understand, currently GuixSD uses elogind (“systemd
> project's ‘logind’, extracted to a standalone package”) to suspend,
> hibernate and resume when some events happen, like pressing the
> suspend-key etc.
>
> Is there any nice way to suspend GuixSD by command? (I didn't yet try
> out ‘echo mem > /sys/power/state’.)

"loginctl suspend" will do it, optionally with "-i" added to ignore
inhibitors.  See "loginctl --help" for more.

      Mark

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Implement power management (suspend, hibernate, resume) in Shepherd?
  2017-07-04 19:31         ` Mark H Weaver
@ 2017-07-08 22:09           ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2017-07-08 22:09 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: help-guix

Mark H Weaver <mhw@netris.org> skribis:

> Mekeor Melire <mekeor.melire@gmail.com> writes:
>
>> As far as I understand, currently GuixSD uses elogind (“systemd
>> project's ‘logind’, extracted to a standalone package”) to suspend,
>> hibernate and resume when some events happen, like pressing the
>> suspend-key etc.
>>
>> Is there any nice way to suspend GuixSD by command? (I didn't yet try
>> out ‘echo mem > /sys/power/state’.)
>
> "loginctl suspend" will do it, optionally with "-i" added to ignore
> inhibitors.  See "loginctl --help" for more.

Even simpler: closing my laptop’s lid puts it into suspend-to-memory
mode.

Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Implement power management (suspend, hibernate, resume) in Shepherd?
  2017-07-04  0:45       ` Implement power management (suspend, hibernate, resume) in Shepherd? Mekeor Melire
  2017-07-04 19:31         ` Mark H Weaver
@ 2017-07-09 12:15         ` Ricardo Wurmus
  1 sibling, 0 replies; 11+ messages in thread
From: Ricardo Wurmus @ 2017-07-09 12:15 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: help-guix


Mekeor Melire <mekeor.melire@gmail.com> writes:

> Is there any nice way to suspend GuixSD by command? (I didn't yet try
> out ‘echo mem > /sys/power/state’.) Is it still desirable that Shepherd
> itself could get this job done?

My librebooted laptop sometimes … breaks in weird ways disabling all
hotkeys, including the switch that is used to suspend.  Whenever this
happens and I cannot reboot I use

    echo mem | sudo tee /sys/power/state

This works fine to suspend the laptop.  It does not lock it, though.

Usually, though it is enough to close the lid of this X200S.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-07-09 12:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28  1:44 acpi, suspend, hibernate 白い熊@相撲道
2015-03-28  8:01 ` Tomáš Čech
2015-03-28 17:30 ` Ludovic Courtès
2015-03-28 18:37   ` Mark H Weaver
2015-03-28 20:59     ` Tomáš Čech
2017-07-04  0:45       ` Implement power management (suspend, hibernate, resume) in Shepherd? Mekeor Melire
2017-07-04 19:31         ` Mark H Weaver
2017-07-08 22:09           ` Ludovic Courtès
2017-07-09 12:15         ` Ricardo Wurmus
2015-03-31 12:18     ` acpi, suspend, hibernate Ludovic Courtès
2015-03-31 21:50   ` 白い熊@相撲道

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.