XO Troubleshooting Battery: Difference between revisions
No edit summary |
|||
(98 intermediate revisions by 32 users not shown) | |||
Line 1: | Line 1: | ||
{{OLPC}} |
{{OLPC}}{{Translations}} |
||
This is the portion of the [[XO Troubleshooting Guide|XO Troubleshooting Guide]] for diagnosing problems with the battery and power on an [[Hardware|XO laptop]]. |
|||
= Introduction = |
|||
[[image:Keyboardstep2a.jpg|thumb|The battery connector in the bottom part of the laptop]] |
|||
=Start Here= |
|||
What problem are you experiencing with your laptop ? |
|||
This is the portion of the [[XO Troubleshooting Guide|XO Troubleshooting Guide]] for diagnosing problems with the battery on an [[Hardware_specification#Laptop_Hardware|XO laptop]]. The Help activity also has a chapter "Charging the Battery." |
|||
==The laptop won't run using the battery== |
|||
If the laptop functions fine using a known good test battery, the battery should be replaced. |
|||
This page details <em>only</em> problems that actually reside within the battery. Note that if you are having problems running an XO from battery power, or having problems charging a battery, such problems could be the fault of the laptop (the battery itself may be fine). Problems that are localised to the laptop itself are discussed at [[XO Troubleshooting Power]]. |
|||
If the laptop doesn't function from a known good test battery, see [[#Diagnosing_Battery_Problems|Diagnosing Battery Problems]]. |
|||
How can you tell whether a particular problem is due to a faulty battery or faulty laptop? This is easiest when you have two XOs. Let's say you have laptop A including battery A, which is exhibiting a problem. You also have laptop B with laptop B, which is your personal XO which you trust to be functioning well. Take battery A and place it in laptop B, and take battery B and put it in laptop A. Testing both laptops will then give you a strong indication as to where the problem resides. Does the problem "follow" battery A into laptop B? If so, the problem resides within the battery (you're on the right page). Or does the problem remain within laptop A even when running from battery B? In such case, the problem resides within the laptop (see [[XO Troubleshooting Power]]). |
|||
==The battery light is flashing red== |
|||
If the battery light is flashing red, this usually indicates an error with the battery. Try a [[XO_Full_Reset|full reset]]. If the problem persists, then the battery should be replaced. |
|||
If you only have one XO available to you, it is suggested that you have a quick read of both this page and [[XO Troubleshooting Power]]. You should be able to make an educated guess as to which page is the most appropriate for your problem. If in doubt, follow the diagnostics outlined on both pages. |
|||
If the replacement battery shows the same flashing red battery charge light, see [[#Common Causes for lack of battery presence|common causes for lack of battery presence]], below. |
|||
= Start here = |
|||
It is possible to obtain more information about the battery, and possibly repair it. See [[#Battery LED is flashing red|below]]. |
|||
<b>First, take a quick look at the battery, especially the black connector which contains the contacts that electrically connect the battery to the laptop.</b> Dried green crystals have been spotted around the connector on non-functional batteries on some occasions. This is from decomposition of the contact metal due to electrolysis in water. This may be cleaned with baking soda mixed with water, using a toothbrush. Wash your hands well afterwards. This may recover the battery, unless the contacts have become badly corroded. |
|||
==The laptop can't charge the battery== |
|||
If the laptop can charge a known good test battery, the battery should be replaced. |
|||
<b>Perform an [[XO Full Reset]].</b> If you know the problem is localised within a battery, this is unlikely to make any difference. Nevertheless, lets do it now to be sure. |
|||
If the laptop can't charge the known good test battery, see [[#Diagnosing_Battery_Problems|Diagnosing Battery Problems]]. |
|||
<b>Disconnect the battery, and connect the laptop to AC power</b>. Now turn on the laptop. After the system has loaded, insert the battery. |
|||
==The laptop won't run using the power adapter== |
|||
If the laptop runs fine using a known good power adapter, the power adapter should be replaced. |
|||
<b>Does the battery LED start flashing red?</b> If so, jump to [[#Battery LED is flashing red]]. |
|||
If the laptop can't run from a known good power source: |
|||
* Does the battery charge LED still indicate the laptop thinks it has power ? |
|||
* Otherwise, the motherboard need repair: |
|||
** Check the fuse (F1) and diode (D21) on the motherboard protecting the DC input |
|||
** If the fuse was blown, check diode D123 and 38V zener diode D118 to see if they are OK. |
|||
<b>Does the battery LED start flashing yellow?</b> If so, see [[#Battery LED is flashing yellow]]. |
|||
==The laptop emits a high pitched whine when using the power adapter== |
|||
: <em>For more information on the battery LED, see [http://wiki.laptop.org/go/Power_management#Battery_LED].</em> |
|||
''Working on this one'' |
|||
<b>Is there no apparent response in the battery LED?</b> See [[#Battery detection diagnostics]] |
|||
=Diagnosing Battery Problems= |
|||
Charging of the battery, and interpretation of the front panel buttons, is under the control of a separate microprocessor in the laptop, the Embedded Controller (EC). In order to ensure that battery communications are being properly handled, we must first establish that the EC is operating correctly: |
|||
Now fully charge the battery, and wait for the battery LED to go green. Now disconnect AC power and discharge the battery while the system is running, keeping an eye on the percentage charge. |
|||
==Did the EC boot?== |
|||
Follow the [[XO_Full_Reset|Full Reset procedure]], and check to see if the battery LED flashes orange momentarily after reapplying power. |
|||
<b>Does the system shut down abruptly with over 10% of charge remaining?</b> If so, see [[#Laptop shuts down abruptly with significant charge remaining]]. |
|||
If it didn't flash at all, you probably have a broken motherboard. |
|||
If it flashed another color (red or green), then you probably have a problem with the LED driver circuitry. |
|||
Now, starting with the battery completely discharged, perform a [[#Capacity test]] of the battery. |
|||
==Does the EC recognize the battery?== |
|||
When a battery is inserted into the laptop, the EC reads information about that battery from a integrated circuit inside the battery. If the EC does not receive valid information from this read, it will either assume that a battery does not exist, or report an error. The following tests tell if the EC is talking the battery correctly. |
|||
<b>Is the battery capacity significantly lower than that of the rated specification?</b> If so, see [[#Battery capacity is significantly degraded]]. |
|||
===Does the battery light respond to changes in external power?=== |
|||
When you apply external power, the battery led should light up in one of four states: |
|||
* solid '''green''' - indicates a fully charged battery |
|||
* solid '''yellow''' - indicates a battery being charged |
|||
* solid '''red''' - indicates a battery in dire need of charging |
|||
* '''flashing red''' - indicates a battery error. See [[#The battery light is flashing red|above]] and a detailed explanation [[#Battery LED is flashing red|below]]. |
|||
= Battery LED is flashing red = |
|||
If the battery light does not indicate one of these states (e.g. nothing lights up) then the battery is not being recognized. If you get a solid battery light then the EC has successfully read the battery gauge. |
|||
If the battery light stays unlit then either the battery is not recognized or the data read has confused the EC. Use one of the following methods to manually check for battery presence to determine the problem. |
|||
Lets start with the case that has the most solid diagnosis available: you have the laptop running with the battery inserted, and the laptop is also connected to AC power. The laptop seems to run fine with AC power connected, but the battery LED is flashing red (to be clear: the battery LED briefly is illuminated briefly as red, and then turns off, and this cycle repeats), and the laptop may not be able to be run from battery power alone. |
|||
===Checking for battery presence=== |
|||
The following methods may be used to manually check for battery presence. |
|||
This flashing-red pattern means that the Embedded Controller (EC) has detected a problem with the battery. |
|||
====Using Linux==== |
|||
Linux has an interface to the laptop's battery subsystem. Its available via sysfs at <tt>/sys/class/power_supply/olpc_battery/</tt>. The value of 'present' indicates if the EC thinks a battery exists. To check this value use the 'cat' command in the terminal app or at a vtty: |
|||
You must check the label on the battery. There are two types of battery: |
|||
cat /sys/class/power_supply/olpc_battery/present |
|||
* OLPC CL1, lithium ferrophosphate, for XO-1, XO-1.5, XO-1.75 and XO-4, |
|||
* OLPC CL4, lithium polymer. for XO-4 only. |
|||
The OLPC CL4 battery will cause flashing red in an XO-1, XO-1.5, or XO-1.75, and this is normal. Do not use batman. Instead, replace the battery with an OLPC CL1 model. |
|||
====Using OpenFirmware==== |
|||
You will need a [[Activation_and_Developer_Keys|developer key]] for the laptop. [[Open Firmware]] has command that will talk to the EC and read the current battery info. This command is <tt>watch-battery</tt>. At the Open Firmware command prompt do: |
|||
When the battery is the correct one for the laptop, we can ask the EC for the error code. From the [[Ok]] prompt: |
|||
ok ec-abnormal@ . |
|||
'''Note''' the '.' at the end. An error code will be returned. |
|||
Now run: |
|||
ok watch-battery |
ok watch-battery |
||
And hit escape. An error message will be printed. This message is a human-readable interpretation of the error code. |
|||
If EC thinks a battery exists you should see a single line that gets updated with various pieces of battery information. If a battery does not exist then that will be indicated with a 'No battery' rather than battery status info. |
|||
Now identify the section below that corresponds to the error code/error message and follow the instructions for potential solutions. |
|||
====Using OpenFirmware and batman.fth==== |
|||
You will need a [[Activation_and_Developer_Keys|developer key]] for the laptop. Batman.fth has comands that can interrogate the state machine of the EC's 1-wire interface. This allows you to see what's happening on the 1-wire bus. The command for this is <tt>see-bstate</tt>. If a battery is not detected the numbers printed will cycle between 0,1 and 2. Numbers other than that indicate the EC has detected a battery. |
|||
==Wrong Pack setting (code 02) == |
|||
==Common Causes for lack of battery presence== |
|||
There are a number of possible causes for lack of battery presence. Here they are, in the order in which they should be checked. |
|||
This error indicates battery EEPROM corruption. Using [[#Batman]], use bat-dump-banks to examine the content of the EEPROM. Please send this information to OLPC techsupport or the developers list. |
|||
===Unplugged cable=== |
|||
[[image:Keyboardstep2a.jpg|thumb|The battery connector in the bottom part of the laptop]] |
|||
Check to see that connectors CN21 and CN22 on the motherboard are firmly plugged in. There is a second connector, hidden in the bottom part of the laptop. |
|||
== LiFePo4 Overtemp (code 0b) == |
|||
===Broken Wire=== |
|||
If no batteries are detected, a break or bad connection between CN22 on the motherboard and the data pin on the battery connector results in no 1-wire communication (seen as this problem). Check continuity of the cable with an ohm meter. |
|||
The battery got too hot. Turn off the system remove the battery and let things cool. |
|||
''add pictures'' |
|||
== |
== Bank 1 Invalid == |
||
Normally if the data in the EEPROM has been corrupted a flashing red LED error will result. However, depending on the corruption it may be possible to confuse the EC. Use a known good battery to ensure that the problem is with the battery and not the laptop. |
|||
This message can be produced when the memory in the gas gauge has become corrupted, causing the battery identification data to be lost. <b>This fix should only be attempted on batteries that are labelled as ''Made by BYD Company Limited'' on the label printed on the internal-facing side of the battery.</b> |
|||
A battery in this condition can be detected by watching the output of <tt>see-bstate</tt>. |
|||
This problem can be fixed with batman. [[#batman.fth|Load batman, according to the instructions on this page]], then attempt to fix the problem with: |
|||
===One-wire Communication Error=== |
|||
ok batman-start |
|||
The sensor inside the battery could be malfunctioning or the output from the EC could be corrupted from a manufacturing defect. If the laptop cannot communicate with the known good battery, and you have already checked for an [[XO_Troubleshooting_Battery#Unplugged_Cable|unplugged cable]] or [[XO_Troubleshooting_Battery#Broken_Wire|broken wire]], then the error is in the laptop motherboard and it will need replacement. |
|||
ok bat-set-life-byd |
|||
ok batman-stop |
|||
Now remove and insert the battery. |
|||
==Battery LED is flashing red== |
|||
Flashing red LED indicates that the battery subsystem has detected an error. [[Open Firmware]] has a command that will read the error code from the EC. The command for this is 'ec-abnormal@'. At the Open Firmware use the following to view the error code. |
|||
ok ec-abnormal@ . |
|||
Note that these same set of symptoms can also be indicative of other non-ID problems, so this may not solve your problem. If the problem remains after attempting this fix, you will need to examine the battery banks and contact OLPC tech support. |
|||
'''Note''' the '.' at the end. This is required to print the error code. |
|||
== Bank 0 Invalid == |
|||
''The error conditions should be listed...'' |
|||
First, using a serial console, save the output from the batman command: |
|||
=Battery fails to charge?= |
|||
ok bat-dump-banks |
|||
==Checking the actual charge level== |
|||
olpc-pwr_log is a Linux bash script that allows you to measure the amount of charge delivered to or extracted from the battery. It can be used to determine if the battery is performing at its rated capacity. |
|||
This may be useful later. Plus, OLPC would appreciate seeing this information posted to the devel mailing list in cases where the repair worked. |
|||
==Laptop abruptly shuts off before battery is capacity reaches < 10%== |
|||
See above |
|||
There could be many causes of this error. One case found in Nicaragua had all bytes in bank 0 shifted left by one byte. The EC was then confused when reading a strange value from the status byte. |
|||
=Experimental LiFePO4 Recovery Procedure= |
|||
This was successfully solved with: |
|||
== Problem Symptoms == |
|||
ok bat-fix-error-2 |
|||
A small percentage of LiFePO4 batteries are exhibiting a problem where they do not charge correctly. The parameters that the EC watches while charging change in such a way that the EC thinks the battery is full and marks it as full. On some batteries this seems to happen in the first few minutes and on others it happens much later on. The end result in all cases is an abrupt shutoff when the voltage on the battery drops below the critical level where it can sustain operation. |
|||
It should be safe to try this repair technique for any case of Bank 0 Invalid, but it may not be able to solve the particular problem you are seeing. After running the command, perform a full reset (disconnect AC power, remove and reinsert battery). |
|||
== Verifying the problem ( Under construction ) == |
|||
If that didn't fix your problem, you can try a more invasive Bank 0 reset. This is only valid for XO-1 and XO-1.5 batteries at this time, <b>don't try it on a battery that originally arrived in a XO-1.75 laptop.</b> |
|||
The first step in verify if this is the problem with your battery is to check what the current capacity is. The tool to do this is [[#olpc-pwr_log|olpc-pwr_log]]. To use the script download it and copy it to your XO via a usb disk, SD card, or download it directly with wget. |
|||
wget http://dev.laptop.org/~rsmith/olpc-pwr_log |
|||
ok bat-reset-bank0 |
|||
There have been a few reports of windows corrupting the file when it downloads it. If you download from a computer running a Windows OS then please get the .zip version instead and extract it to your storage media. olpc-pwr_log.zip is located in the same place as olpc-pwr_log. |
|||
After running the command, perform a full reset (disconnect AC power, remove and reinsert battery). If the error condition cleared, the system will now be confused regarding the percentage of battery power remaining - you need to complete a full charge or a full discharge before things regain synchronization. |
|||
Once its downloaded and on the XO then make sure its executable by typing |
|||
chmod +x olpc-pwr_log |
|||
Then you run the script with |
|||
./olpc-pwr_log |
|||
= Battery LED is flashing yellow = |
|||
After a battery is detected A series of numbers will start listing on the screen. See [[XO_Power_Draw]] for the details. |
|||
This indicates the battery is being trickle charged. This is normal but only occurs for a very low battery. Leave the XO plugged in and normal charging will resume after trickle has finished. It may take up to an hour before normal charging commences. |
|||
The basic procedure: |
|||
Trickle charging occurs when the battery voltage is lower than 5.4V. This can be monitored with the <tt>watch-battery</tt> firmware command detailed below. |
|||
# plug up your XO to ext power and allow the battery to charge until the EC thinks it is full ie. green charge LED lit. |
|||
# start olpc-pwr_log and let it report at least 1 line of data |
|||
# unplug external power |
|||
# let the XO run on battery until it dies |
|||
# remove the battery |
|||
# power the XO back up on ext power without the battery. |
|||
# start olpc-pwr_log |
|||
# insert the battery |
|||
# allow the battery to charge until the charge LED is green again. |
|||
# exit the script with 'ctrl-c' |
|||
If trickle charging persists after an extended period of time, go to the [[#OK prompt]] and run: |
|||
Exceptions: |
|||
ok watch-battery |
|||
If watch-battery reports 0V 0A 0C and trickle charge, it may be worth testing the battery with a multimeter. See the [[#Multimeter test]]. |
|||
In many cases the battery despite being very low will have marked as fully charged by the EC. If this is the case then the EC will not attempt to enable the charging circuits. Yet if you unplug external power the XO shuts down immediately or within a few seconds and the battery is not marked as low. In this state its not possible to obtain any data with olpc-pwr_log. To fix this batman.fth allows you to reset the state of the battery and manually mark it low. This allows the EC to resync with the actual state of the battery and allow charging to be enabled. See [[#Key_tools_in_batman.fth|tools]] for the details. |
|||
= Battery detection diagnostics = |
|||
Reading the log file |
|||
If the system provides no apparent response in the battery LED when a battery is inserted, here are some diagnosis steps. |
|||
The numbers we care about for for diagnosing this problem are SOC (column 2), Voltage in uV (column 3), Current in uA (column 4) and Net ACR in mAh (last column). In batteries that are suffering from the "won't charge" problem the CV point (7.4Volts) of the batter is reached much too soon. Then the voltage continues to rise and when it reaches above 7.5V the over voltage shutoff of the battery is activated. The EC sees senses that the current has dropped below the level that indicates the battery is full and marks it full even though very little charge was delivered to the battery. This pattern is fairy easy to recognize. Below is an example: |
|||
Power off the laptop, remove the battery, power on the laptop again and go to the [[#OK prompt]]. Now run: |
|||
<pre> |
|||
ok watch-battery |
|||
1214213331,72,6524560,1418229,3192,898,Charging,72,0 |
|||
Is a battery reported? If so, your problem is not related to battery detection, and must be related to battery charging or usage, discussed elsewhere on this page. |
|||
<time passes> |
|||
Power off the laptop, remove the battery, power on the laptop again and go to the [[#OK prompt]]. Now run: |
|||
1214213649,76,7116870,1293098,3544,1185,Charging,76,119 |
|||
ok see-bstate |
|||
1214213659,76,7171770,1280208,3560,1194,Charging,76,123 |
|||
1214213670,76,7241920,1266536,3578,1203,Charging,76,127 |
|||
1214213680,76,7511540,130,3589,1205,Not charging,76,127 |
|||
1214213690,76,7507880,260,3576,1205,Not charging,76,127 |
|||
1214213701,76,7511540,0,3567,1205,Not charging,76,127 |
|||
1214213711,81,7506660,130,3551,1205,Not charging,81,127 |
|||
1214213721,81,7512150,260,3539,1205,Not charging,81,127 |
|||
1214213732,81,7510320,130,3521,1205,Not charging,81,127 |
|||
1214213742,81,7510320,390,3508,1205,Not charging,81,127 |
|||
1214213752,81,7506050,390,3493,1205,Not charging,81,127 |
|||
1214213763,97,6745990,390,3477,1205,Full,97,127 |
|||
</pre> |
|||
This command continually prints the EC 1-wire communication state machine index. In other words, it's a low-level dump of the EC's communication with the battery. Before the battery is inserted, you will see a repeated pattern (usually "0 1 2" or "0 1 3"). |
|||
In the above log the charging current is running along line normal at about 1.2 amps but at time 1214213680 the voltage suddenly jumps to 7.5V and the current falls to 130 uA which is down in the sensor noise. The EC first switches to CV mode (time 1214213711) and then when in CV mode and the charge current is < 200mA the EC marks the battery as full. This happens in the space of 114 seconds (1214213763-1214213649). This is much to quick. A normal charge would take a lot longer. The key measurement however is the net ACR which is the last column. It shows that across the entire time olpc-pwr_log was running the charging system only delivered 127 mAh. The LiFePO4 batteries are rated between 2800 and 3100 mAh so for a full continuous charge this number should be at least 2800 mAh. |
|||
Anything less for a new battery means that your battery is not providing its rated capacity. |
|||
With see-bstate still running, insert the battery and examine any change in the output. If there is no change in the output, it means the battery did not respond, see the "incorrect speed setting" section below. |
|||
If you batteries are old then a slight decrease is normal. Each battery charge/discharge cycle decreases the capacity of a battery a tiny bit. The OLPC batteries are rated for at least 50% remaining capacity after 2000 cycles. This means if you discharge/charge your battery ''every'' day then you will lose about 9% per year. |
|||
If there is some change in the output, it means that the system did detect some form of battery presence, but the communication was not enough to identify the battery. |
|||
If you have any questions about the data reported in the olpc-pwr_log then open a help ticket (send e-mail to help at laptop dot org) and attach your log file and someone will help answer your questions. |
|||
== Incorrect speed setting in battery EEPROM == |
|||
== Recovery Procedure == |
|||
If there is no change in see-bstate output when inserting a battery, you are possibly seeing a problem of <b>incorrect speed setting in battery EEPROM.</b> |
|||
=Software Tools= |
|||
The gauge chip in the battery can support two different 1-wire speed modes, selected by a setting in the EEPROM. Open Firmware only offers support for the low-speed mode, which is configured by default in our batteries. |
|||
==olpc-pwr_log== |
|||
Currently this tool is located at http://dev.laptop.org/~rsmith/olpc-pwr_log |
|||
If the battery EEPROM becomes corrupted in such a way that the speed setting is switched to high-speed, the system will fail to see the battery. <tt>watch-battery</tt> and <tt>see-bstate</tt> will behave as if no battery has been inserted. |
|||
To use olpc-pwr_log follow the following procedure: |
|||
This can be corrected with one-wire interface equipment, which is readily available and quite cheap. Some OLPC deployments have obtained such equipment and use it to correct problems such as these. Such devices are able to reprogram the battery EEPROM, removing the corruption and going back to low-speed mode. If purchasing such equipment, be sure to buy a device that supports high-speed more - not all do. |
|||
# Copy (or download) olcp-pwr_log to the XO. It does not need any special priviledge |
|||
# Start it |
|||
Firmware versions Q2F01 and newer for XO-1, and all firmware versions for XO-1.5 and XO-1.75 try very hard to avoid this condition, by detecting it before the EEPROM is written and enforcing low-speed mode. |
|||
The script will wait until it detects a battery and then begin to log various parameters via the olpc-battery subsystem. If you battery is really low and the EC is using trickle charge rather than main charge then the script will appear to be still looking for a battery even though the yellow charge light is on. Once the EC finishes trickle charging it will report that a valid battery is present and the script will continue. |
|||
If a large number of batteries are encountered in this state in your project, please contact OLPC; there is a possibility that a special EC firmware could be produced to reprogram batteries in this condition. |
|||
The output of the script is both to the screen and to a file. The file name is 'pwr-<date>-<gauge ID>.csv'. Gauge ID is a unique ID number that is contained in the gas gague of each battery. |
|||
= Laptop shuts down abruptly with significant charge remaining = |
|||
More details can be found here [[XO_Power_Draw|olpc_pwr_log]] |
|||
The reason for this may be that the Laptop fails to (fully) charge the battery. Please continue in the following section: [[#Battery capacity is significantly degraded]] |
|||
==batman.fth== |
|||
Batman.fth is a forth script that is available from [http://dev.laptop.org/pub/firmware/scripts/batman.fth|http://dev.laptop.org/pub/firmware/scripts/batman.fth]. To use it you must load it at an [[Open Firmware]] (OFW) prompt. Getting to an OFW prompt requires a [[Activation_and_Developer_Keys|developer key]]. At the OFW prompt the script is loaded with the 'fload' command specifying the storage device where bathman.fth is located. Examples: |
|||
= Battery capacity is significantly degraded = |
|||
USB disk: |
|||
fload usb:\batman.fth |
|||
SD card: |
|||
fload sd:\batman.fth |
|||
Nand: |
|||
fload nand:\batman.fth |
|||
If you have determined that the battery capacity is degraded through one of the following methods: |
|||
Once loaded you run the commands in the script just like any other OpenFirmware command. |
|||
* You have noted that the laptop shuts down abruptly while the battery still has a significant amount of charge |
|||
* You have tested the capacity of the battery and have found it to be much lower than the rated capacity of 2800mAh |
|||
* The battery refuses to charge (the battery behaves as if it is completely discharged, i.e. it cannot power the system alone, but connecting AC power causes the battery LED to go green immediately) |
|||
In this case, if the battery is a LiFePO4 battery with a yellow label, it could be that the battery cells have become inbalanced. See the [[XO LiFePO4 Recovery Procedure]]. Note that this problem was common on early XO-1 batteries, but is rarely seen on more recent models. |
|||
=== Key tools in batman.fth === |
|||
The following is a list of useful tools in batman.fth with a brief note how to use them. Some of these commands require that the EC be but in reset prior to running them so that the EC batter management system is disabled. The 1w-init command does this. After the 1w-init command is used all keyboard, touchpad and button activity is disabled. Including the power button. This means that any command requiring a 1w-init will require you to completely power off the XO by removing both external power and the battery. |
|||
If you reach this point and the LifePO4 recovery procedure doesn't help, you're unfortunately at the end of the road. It seems that the battery's internal resistance is too high to allow charging. You should discard the battery in an appropriate recycling facility. |
|||
* 1w-init |
|||
: Put the EC in reset and prepare the system so that openfirmware can talk directly to the gas gauge chip in the battery. All keyboard, touchpad and button activity is disabled after this command. Required prior so some of the other commands. |
|||
= Techniques = |
|||
* see-bstate |
|||
: Continually prints the EC 1-wire communication state machine index. Useful for determining if the EC can talk to the battery gas gague. |
|||
== OK prompt == |
|||
: Does not need 1w-init. |
|||
ok see-bstate |
|||
Some of the procedures on this page require you to have access to the Open Firmware [[Ok]] prompt. This may require a developer key to "unlock" the machine. See the [[Ok]] page for directions. |
|||
* bat-recover |
|||
* bat-set-low |
|||
== batman == |
|||
: Zeros out various values in the battery's gas guage EEPROM forcing the EC to resync with the state of the battery. Useful if your battery is marked as full when it really is not. |
|||
: Needs 1w-init |
|||
NOTE: batman is incompatible with XO-1.75. Any repairs done with batman must be performed on a XO-1 or XO-1.5 laptop. |
|||
ok 1w-init bat-set-low |
|||
Batman is a set of utilities for battery diagnostics and repairs. Some of the batman commands are included in recent firmware versions, others must be loaded from an external file. See [[Batman]] for more info. |
|||
== Capacity test == |
|||
OLPC OS has olpc-pwr-log, a tool to measure the capacity of the battery. |
|||
* Ensure that your battery is fully discharged |
|||
* Power on the laptop with no battery inserted |
|||
* Open a terminal. |
|||
* At the terminal, please type: |
|||
sudo service powerd stop |
|||
* At the terminal, please type: |
|||
olpc-pwr-log |
|||
* Insert the battery when prompted |
|||
* Wait until charged |
|||
olpc-pwr-log will report information about the battery twice a minute. The eighth column shows the net accumulated current that has been delivered to the battery since olpc-pwr-log was started. This value is in microamp hours (µAh), so divide by 1000 to obtain the value in milliamp hours (mAh). For example; |
|||
1456963454,98,7443220,242838,3331,6749166,Charging,1720833,77 |
|||
At this point the net accumulated current was 1721 mAh. |
|||
Once the battery has fully charged and the battery LED is green, look again at the value printed in the second last column. This tells you how much charge was delivered to the battery during the charging process, which is representative of the capacity of the battery. |
|||
A brand new battery would be expected to have a capacity of 2800mAh or more. As the battery is charged and discharged during its lifetime, the capacity will gradually decrease. However, it is rare to find a battery with a capacity lower than 2000mAh even after extended use. |
|||
A log file for the test will be written, e.g. pwr-160302-224644-35d92532000000ea.csv, with the name made up of; |
|||
* a six digit date in year, month, day, |
|||
* a six digit time in hour, minute, second, |
|||
* the battery serial number. |
|||
More details can be found in [[XO power draw]]. |
|||
== Multimeter test == |
|||
Checking the voltage of the battery with a multimeter acts as a simple health check for the battery, and may help with other diagnostics. |
|||
The battery has three terminals that connect to the laptop, you need to measure the voltage across the middle terminal and the one closest to the center of the battery. If your multimeter probes are too big to enter the terminals, find a couple of thin paperclips (or another type of thin wire) and feed them into the terminals, then you can connect the multimeter to the clips. |
|||
For a good battery with some charge, expect a reading between 1V and 7V. If the multimeter reports 0V here, it suggests that there is a bad connection between the cells and the battery connector, or that the protection circuit has permanently failed. Both cases would indicate that the battery is permanently damaged and cannot be recovered. |
|||
= Tips = |
|||
== Estimates == |
|||
A battery is a chemical device whose characteristics change with age, history, and ambient temperature. The charge amount shown in the frame is only an estimate. Do not worry if your battery shows (for example) 96% charged, or does not reach 100% charge. |
|||
== Minimizing battery depletion == |
|||
Even when powered off (by choosing Shutdown from the Home view), the XO has slight power draw, losing about 2% charge a day. If you won't be using the XO for a while you can avoid this by removing the battery from the XO after powering off. |
|||
== Examining battery information from Linux == |
|||
Some of the diagnostics on this page require Open Firmware [[Ok]] prompt access, which requires that security is disabled. If you cannot disable security to reach this prompt, some of the diagnostics can be made from a Linux terminal. However, note that many repairs require [[Ok]] prompt access, so this diagnostic access is of limited value. |
|||
# cd /sys/class/power_supply/olpc-battery |
|||
# ls |
|||
For example, to read the "flashing red error code" normally accessed with <tt>ec-abnormal@</tt>, you can now type: |
|||
==Linux battery subsystem== |
|||
# cat error |
|||
''More information needed here'' |
|||
[[Category: Repair]] |
[[Category: Repair]] |
||
[[Category: |
[[Category: Battery & Power]] |
||
[[Category: |
[[Category: Cleanup]] |
Latest revision as of 04:38, 3 March 2016
Introduction
This is the portion of the XO Troubleshooting Guide for diagnosing problems with the battery on an XO laptop. The Help activity also has a chapter "Charging the Battery."
This page details only problems that actually reside within the battery. Note that if you are having problems running an XO from battery power, or having problems charging a battery, such problems could be the fault of the laptop (the battery itself may be fine). Problems that are localised to the laptop itself are discussed at XO Troubleshooting Power.
How can you tell whether a particular problem is due to a faulty battery or faulty laptop? This is easiest when you have two XOs. Let's say you have laptop A including battery A, which is exhibiting a problem. You also have laptop B with laptop B, which is your personal XO which you trust to be functioning well. Take battery A and place it in laptop B, and take battery B and put it in laptop A. Testing both laptops will then give you a strong indication as to where the problem resides. Does the problem "follow" battery A into laptop B? If so, the problem resides within the battery (you're on the right page). Or does the problem remain within laptop A even when running from battery B? In such case, the problem resides within the laptop (see XO Troubleshooting Power).
If you only have one XO available to you, it is suggested that you have a quick read of both this page and XO Troubleshooting Power. You should be able to make an educated guess as to which page is the most appropriate for your problem. If in doubt, follow the diagnostics outlined on both pages.
Start here
First, take a quick look at the battery, especially the black connector which contains the contacts that electrically connect the battery to the laptop. Dried green crystals have been spotted around the connector on non-functional batteries on some occasions. This is from decomposition of the contact metal due to electrolysis in water. This may be cleaned with baking soda mixed with water, using a toothbrush. Wash your hands well afterwards. This may recover the battery, unless the contacts have become badly corroded.
Perform an XO Full Reset. If you know the problem is localised within a battery, this is unlikely to make any difference. Nevertheless, lets do it now to be sure.
Disconnect the battery, and connect the laptop to AC power. Now turn on the laptop. After the system has loaded, insert the battery.
Does the battery LED start flashing red? If so, jump to #Battery LED is flashing red.
Does the battery LED start flashing yellow? If so, see #Battery LED is flashing yellow.
- For more information on the battery LED, see [1].
Is there no apparent response in the battery LED? See #Battery detection diagnostics
Now fully charge the battery, and wait for the battery LED to go green. Now disconnect AC power and discharge the battery while the system is running, keeping an eye on the percentage charge.
Does the system shut down abruptly with over 10% of charge remaining? If so, see #Laptop shuts down abruptly with significant charge remaining.
Now, starting with the battery completely discharged, perform a #Capacity test of the battery.
Is the battery capacity significantly lower than that of the rated specification? If so, see #Battery capacity is significantly degraded.
Battery LED is flashing red
Lets start with the case that has the most solid diagnosis available: you have the laptop running with the battery inserted, and the laptop is also connected to AC power. The laptop seems to run fine with AC power connected, but the battery LED is flashing red (to be clear: the battery LED briefly is illuminated briefly as red, and then turns off, and this cycle repeats), and the laptop may not be able to be run from battery power alone.
This flashing-red pattern means that the Embedded Controller (EC) has detected a problem with the battery.
You must check the label on the battery. There are two types of battery:
- OLPC CL1, lithium ferrophosphate, for XO-1, XO-1.5, XO-1.75 and XO-4,
- OLPC CL4, lithium polymer. for XO-4 only.
The OLPC CL4 battery will cause flashing red in an XO-1, XO-1.5, or XO-1.75, and this is normal. Do not use batman. Instead, replace the battery with an OLPC CL1 model.
When the battery is the correct one for the laptop, we can ask the EC for the error code. From the Ok prompt:
ok ec-abnormal@ .
Note the '.' at the end. An error code will be returned.
Now run:
ok watch-battery
And hit escape. An error message will be printed. This message is a human-readable interpretation of the error code.
Now identify the section below that corresponds to the error code/error message and follow the instructions for potential solutions.
Wrong Pack setting (code 02)
This error indicates battery EEPROM corruption. Using #Batman, use bat-dump-banks to examine the content of the EEPROM. Please send this information to OLPC techsupport or the developers list.
LiFePo4 Overtemp (code 0b)
The battery got too hot. Turn off the system remove the battery and let things cool.
Bank 1 Invalid
This message can be produced when the memory in the gas gauge has become corrupted, causing the battery identification data to be lost. This fix should only be attempted on batteries that are labelled as Made by BYD Company Limited on the label printed on the internal-facing side of the battery.
This problem can be fixed with batman. Load batman, according to the instructions on this page, then attempt to fix the problem with:
ok batman-start ok bat-set-life-byd ok batman-stop
Now remove and insert the battery.
Note that these same set of symptoms can also be indicative of other non-ID problems, so this may not solve your problem. If the problem remains after attempting this fix, you will need to examine the battery banks and contact OLPC tech support.
Bank 0 Invalid
First, using a serial console, save the output from the batman command:
ok bat-dump-banks
This may be useful later. Plus, OLPC would appreciate seeing this information posted to the devel mailing list in cases where the repair worked.
There could be many causes of this error. One case found in Nicaragua had all bytes in bank 0 shifted left by one byte. The EC was then confused when reading a strange value from the status byte.
This was successfully solved with:
ok bat-fix-error-2
It should be safe to try this repair technique for any case of Bank 0 Invalid, but it may not be able to solve the particular problem you are seeing. After running the command, perform a full reset (disconnect AC power, remove and reinsert battery).
If that didn't fix your problem, you can try a more invasive Bank 0 reset. This is only valid for XO-1 and XO-1.5 batteries at this time, don't try it on a battery that originally arrived in a XO-1.75 laptop.
ok bat-reset-bank0
After running the command, perform a full reset (disconnect AC power, remove and reinsert battery). If the error condition cleared, the system will now be confused regarding the percentage of battery power remaining - you need to complete a full charge or a full discharge before things regain synchronization.
Battery LED is flashing yellow
This indicates the battery is being trickle charged. This is normal but only occurs for a very low battery. Leave the XO plugged in and normal charging will resume after trickle has finished. It may take up to an hour before normal charging commences.
Trickle charging occurs when the battery voltage is lower than 5.4V. This can be monitored with the watch-battery firmware command detailed below.
If trickle charging persists after an extended period of time, go to the #OK prompt and run:
ok watch-battery
If watch-battery reports 0V 0A 0C and trickle charge, it may be worth testing the battery with a multimeter. See the #Multimeter test.
Battery detection diagnostics
If the system provides no apparent response in the battery LED when a battery is inserted, here are some diagnosis steps.
Power off the laptop, remove the battery, power on the laptop again and go to the #OK prompt. Now run:
ok watch-battery
Is a battery reported? If so, your problem is not related to battery detection, and must be related to battery charging or usage, discussed elsewhere on this page.
Power off the laptop, remove the battery, power on the laptop again and go to the #OK prompt. Now run:
ok see-bstate
This command continually prints the EC 1-wire communication state machine index. In other words, it's a low-level dump of the EC's communication with the battery. Before the battery is inserted, you will see a repeated pattern (usually "0 1 2" or "0 1 3").
With see-bstate still running, insert the battery and examine any change in the output. If there is no change in the output, it means the battery did not respond, see the "incorrect speed setting" section below.
If there is some change in the output, it means that the system did detect some form of battery presence, but the communication was not enough to identify the battery.
Incorrect speed setting in battery EEPROM
If there is no change in see-bstate output when inserting a battery, you are possibly seeing a problem of incorrect speed setting in battery EEPROM.
The gauge chip in the battery can support two different 1-wire speed modes, selected by a setting in the EEPROM. Open Firmware only offers support for the low-speed mode, which is configured by default in our batteries.
If the battery EEPROM becomes corrupted in such a way that the speed setting is switched to high-speed, the system will fail to see the battery. watch-battery and see-bstate will behave as if no battery has been inserted.
This can be corrected with one-wire interface equipment, which is readily available and quite cheap. Some OLPC deployments have obtained such equipment and use it to correct problems such as these. Such devices are able to reprogram the battery EEPROM, removing the corruption and going back to low-speed mode. If purchasing such equipment, be sure to buy a device that supports high-speed more - not all do.
Firmware versions Q2F01 and newer for XO-1, and all firmware versions for XO-1.5 and XO-1.75 try very hard to avoid this condition, by detecting it before the EEPROM is written and enforcing low-speed mode.
If a large number of batteries are encountered in this state in your project, please contact OLPC; there is a possibility that a special EC firmware could be produced to reprogram batteries in this condition.
Laptop shuts down abruptly with significant charge remaining
The reason for this may be that the Laptop fails to (fully) charge the battery. Please continue in the following section: #Battery capacity is significantly degraded
Battery capacity is significantly degraded
If you have determined that the battery capacity is degraded through one of the following methods:
- You have noted that the laptop shuts down abruptly while the battery still has a significant amount of charge
- You have tested the capacity of the battery and have found it to be much lower than the rated capacity of 2800mAh
- The battery refuses to charge (the battery behaves as if it is completely discharged, i.e. it cannot power the system alone, but connecting AC power causes the battery LED to go green immediately)
In this case, if the battery is a LiFePO4 battery with a yellow label, it could be that the battery cells have become inbalanced. See the XO LiFePO4 Recovery Procedure. Note that this problem was common on early XO-1 batteries, but is rarely seen on more recent models.
If you reach this point and the LifePO4 recovery procedure doesn't help, you're unfortunately at the end of the road. It seems that the battery's internal resistance is too high to allow charging. You should discard the battery in an appropriate recycling facility.
Techniques
OK prompt
Some of the procedures on this page require you to have access to the Open Firmware Ok prompt. This may require a developer key to "unlock" the machine. See the Ok page for directions.
batman
NOTE: batman is incompatible with XO-1.75. Any repairs done with batman must be performed on a XO-1 or XO-1.5 laptop.
Batman is a set of utilities for battery diagnostics and repairs. Some of the batman commands are included in recent firmware versions, others must be loaded from an external file. See Batman for more info.
Capacity test
OLPC OS has olpc-pwr-log, a tool to measure the capacity of the battery.
- Ensure that your battery is fully discharged
- Power on the laptop with no battery inserted
- Open a terminal.
- At the terminal, please type:
sudo service powerd stop
- At the terminal, please type:
olpc-pwr-log
- Insert the battery when prompted
- Wait until charged
olpc-pwr-log will report information about the battery twice a minute. The eighth column shows the net accumulated current that has been delivered to the battery since olpc-pwr-log was started. This value is in microamp hours (µAh), so divide by 1000 to obtain the value in milliamp hours (mAh). For example;
1456963454,98,7443220,242838,3331,6749166,Charging,1720833,77
At this point the net accumulated current was 1721 mAh.
Once the battery has fully charged and the battery LED is green, look again at the value printed in the second last column. This tells you how much charge was delivered to the battery during the charging process, which is representative of the capacity of the battery.
A brand new battery would be expected to have a capacity of 2800mAh or more. As the battery is charged and discharged during its lifetime, the capacity will gradually decrease. However, it is rare to find a battery with a capacity lower than 2000mAh even after extended use.
A log file for the test will be written, e.g. pwr-160302-224644-35d92532000000ea.csv, with the name made up of;
- a six digit date in year, month, day,
- a six digit time in hour, minute, second,
- the battery serial number.
More details can be found in XO power draw.
Multimeter test
Checking the voltage of the battery with a multimeter acts as a simple health check for the battery, and may help with other diagnostics.
The battery has three terminals that connect to the laptop, you need to measure the voltage across the middle terminal and the one closest to the center of the battery. If your multimeter probes are too big to enter the terminals, find a couple of thin paperclips (or another type of thin wire) and feed them into the terminals, then you can connect the multimeter to the clips.
For a good battery with some charge, expect a reading between 1V and 7V. If the multimeter reports 0V here, it suggests that there is a bad connection between the cells and the battery connector, or that the protection circuit has permanently failed. Both cases would indicate that the battery is permanently damaged and cannot be recovered.
Tips
Estimates
A battery is a chemical device whose characteristics change with age, history, and ambient temperature. The charge amount shown in the frame is only an estimate. Do not worry if your battery shows (for example) 96% charged, or does not reach 100% charge.
Minimizing battery depletion
Even when powered off (by choosing Shutdown from the Home view), the XO has slight power draw, losing about 2% charge a day. If you won't be using the XO for a while you can avoid this by removing the battery from the XO after powering off.
Examining battery information from Linux
Some of the diagnostics on this page require Open Firmware Ok prompt access, which requires that security is disabled. If you cannot disable security to reach this prompt, some of the diagnostics can be made from a Linux terminal. However, note that many repairs require Ok prompt access, so this diagnostic access is of limited value.
# cd /sys/class/power_supply/olpc-battery # ls
For example, to read the "flashing red error code" normally accessed with ec-abnormal@, you can now type:
# cat error