unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: elogind status
Date: Thu, 27 Aug 2015 16:20:24 +0200	[thread overview]
Message-ID: <87a8tczuc7.fsf@igalia.com> (raw)
In-Reply-To: <87io80zvcq.fsf@igalia.com> (Andy Wingo's message of "Thu, 27 Aug 2015 15:58:29 +0200")

On Thu 27 Aug 2015 15:58, Andy Wingo <wingo@igalia.com> writes:

> On Thu 27 Aug 2015 15:25, ludo@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo <wingo@igalia.com> skribis:
>>
>>> I will keep this patch stack up to date at wip-pam-elogind.  On that
>>> branch there's an update to a new elogind that includes systemd's code
>>> to suspend/hibernate/hybrid-sleep the system, as well as new code to
>>> implement the poweroff/halt/reboot things.
>>
>> How does poweroff/halt/reboot works?
>>
>> On GuixSD, ‘halt’ & co. make an RPC to dmd so that it terminates all the
>> services (including file system mounts) in the right order.
>>
>> Anyway, good stuff!
>
> Currently poweroff and halt both invoke the "halt" executable, whose
> full path is captured at build-time if available and otherwise searched
> in the path.  In Guix the full path is captured.  Poweroff and halt are
> the same on modern systems, aren't they?  Dunno.  Reboot invokes reboot,
> captured in the same way, and the same for kexec.  Anyway for Guix this
> should do the right thing, no?  It waits for the exec'd program to
> return and checks the error code.  I guess the actual halt is async
> though of course.
>
> Suspend/hibernate/hybrid-sleep all write to /sys/power/disk and
> /sys/power/state.

Forgot to add the link.  The suspend code is from systemd, and uses a
config file to configure what to do for various sleep states.  The
halt/reboot/kexec code is mine.  For all of these, upstream systemd does
an RPC to systemd to run special units or targets.  The sleep code ends
up being the same but the halt code is different.

   https://github.com/andywingo/elogind/commit/ef2aa93b7a4c742ae74496566344fd71e411fa72
   http://www.freedesktop.org/software/systemd/man/systemd-sleep.conf.html
   http://www.freedesktop.org/software/systemd/man/systemd-sleep.html

Andy

  reply	other threads:[~2015-08-27 14:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 10:33 elogind status Andy Wingo
2015-08-21 11:48 ` Claes Wallin (韋嘉誠)
2015-08-21 12:11   ` Andy Wingo
2015-08-21 14:14     ` 宋文武
2015-08-21 14:21     ` Thompson, David
2015-08-21 15:19 ` 宋文武
2015-08-21 15:32   ` Andy Wingo
2015-08-21 15:34   ` Thompson, David
2015-08-25  7:48 ` Andy Wingo
2015-08-27 13:25   ` Ludovic Courtès
2015-08-27 13:58     ` Andy Wingo
2015-08-27 14:20       ` Andy Wingo [this message]
2015-08-27 20:47       ` Ludovic Courtès
2015-08-27 13:21 ` Ludovic Courtès
2015-08-27 14:01   ` Andy Wingo
2015-08-27 20:45     ` Ludovic Courtès
2016-02-06 11:07 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8tczuc7.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).