Mailinglist Archive: opensuse-bugs (3723 mails)

< Previous Next >
[Bug 753327] gnome-power-manager is always reporting "battery critically low" on AC disconnect

Joey Lee <jlee@xxxxxxxx> changed:

What |Removed |Added
InfoProvider|pghben@xxxxxxxxx |

--- Comment #12 from Joey Lee <jlee@xxxxxxxx> 2012-04-27 05:00:44 UTC ---
Yes, just discussed with Gary, I check the acpi/battery.c and ACPI spec.
Confirm current power_now/current_now interface's output unit is microwatt

In spec:

Returns the current battery status (in other words, dynamic information about
the battery, such as whether the battery is currently charging or discharging,
an estimate of the remaining battery capacity, and so on).

Package {
Battery State // Integer (DWORD)
Battery Present Rate // Integer (DWORD)
Battery Remaining Capacity // Integer (DWORD)
Battery Present Voltage // Integer (DWORD)

Battery Present Rate
Returns the power or current being supplied or accepted through the battery’s
terminals (direction depends on the Battery State value). The Battery Present
Rate value is expressed as power [mWh] or current [mAh] depending on the Power
Unit value.
Batteries that are rechargeable and are in the discharging state are required
to return a valid Battery Present Rate value.
0x00000000 – 0x7FFFFFFF in [mW] or [mA] 0xFFFFFFFF – Unknown rate

In acpi driver:

vi drivers/acpi/battery.c

static int acpi_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
ret = -ENODEV;
val->intval = battery->rate_now * 1000; /* mW / 1000
is μW */

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >