Bug 587112
Summary: | thinks the battery is fuller than it is | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bill Nottingham <notting> |
Component: | upower | Assignee: | Richard Hughes <richard> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 13 | CC: | kmcmartin, rhughes, richard, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | upower-0.9.4-1.fc13 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-05-19 19:07:46 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Bill Nottingham
2010-04-28 23:17:43 UTC
Can you please get the output of "cat /sys/class/power_supply/BAT0/*" and "upower -d" again please. UPower doesn't look in /proc, although it _should_ be the same data. Also, what hardware is this on? Thanks. Oddly, it's better now: [notting@nostromo: ~]$ upower -d Device: /org/freedesktop/UPower/devices/line_power_AC native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/ACPI0003:00/power_supply/AC power supply: yes updated: Thu Apr 29 09:22:21 2010 (3249 seconds ago) has history: no has statistics: no line-power online: no Device: /org/freedesktop/UPower/devices/battery_BAT0 native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 vendor: SANYO model: 42T4694 serial: 536 power supply: yes updated: Thu Apr 29 10:16:27 2010 (3 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging energy: 848.928 Wh energy-empty: 0 Wh energy-full: 1027.53 Wh energy-full-design: 103.496 Wh energy-rate: 165.246 W voltage: 12.213 V time to empty: 5.1 hours percentage: 82.6186% capacity: 99.453% technology: lithium-ion History (charge): 1272550587 82.619 discharging 1272550557 82.759 discharging 1272550527 82.889 discharging 1272550497 83.061 discharging History (rate): 1272550587 165.246 discharging 1272550557 158.552 discharging 1272550527 210.656 discharging 1272550497 163.714 discharging Daemon: daemon-version: 0.9.2 can-suspend: yes can-hibernate no on-battery: yes on-low-battery: no lid-is-closed: no lid-is-present: yes $ cat /sys/class/power_supply/BAT0/* 463000 92730000 93240000 76400000 14427000 cat: /sys/class/power_supply/BAT0/device: Is a directory SANYO 42T4694 cat: /sys/class/power_supply/BAT0/power: Is a directory 1 536 Discharging cat: /sys/class/power_supply/BAT0/subsystem: Is a directory Li-ion Battery POWER_SUPPLY_NAME=BAT0 POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11100000 POWER_SUPPLY_VOLTAGE_NOW=12216000 POWER_SUPPLY_CURRENT_NOW=14427000 POWER_SUPPLY_CHARGE_FULL_DESIGN=93240000 POWER_SUPPLY_CHARGE_FULL=92730000 POWER_SUPPLY_CHARGE_NOW=76400000 POWER_SUPPLY_MODEL_NAME=42T4694 POWER_SUPPLY_MANUFACTURER=SANYO POWER_SUPPLY_SERIAL_NUMBER= 536 11100000 12216000 Note that the 'energy full' changed (fairly drastically), which I'm guessing would throw off the calculations. Lenovo X201s is the hardware. And now, I've got another (apparent) disagreement: [notting@nostromo: ~]$ cat /proc/acpi/battery/BAT0/* alarm: 463 mAh present: yes design capacity: 9324 mAh last full capacity: 9257 mAh battery technology: rechargeable design voltage: 11100 mV design capacity warning: 462 mAh design capacity low: 18 mAh capacity granularity 1: 1 mAh capacity granularity 2: 1 mAh model number: 42T4694 serial number: 536 battery type: LION OEM info: SANYO present: yes capacity state: ok charging state: charging present rate: 2847 mA remaining capacity: 7588 mAh present voltage: 12650 mV [notting@nostromo: ~]$ cat /sys/class/power_supply/BAT0/* 463000 9257000 9324000 7623000 3053000 cat: /sys/class/power_supply/BAT0/device: Is a directory SANYO 42T4694 cat: /sys/class/power_supply/BAT0/power: Is a directory 1 536 Charging cat: /sys/class/power_supply/BAT0/subsystem: Is a directory Li-ion Battery POWER_SUPPLY_NAME=BAT0 POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11100000 POWER_SUPPLY_VOLTAGE_NOW=12673000 POWER_SUPPLY_CURRENT_NOW=3053000 POWER_SUPPLY_CHARGE_FULL_DESIGN=9324000 POWER_SUPPLY_CHARGE_FULL=9257000 POWER_SUPPLY_CHARGE_NOW=7623000 POWER_SUPPLY_MODEL_NAME=42T4694 POWER_SUPPLY_MANUFACTURER=SANYO POWER_SUPPLY_SERIAL_NUMBER= 536 11100000 12673000 [notting@nostromo: ~]$ upower -d Device: /org/freedesktop/UPower/devices/line_power_AC native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/ACPI0003:00/power_supply/AC power supply: yes updated: Thu Apr 29 10:48:12 2010 (10825 seconds ago) has history: no has statistics: no line-power online: yes Device: /org/freedesktop/UPower/devices/battery_BAT0 native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 vendor: SANYO model: 42T4694 serial: 536 power supply: yes updated: Thu Apr 29 13:48:33 2010 (4 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: charging energy: 84.6597 Wh energy-empty: 0 Wh energy-full: 1027.53 Wh energy-full-design: 103.496 Wh energy-rate: 34.0437 W voltage: 12.69 V percentage: 8.23917% capacity: 99.453% technology: lithium-ion History (charge): 1272563313 8.239 charging 1272563283 8.204 charging 1272563253 8.173 charging 1272563223 8.138 charging History (rate): 1272563313 34.044 charging 1272563283 32.678 charging 1272563253 33.766 charging 1272563223 32.689 charging Daemon: daemon-version: 0.9.2 can-suspend: yes can-hibernate no on-battery: no on-low-battery: no lid-is-closed: no lid-is-present: yes g-p-m says the battery is 8% full. I suspect it's way more full than that. (And no, I have no idea why the /proc interface switched from mWh to mAh.) It's not just that, charge_* moved to energy_* in sysfs as well. Looks like an EC bug... :/ http://kyle.fedorapeople.org/upower-cache-units.diff This patch attempts to cache whether we based our cached full values on energy or charge and invalidates them if the path changed to kludge around Lenovo stupidity. Kyle -- does this patch fix things for you? Bill, could you give this a go too please. Thanks. Yeah, the units stay sensible after a resume (I left the battery to go down to ~60% and confirmed that the rate/charge were the same) and then after a reboot that the calculated values stayed the same. commit 5881e7435f140b857ddb979525aa74a5dbf78d20 Author: Kyle McMartin <kmcmartin> Date: Tue May 11 15:53:36 2010 +0100 Detect when the kernel changes the reported charge units. Fixes rh#587112 Signed-off-by: Richard Hughes <richard> I'll do a new upstream release tomorrow and push to updates. Thanks! Ugh, I spoke too soon, looks like there's still an issue with it. I'm off by a factor of ten now somehow (9.9% instead of 99%) but the capacity remaining seems correct. I'll debug this further this afternoon. Wait, and after another resume, the units are fine again (still the opposite to first boot though.) Really confusing. upower-0.9.4-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/upower-0.9.4-1.fc13 upower-0.9.4-1.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update upower'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/upower-0.9.4-1.fc13 upower-0.9.4-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |