unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: Tobias Geerinckx-Rice via <help-guix@gnu.org>
Subject: Re: Behaviour change when closing laptop lid: it no longer suspends
Date: Thu, 14 Jan 2021 12:54:04 -0500	[thread overview]
Message-ID: <87pn27l803.fsf@gmail.com> (raw)
In-Reply-To: <871rens9a2.fsf@nckx> (Tobias Geerinckx-Rice's message of "Thu, 14 Jan 2021 18:44:37 +0100")

Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Maxim,
>
> Maxim Cournoyer 写道:
>> Shouldn't that be the default behavior though?
>
> That's subjective.  I don't think we should ever editorialise if
> that's what you mean: Guix service configuration wrappers should 
> strictly wrap, not tweak defaults on a (majority) whim.

Agreed.

> However, here our wrapping is wrong.  Thanks for making me look into
> it.
>
> From upstream's change log:
>
>  The action that elogind takes when the lid is closed and the
>  machine is connected to external power can now be configured
>  using HandleLidSwitchExternalPower= in logind.conf. Previously,
>  this action was determined by HandleLidSwitch=, and, for
>  backwards compatibility, is still is, if
>  HandleLidSwitchExternalPower= is not explicitly set.
>
> Whilst we:
>
>  ("HandleLidSwitchExternalPower"
>    (handle-action elogind-handle-lid-switch-external-power))
>
> always ‘explicitly set’ HandleLidSwitchExternalPower, by default to
> ‘ignore’, breaking that intention.
>
> elogind-handle-lid-switch-external-power should not emit a directive
> if unset.  In fact, all directives and all services should do that by
> default, *not* hard-code upstream's default at an arbitrary point in
> time.

Oh, nice find!  So we have something to fix.

> Unfortunately most do, making subtle bugs like these more likely.
>
>> Like Pierre, I'm also certain that the default behavior was changed
>> at
>> some point.
>
> I didn't find any evidence for this in the commit log but didn't
> search exhaustively.

I'm guessing if nothing changed in our side, the behavior of elogind
itself must have changed.

Thank you,

Maxim


  reply	other threads:[~2021-01-14 18:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 13:28 Behaviour change when closing laptop lid: it no longer suspends Pierre Neidhardt
2020-12-18 14:02 ` Tobias Geerinckx-Rice
2020-12-18 15:25   ` Pierre Neidhardt
2020-12-18 15:44     ` Pierre Neidhardt
2020-12-18 19:38       ` Tobias Geerinckx-Rice
2020-12-19 13:36         ` Tobias Geerinckx-Rice via
2020-12-20 13:57           ` Pierre Neidhardt
2020-12-20 14:08             ` Pierre Neidhardt
2021-01-14 16:27           ` Maxim Cournoyer
2021-01-14 17:44             ` Tobias Geerinckx-Rice
2021-01-14 17:54               ` Maxim Cournoyer [this message]
2021-01-18 17:37                 ` Pierre Neidhardt
2020-12-18 20:33       ` Maxim Cournoyer

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=87pn27l803.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=me@tobias.gr \
    /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.
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).