[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Behaviour change when closing laptop lid: it no longer suspends
From: |
Maxim Cournoyer |
Subject: |
Re: Behaviour change when closing laptop lid: it no longer suspends |
Date: |
Thu, 14 Jan 2021 12:54:04 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
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