This seems something that could be integrated into ~noneofyourbusiness 's new low battery daemon? https://lists.sr.ht/~mil/sxmo-devel/patches/23345
~proycon outgoing@sr.ht wrote:
This seems something that could be integrated into ~noneofyourbusiness 's new low battery daemon? https://lists.sr.ht/~mil/sxmo- devel/patches/23345
Yes I didnt tried this version atm
Interesting - but sounds like it's more or less doing what cron+rtcwake is planned to do
while sxmo did eventually switch to
upower
, it is important to note thatupower
does not actually handle the shutdown on low power itself, but simply places a shutdown request tologind
[1]This means automatic shutdown on low power is not working under
sxmo
since it is notlogind
compliant. Assuming this is not planned to be changed in the foreseeable future, maybesxmo
should at least be on the lookout forupower
'saction
state/signal, then initiate the shutdown action manually
copy this: https://codeberg.org/magdesign/sxmop6/src/branch/main/hooks/sxmo_hook_battery.sh to
~/.config/sxmo/hooks/sxmo_hook_battery.sh
it will grep the values from UPower.conf file and handles the warnings and shutdown.... i tried for several hours (pmos edge, sway, op6) and it does the job. feel free to test and merge.be aware that:
- calling
sxmo_power.sh poweroff
will not turn off the device (dont know why it hangs)- power reporting of UPower might leave out values and jump e.g. from 5% to 2%