[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#891610: consider using on_ac_power over systemd's handling



Marco d'Itri wrote:
> Please stop suggesting powermgmt-base: this is an obsolete, orphaned and 
> unmantained package which I last NMU'ed myself in 2014.
> It provides the on_ac_power command which is only used on non-systemd 
> systems anyway.

I've adopted powermgmt-base and fixed some issues, with more work left to
do, but even the old version was strictly better than what systemd does.

And, it turns out, the differences are not just truly ancient machines
(Powerbooks and previous millenium's i386), but also modern tablets and
phones.  On any of those that are charged via USB (that identifies as USB)
but the SoC could possibly support a non-smart connector ("ac"), even if
it's not physically wired on the machine, ConditionACPower will always think
you're on battery.

This particular problem can be fixed in systemd (simplified results of my
research so far: )
https://salsa.debian.org/debian/powermgmt-base/raw/master/power_supply.txt
as it's a straightforward extension of existing sysfs-reading code, but
looking at other scenarios that we'd also want fixed (whenever me or someone
more competent learns how), that becomes way more complex than anyone would
reasonably put into a low-level tool running as PID 1.

Thus, I'd suggest preferring on_ac_power even on systemd.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ A dumb species has no way to open a tuna can.
⢿⡄⠘⠷⠚⠋⠀ A smart species invents a can opener.
⠈⠳⣄⠀⠀⠀⠀ A master species delegates.


Reply to: