Summary: | [acpi] ACPI battery time incorrect | ||
---|---|---|---|
Product: | Base System | Reporter: | jb.1234abcd |
Component: | kern | Assignee: | freebsd-acpi (Nobody) <acpi> |
Status: | Closed Not A Bug | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
jb.1234abcd
2012-11-06 06:50:00 UTC
$ sysctl -d hw.acpi.battery.time hw.acpi.battery.time: remaining time in minutes Why is it impossible or improper to compute and show battery's remaining time ? Because the machine is on on-line power supply ? The battery's state, that is, its remaining time, is still valid and of interest to user at any machine state (load, etc), regardless of power supply being on-line or off-line. I want to know WHAT IF, at any time (without or with consideration of current machine state (load, etc) in the computation of battery remaining time), I disconnected the on-line power supply, could I expect to happen to my machine with regard to expected length-of-time availability of battery power supply. If you think that the battery's "percent capacity remaining" is enough, then you are mistaken. hw.acpi.battery.life: percent capacity remaining The battery's "percent capacity remaining" is misleading because its max level is degrading over time (the 100% of a new battery is not the same 100% after a year or so of random discharging and charging). They just do not tell me how much estimated run time I would have as I explained above. This is what Linux shows about my battery state: $ cat /proc/acpi/battery/BAT0/info present: yes design capacity: 56160 mWh last full capacity: 38720 mWh battery technology: rechargeable design voltage: 10800 mV design capacity warning: 1936 mWh design capacity low: 200 mWh capacity granularity 1: 1 mWh capacity granularity 2: 1 mWh model number: COMPATIBLE serial number: 2413 battery type: LION OEM info: BATSZ $ cat /proc/acpi/battery/BAT0/state present: yes capacity state: ok charging state: charged present rate: 0 mW remaining capacity: 38720 mWh present voltage: 12405 mV These are the original and degraded capacity values of 100% I am talking about: ... design capacity: 56160 mWh last full capacity: 38720 mWh ... remaining capacity: 38720 mWh ... So, please compute this hw.acpi.battery.time: remaining time in minutes and make it available at any time, and at any state of the machine. There is a good use for this data. Responsible Changed From-To: freebsd-bugs->freebsd-acpi Over to maintainer(s). Im most systems, ACPI does not return the battery lifetime when on AC power. The actual remaining time is calculated by the EC BIOS and is calculated mostly be taking the discharge rate in mW and the current capacity in mWh. As far as I know, no OS attempts to calculate the time. It is simply read from the the EC via ACPI. When plugged in to AC, the discharge rate is 0, making the calculation undefined (division by zero). Even the remaining battery time reported by ACPI is, at best, a very rough guess as discharge rate can vary dramatically depending on system load. On FreeBSD you can see detailed information on batteries with the acpiconf(8) command. "acpiconf -i N" where 'N' is the battery number; 0 if only one battery is present. My system on battery: esign capacity: 50540 mWh Last full capacity: 46660 mWh Technology: secondary (rechargeable) Design voltage: 10800 mV Capacity (warn): 2333 mWh Capacity (low): 200 mWh Low/warn granularity: 1 mWh Warn/full granularity: 1 mWh Model number: 42T4795 Serial number: 2654 Type: LION OEM info: SONY State: discharging Remaining capacity: 96% Remaining time: 2:12 Present rate: 20460 mW Present voltage: 11652 mV And after plugging in to AC: Design capacity: 50540 mWh Last full capacity: 46660 mWh Technology: secondary (rechargeable) Design voltage: 10800 mV Capacity (warn): 2333 mWh Capacity (low): 200 mWh Low/warn granularity: 1 mWh Warn/full granularity: 1 mWh Model number: 42T4795 Serial number: 2654 Type: LION OEM info: SONY State: high Remaining capacity: 96% Remaining time: unknown Present rate: 0 mW Present voltage: 11648 mV Looking at the raw sysctl when on battery shows hw.acpi.battery.time: -1. This is normal. I don't see that ACPI -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com |