[upower PATCH 2/2] remove the UP_DEVICE_SUPPLY_CHARGED_THRESHOLD heuristic

2010-10-21 Thread Michal Schmidt
When a full battery starts to discharge, but reports its status as 'Unknown', it takes a few minutes before g-p-m notices any change. upowerd guesses the battery is fully charged as long as it has over 90% charge. I see no reason to delay the reporting of discharging of the battery. Let's remove t

[upower PATCH 1/2] simplify 'on-battery' detection to avoid depending on unreliable battery state

2010-10-21 Thread Michal Schmidt
When calculating the global 'on-battery' state upowerd queries the state of AC supplies as well as the state of all batteries. On my Fujitsu Esprimo Mobile M9400 laptop the AC information is always correct, but the battery is not giving useful status (from looking at ACPI DSDT, I concluded that it