I have a vision: Extend Battery Runtime by suspending, delaying, or reducing some functions when the battery is not fully charged (or when AC power not connected).
Wether the trigger should be AC absence, or less than 100% charge I guess depends on if your power adapter and power port are strong enough to charge at full speed while also under full load. That might require actual measurements on each laptop to know. And it might vary depending on which power supply you're using. I know I have had some in the past that could run the laptop, and charge it if I suspended/shutdown, but not charge it at the same time.
There are some core system functions that are just not that important they need to use up my battery:
Software updates. indexing filesystem contents for search. Log rotation. btrfs/zfs rebalances/garbage collection.
There are also some things I want to do, I tell the computer to do, which I do want done, but could gladly wait until I'm on AC:
Video encoding/rendering. Backups, Large Downloads, running VMs, execution of javascript and pages in non-focused browser tabs, perhaps any execution of any GUI application that is not visible on the screen?
I've already started to manage some of this with a cronjob that enables or disables systemd services, and I made a "WaitForAC" script that does that so from a shell can run "WaitForAC; bin/bigheavyprogram"
PowerTop can probably help identify where the power is going. And then for the top 10, 25, 50% of power use, I'd like to think about what it is, and make a decision if it should be limited on battery.
cgroups have been suggested as one way to do this. As has systemd, and acpid. My script currently polls upower -i /org/freedesktop/UPower/devices/line_power_ADP1 every 5 seconds. But honestly, any recurring polling is part of the problem.
Is there already a software project that tries to solve this?
Wether the trigger should be AC absence, or less than 100% charge I guess depends on if your power adapter and power port are strong enough to charge at full speed while also under full load. That might require actual measurements on each laptop to know. And it might vary depending on which power supply you're using. I know I have had some in the past that could run the laptop, and charge it if I suspended/shutdown, but not charge it at the same time.
There are some core system functions that are just not that important they need to use up my battery:
Software updates. indexing filesystem contents for search. Log rotation. btrfs/zfs rebalances/garbage collection.
There are also some things I want to do, I tell the computer to do, which I do want done, but could gladly wait until I'm on AC:
Video encoding/rendering. Backups, Large Downloads, running VMs, execution of javascript and pages in non-focused browser tabs, perhaps any execution of any GUI application that is not visible on the screen?
I've already started to manage some of this with a cronjob that enables or disables systemd services, and I made a "WaitForAC" script that does that so from a shell can run "WaitForAC; bin/bigheavyprogram"
PowerTop can probably help identify where the power is going. And then for the top 10, 25, 50% of power use, I'd like to think about what it is, and make a decision if it should be limited on battery.
cgroups have been suggested as one way to do this. As has systemd, and acpid. My script currently polls upower -i /org/freedesktop/UPower/devices/line_power_ADP1 every 5 seconds. But honestly, any recurring polling is part of the problem.
Is there already a software project that tries to solve this?