Hi Tobias, Tobias Geerinckx-Rice <m...@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