Hi!
Maxime Devos skribis:
> On 05-09-2022 14:56, Ludovic Courtès wrote:
>> I’d like to test whether UPower invokes the intended critical action,
>> but I’m not sure how to simulate a low battery level. Thoughts?
>
> I've found a 'Virtual Battery Driver': https://lwn.net/Articles/440097/
>
> The
Ludovic Courtès skribis:
> I pushed these patches:
>
> eedf71f948 * services: upower: Default to a percentage-based policy.
> 4765242540 * services: upower: Update default percentage values.
>
> I’m not sure whether they help, but they might: using a
> time-estimate-based policy is documented
On 05-09-2022 14:56, Ludovic Courtès wrote:
I’d like to test whether UPower invokes the intended critical action,
but I’m not sure how to simulate a low battery level. Thoughts?
I've found a 'Virtual Battery Driver': https://lwn.net/Articles/440097/
The gmane links are dead, but the linux so
Hi,
Ludovic Courtès skribis:
> One issue remains: UPower should have called elogind’s “PowerOff” method
> for ordered shutdown before total power outage, but either that didn’t
> happen or elogind didn’t do it right (which is weird, because ‘loginctl
> poweroff’ DTRT.)
I pushed these patches:
Ludovic Courtès skribis:
> Setting ‘hybrid-sleep-state’ to '("mem") doesn’t help though:
> “CanHybridSleep” still returns “na”. I’m looking at ‘can_sleep_state’
> in elogind without seeing why it doesn’t return true.
Having changed elogind’s “LogLevel” to “debug” with a 1km-long
‘dbus-send’ com
Ludovic Courtès skribis:
> Looking at the code, it could be because the ‘CanHybridSleep’ method
> returns false, but why that would happen is unknown to me.
Indeed, if we run ‘dbus-monitor --system’ and
‘herd restart upower-daemon’ (in QEMU), we see this:
--8<---cut here
Ludovic Courtès skribis:
> As discussed on IRC with Tobias, UPower appears to ignore our
> ‘critical-power-action’ setting. On my machine, I left the default
> (‘HybridSleep’) but upowerd dismisses it and chooses ‘PowerOff’:
Furthermore, powering off is actually ungraceful: ‘halt’ wasn’t invoke
As discussed on IRC with Tobias, UPower appears to ignore our
‘critical-power-action’ setting. On my machine, I left the default
(‘HybridSleep’) but upowerd dismisses it and chooses ‘PowerOff’:
--8<---cut here---start->8---
$ guix system describe
Generation 198