8

My laptop is Thinkpad E420 with Ubuntu 12.04 64-bit installed, the kernel version is 3.2.0-33-generic. I have set the battery threshold as 60% via windows7. It seems that the threshold auto effected in Ubuntu. However, there are some problems of the battery indicator's state.

I'll list some information of the battery state as following: (Note that in terminal ubuntu says that battery charging state is charged, while the power setting panel shows that the battery state is charging as well as the battery indicator shows.)


$ cat /proc/acpi/battery/BAT0/state 
present:                 yes
capacity state:          ok
*charging state:          charged*
present rate:            0 mW
remaining capacity:      18200 mWh
present voltage:         16103 mV

battery indicator state

enter image description here


Power Setting Panel

enter image description here

Is there any way to fix the problem?

Edit Add some result via **sudo fwts battery - > battery.log **

3 passed, 4 failed, 0 warnings, 0 aborted, 0 skipped, 0 info only.

Test Failure Summary
===============================

Critical failures: NONE

High failures: 2
 battery: Did not detect any ACPI battery events.
 battery: Could not detect ACPI events for battery BAT0.

Medium failures: 1
 battery: Battery BAT0 claims it's charging but no charge is added

Low failures: 1
 battery: System firmware may not support cycle count interface or it reports it incorrectly for battery BAT0.

Other failures: NONE

Test           |Pass |Fail |Abort|Warn |Skip |Info |
---------------+-----+-----+-----+-----+-----+-----+
battery        |    3|    4|     |     |     |     |
---------------+-----+-----+-----+-----+-----+-----+
Total:         |    3|    4|    0|    0|    0|    0|
---------------+-----+-----+-----+-----+-----+-----+

Edit2 According to @Colin Ian King's suggestion, I have run following script.

$ cat /sys/class/power_supply/BAT0/uevent
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14400000
POWER_SUPPLY_VOLTAGE_NOW=16075000
POWER_SUPPLY_POWER_NOW=0
POWER_SUPPLY_ENERGY_FULL_DESIGN=31680000
POWER_SUPPLY_ENERGY_FULL=22050000
POWER_SUPPLY_ENERGY_NOW=17860000
POWER_SUPPLY_MODEL_NAME=LNV-42T4763
POWER_SUPPLY_MANUFACTURER=SANYO
POWER_SUPPLY_SERIAL_NUMBER= 2614

I have taken two photos of the bios in case I have missed something.

enter image description here

enter image description here


The output of acpi -V

future$ acpi -V
Battery 0: Unknown, 89%
Battery 0: design capacity 1947 mAh, last full capacity 1339 mAh = 68%
Adapter 0: on-line
Thermal 0: ok, 31.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 120.0 degrees C
Cooling 0: LCD 3 of 15
Cooling 1: LCD 3 of 15
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10
Cooling 4: Processor 0 of 10
Cooling 5: Processor 0 of 10

Any help would be appreciated!

2 Answers 2

3

Can you run the following command and put the output into your question:

cat /sys/class/power_supply/BAT0/uevent

This should contain info such as the POWER_SUPPLY_ENERGY_FULL_DESIGN, POWER_SUPPLY_ENERGY_FULL and POWER_SUPPLY_ENERGY_NOW which will give us a more informed answer to your issue.

[Updated]

So your machine is reporting:

POWER_SUPPLY_ENERGY_FULL_DESIGN=31680000

POWER_SUPPLY_ENERGY_FULL=22050000

..these two fields are static data from the ACPI _BIX control. The first is the design capacity of the battery, the second is the predicted battery capacity when fully charged.

POWER_SUPPLY_ENERGY_NOW=17860000

..and this is from the ACPI _BST control, showing you the current battery charge. This is dynamic and will change.

This data is typically read from the Embedded Controller that talks to the smart battery usually over the i2c bus. This data is presented to the kernel via the APCI controls so this data is basically what the kernel is given, it has no control over this data but to present it directly to user space applications.

These current values show that the battery when last fully charged got to 69.6% of full battery design capacity. Also your current capacity is about 80% of the full charge capacity and 56.3% of the theoretical design capacity of the battery.

My guess is that the user space apps are showing you the battery capacity in percentage terms of the full charge capacity. Maybe windows is showing you the figures in terms of the battery design capacity. Just a guess.

1
  • Thanks for your suggestion, I have edited the question to add the information.
    – Eastsun
    Nov 19, 2012 at 9:59
2
+100

Here are no problem it seems.
Soon, power consumption counted by Windows do not point actual state, because Windows is hungry and forced "to be a bit wrong" to user. It's my very subjective opinion.

Hovewer, it is very relativistic question due to very relative nature of an ACTUAL STATE term.

A very many ways exist to explain why for Windows 60% is actual but EQUAL for actuals Ubuntu 82%'s. Most simple is about differences between Windows and Ubuntu paradigms.

update 1

Try to test your environment with fwts :

sudo add-apt-repository ppa:firmware-testing-team/ppa-fwts-stable
sudo apt-get update
sudo apt-get install fwts

Read: wiki.ubuntu.com/Kernel/Reference/fwts

update 2

Thus battery.log shows that power ACPI interface disabled.
It means you have first solution for your problem by enabling power interface in BIOS.
Or if this behavior initiated by boot-parameter you need to find correct value.

update 3

Obviously booting parametrization have weight here.
New readings based on updates: UEFIBooting

Most actual parameters (WARNING! Use only correct parameters referred to your config) :

 acpi
 noefi
 acpi_osi
 apm  

Kernel boot parameters Documentation

update 4

Also you can try to test output parameters with acpi program:

sudo apt-get install acpi
acpi -V

Finally all my web surf point to: ThinkPad ACPI Extras Driver

And: Lenovo Diagnostics (Linux Bootable CD).

14
  • Hi, @swift, my question is not of the percentage of battery, but of the battery state. In the terminal, ubuntu says that the battery state is charged, while in the power setting panel, it shows that the battery is charging as well as the indicator shows.
    – Eastsun
    Nov 18, 2012 at 15:12
  • Perhaps your OS installation has disabled ACPI feature. Read: Battery
    – swift
    Nov 18, 2012 at 16:09
  • 1
    Thanks swift. I have done following your suggestion and got some information.
    – Eastsun
    Nov 19, 2012 at 4:55
  • Solving both high failures can resolve the trouble. If ACPI disabled by BIOS just enable it. Or if it boot-parameter need to find more correct value.
    – swift
    Nov 19, 2012 at 8:48
  • Else, medium failure shows that charging state can be read without solving of high failures, but need solve it because other solution have point at installation of additional software.
    – swift
    Nov 19, 2012 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .