XO Troubleshooting Battery: Difference between revisions
(New page: This is the portion of the XO Troubleshooting Guide for diagnosing problems with the battery and power on an XO laptop. ==The laptop won't run us...) |
(Added Richard Smith's (smithbone) contributions) |
||
Line 1: | Line 1: | ||
{{OLPC}} |
|||
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]]. |
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]]. |
||
=Start Here= |
|||
What problem are you experiencing with your laptop ? |
|||
==The laptop won't run using 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. |
|||
If the laptop doesn't function from a known good test battery, see [[#Diagnosing_Battery_Problems|Diagnosing Battery Problems]]. |
|||
==The laptop can't charge the battery== |
|||
If the laptop can charge a known good test battery, the battery should be replaced. |
|||
If the laptop can't charge the known good test battery, see [[#Diagnosing_Battery_Problems|Diagnosing Battery Problems]]. |
|||
==The laptop won't run using the power adapter== |
==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. |
|||
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. |
|||
==The laptop emits a high pitched whine when using the power adapter== |
==The laptop emits a high pitched whine when using the power adapter== |
||
''Working on this one'' |
|||
==The laptop can't charge the battery== |
|||
=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: |
|||
==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. |
|||
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. |
|||
==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. |
|||
===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 led is flashing red|below]]. |
|||
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. |
|||
===Checking for battery presence=== |
|||
The following methods may be used to manually check for battery presence. |
|||
====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: |
|||
cat /sys/class/power_supply/olpc_battery/present |
|||
====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: |
|||
ok watch-battery |
|||
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. |
|||
====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 'see-bstate' 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. |
|||
==Common Causes for lack of battery presence== |
|||
===Unplugged cable=== |
|||
Check to see that conn FIXME is firmly plugged in. |
|||
===Broken wire=== |
|||
A break or bad connection between conn FIXME and data pin on the battery connector results in no 1-wire communication and therefore no battery detection. Check continuity of the cable with an ohm meter. |
|||
(ADD PICTURES) |
|||
===1-wire communication error=== |
|||
The sensor inside the battery could be malfunctioning or the output from the EC could be corrupted from a manufacturing defect. Try swapping in known good batteries and trying the suspect battery in a known good laptop. If the error is in the CPU board then it will need replacement. |
|||
===Bad data in battery EEPROM=== |
|||
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. This can be detected by watching the output of 'see-bstate'. |
|||
==The battery led is flashing red== |
|||
Flashing red LED indicates that the battery subsystem has detected an error. OpenFirmware has a command that will read the error code from the EC. The command for this is 'ec-abnormal@'. At the OpenFirmware use the following to view the error code. |
|||
ok ec-abnormal@ . |
|||
Note the '.' at the end. This is required to print the error code. |
|||
list error conditions. |
|||
=Battery fails to charge?= |
|||
==Checking the actual charge level== |
|||
olpc-pwr_prof 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. |
|||
==Laptop abruptly shuts off before battery is capacity reaches < 10%== |
|||
See above |
|||
=Software Tools= |
|||
==olpc-pwr_log== |
|||
Currently this tool is located at http://dev.laptop.org/~rsmith/olpc-pwr_log |
|||
To use olpc-pwr_log follow the following procedure: |
|||
# Copy (or download) olcp-pwr_log to the XO. It does not need any special priviledge |
|||
# Start it |
|||
==batman.fth== |
|||
# Indication: The charging led is burning yellow and never goes green. |
|||
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 developer key. At the OFW prompt the script is loaded with the 'fload' command specifying the storage device where bathman.fth is located. Examples: |
|||
# Debug: |
|||
## check if battery connector in the chassis has 7 volts. |
|||
## check if battery connector on the motherboard has 7 volts. |
|||
USB disk: |
|||
(Garbled text here!) < < < < < < < < |
|||
fload usb:\batman.fth |
|||
SD card: |
|||
fload sd:\batman.fth |
|||
Nand: |
|||
fload nand:\batman.fth |
|||
Once loaded you run the commands in the script just like any other openfirmware command. |
|||
==Linux battery subsystem== |
|||
## If the has If This is due to a loose cable / connector. Check wiring and connectors st |
|||
# fixes: |
|||
## bewing pins in the connectors |
|||
## resolder / replace wires |
|||
''More information needed here'' |
|||
[[Category: Repair]] |
[[Category: Repair]] |
Revision as of 07:09, 16 June 2008
This is the portion of the XO Troubleshooting Guide for diagnosing problems with the battery and power on an XO laptop.
Start Here
What problem are you experiencing with your laptop ?
The laptop won't run using the battery
If the laptop functions fine using a known good test battery, the battery should be replaced.
If the laptop doesn't function from a known good test battery, see Diagnosing Battery Problems.
The laptop can't charge the battery
If the laptop can charge a known good test battery, the battery should be replaced.
If the laptop can't charge the known good test battery, see Diagnosing Battery Problems.
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.
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.
The laptop emits a high pitched whine when using the power adapter
Working on this one
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:
=Did the EC boot?
Follow the Full Reset procedure, and check to see if the battery LED flashes orange momentarily after reapplying power.
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.
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.
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 below.
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.
Checking for battery presence
The following methods may be used to manually check for battery presence.
Using Linux
Linux has an interface to the laptop's battery subsystem. Its available via sysfs at /sys/class/power_supply/olpc_battery/. 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:
cat /sys/class/power_supply/olpc_battery/present
Using OpenFirmware
You will need a developer key for the laptop. Open Firmware has command that will talk to the EC and read the current battery info. This command is watch-battery. At the Open Firmware command prompt do:
ok watch-battery
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.
Using OpenFirmware and batman.fth
You will need a 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 'see-bstate' 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.
Common Causes for lack of battery presence
Unplugged cable
Check to see that conn FIXME is firmly plugged in.
Broken wire
A break or bad connection between conn FIXME and data pin on the battery connector results in no 1-wire communication and therefore no battery detection. Check continuity of the cable with an ohm meter. (ADD PICTURES)
1-wire communication error
The sensor inside the battery could be malfunctioning or the output from the EC could be corrupted from a manufacturing defect. Try swapping in known good batteries and trying the suspect battery in a known good laptop. If the error is in the CPU board then it will need replacement.
Bad data in battery EEPROM
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. This can be detected by watching the output of 'see-bstate'.
The battery led is flashing red
Flashing red LED indicates that the battery subsystem has detected an error. OpenFirmware has a command that will read the error code from the EC. The command for this is 'ec-abnormal@'. At the OpenFirmware use the following to view the error code.
ok ec-abnormal@ .
Note the '.' at the end. This is required to print the error code.
list error conditions.
Battery fails to charge?
Checking the actual charge level
olpc-pwr_prof 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.
Laptop abruptly shuts off before battery is capacity reaches < 10%
See above
Software Tools
olpc-pwr_log
Currently this tool is located at http://dev.laptop.org/~rsmith/olpc-pwr_log
To use olpc-pwr_log follow the following procedure:
- Copy (or download) olcp-pwr_log to the XO. It does not need any special priviledge
- Start it
batman.fth
Batman.fth is a forth script that is available from [1]. To use it you must load it at an Open Firmware (OFW) prompt. Getting to an OFW prompt requires a developer key. At the OFW prompt the script is loaded with the 'fload' command specifying the storage device where bathman.fth is located. Examples:
USB disk:
fload usb:\batman.fth
SD card:
fload sd:\batman.fth
Nand:
fload nand:\batman.fth
Once loaded you run the commands in the script just like any other openfirmware command.
Linux battery subsystem
More information needed here