boinc
boinc copied to clipboard
combine power saving settings of Android
Request from Raistmer on BOINC dev.
There currently is a discrepancy of available preference settings between Android and non-Android in regard to power management. There are some pros and cons to this and reasons why it was implemented this way. See the discussion in the forum.
the gist is that it would be nice to have the same preferences on all platforms (because non-Android devices also have batteries). A possible structure could look like this:
- Suspend when computer is on battery (yes/no)
- Suspend computation if battery level is below (value)
- Suspend computation above battery temperature of (value)
- Start computation again if battery level is above (value)
- Start computation again if battery temperature is below (value)
If the first one is set to yes it would override every other setting. If it is set to no the other settings would be in effect. Therefore a better naming seems appropriate (always, thresholds).
The other settings control the hysteresis behavior we need on Android and can be configured to other behaviors. This would solve the currently hardcoded limit on battery power on Android. They should be clearly marked "Advanced" settings and maybe hidden away for non-expert users as wrong settings may damage the device.
API availability on non-Android OS: Windows: SYSTEM_POWER_STATUS structure (BatteryLifePercent member)
Linux: newer kernels provide this info in /sys/class/power_supply/ see: How to check battery status using terminal?
MacOS: Using the ioreg
tool (need to check if this is part of a default installation). See: How to get the battery life of mac os x macbooks programatically?