Fix Clock: Difference between revisions
No edit summary |
|||
Line 2: | Line 2: | ||
{{Translations}} |
{{Translations}} |
||
This page describes how to fix a |
This page describes how to fix a [[Hardware_specification#Laptop_Hardware|XO laptop]] suffering from problems with the Real Time Clock. If the laptop has security enabled, this problem will prevent the laptop from booting. |
||
= Problem Description = |
|||
[[image:XO_bad_rtc.jpg|thumb|Bad RTC battery holder (most aren't this obvious)]] [[image:XO_good_rtc.jpg|thumb|Good RTC battery holder]] |
|||
XO laptops with this problem show one of two symptoms: |
XO laptops with this problem show one of two symptoms: |
||
# The laptop screen lights up and shows "Invalid System Date" and then powers off, or continues to boot, seeking an activation lease. Activating the laptop will result in the laptop working temporarily, but returning to the same problem on next boot. |
|||
# The power LED turns on, but the screen never turns on (not even the backlight). The microphone LED may flash briefly, but stays off. This symptom can only happen with [[Open_Firmware|OFW]] versions [[OLPC_Firmware_q2d05|Q2D05]] and [[OLPC_Firmware_q2d06|Q2D06]]. |
|||
# The |
# The power LED turns on, but the screen never turns on (not even the backlight). The microphone LED may flash briefly, but stays off. This symptom can only happen on XO-1 with very old versions of [[Open_Firmware|OFW]] ([[OLPC_Firmware_q2d05|Q2D05]] and [[OLPC_Firmware_q2d06|Q2D06]]). |
||
The problem is caused by bad date information stored in the Real Time Clock (RTC) chip. There are three ways that the date could become bad: |
The problem is caused by bad date information stored in the Real Time Clock (RTC) chip. There are three ways that the date could become bad: |
||
* The RTC chip lost all power. The RTC chip has a "coin cell" backup battery (ML1220) that powers the RTC chip when the AC and the main battery are not present, but unfortunately, problems with this backup battery are common. |
|||
** Some of the early production XO-1 machines were manufactured with a defective holder for the coin cell battery. On those machines, the coin cell battery can become loose or even pop out entirely during normal shipping and handling. |
|||
** Another occasional problem is leakage or corrosion from the battery, causing a loss of contact between the battery and the metal contacts inside the holder. [http://dev.laptop.org/~dsd/20090406/ Some photos here.] |
|||
** It is also possible (and not too uncommon) that the coin cell battery simply does not work (or has ceased to work). |
|||
* The factory did not set the date. This is rare. |
* The factory did not set the date. This is rare. |
||
* The user explicitly set the date to an incorrect value, either by mistake or as an attempt to defeat activation security. This is also rare. |
* The user explicitly set the date to an incorrect value, either by mistake or as an attempt to defeat activation security. This is also rare. |
||
* The RTC chip lost all power. This should have been rare, because the RTC chip has a "coin cell" backup battery that powers the RTC chip when the AC and the main battery are not present. |
|||
** Unfortunately, some of the early production machines were manufactured with a defective holder for the coin cell battery. On those machines, the coin cell battery can become loose or even pop out entirely during normal shipping and handling. |
|||
** Another occasional problem is leakage or corrosion from the battery, causing a loss of contact between the battery and the metal contacts inside the holder. [http://dev.laptop.org/~dsd/20090406/ Some photos here.] |
|||
"RTC chip lost power" is by far the most common cause of the problem. |
"RTC chip lost power" is by far the most common cause of the problem. |
||
= Repair process = |
|||
The overall process is: |
|||
Fixing the problem has three phases: |
|||
# Examine the battery and its holder, securing the battery in place if necessary |
|||
# Reprogram the time and date |
|||
* |
#* If running a very old version, update [[Open Firmware]] to the [[Firmware#Firmware_Releases|current version]]. |
||
# Perform a verification test |
|||
== |
== Examine the battery and its holder == |
||
See the [[Disassembly|disassembly guide]]. To secure the battery, you will need some glue as [[#Fix the loose battery|described later]]. |
|||
The requirements for the rest of the repair depend on which of the two symptoms the system displays. |
|||
*If the screen does not turn on (symptom 1), you will a special hardware adapter - an [[Serial_adapters|OLPC serial adapter]] - and a second working computer (XO or otherwise). |
|||
*If the screen does turn on (symptom 2), you will need a [[Activation and Developer Keys#Getting a Developer Key if the Machine Won't Boot|"developer key"]] for this machine, on a USB storage stick. |
|||
== Fixing the loose battery problem == |
|||
To access the Real Time Clock battery, follow the [[Disassembly_top|instruction for removing the back cover]]. |
To access the Real Time Clock battery, follow the [[Disassembly_top|instruction for removing the back cover]]. |
||
=== XO-1 === |
|||
If you determine that the cause of the problem was due to a loose battery, you must first re-seat the coin cell battery in its holder and secure it so it doesn't come out again. One way to secure it is to put a drop of glue where the battery contacts the holder, away from the metallic contact. The best glue that Mitch has found for this purpose is clear solvent-based household cement. Technically, it is "nitro cellulose" cement. It is also known as "model airplane glue", marketed under various trade names such as "Duco Cement", "Tarzan's Grip". Loctite "Stik'n Seal", etc. (Alleskleber, in Germany, maybe?) The solvent in this kind of cement is toxic and flammable, so keep it away from children! Stronger adhesives like epoxy or cyanoacrylate (super glue) would probably work too, but it might be difficult to remove the battery later without damaging the holder. Don't even think of "Gorilla Glue"; that's polyurethane, which foams as it cures. RTV silicone would be good, except that the common variety releases corrosive acetic acid as it cures - if it smells like vinegar, don't use it on electronics. Ordinary "white glue" (PVA, or polyvinyl acetate) will probably work, but it flows easily and goes down underneath the battery - that is probably okay if you are careful not to use too much. Hot melt glue doesn't work, because it doesn't stick very well to these materials. |
|||
On newer models of the XO-1, the RTC battery and its holder may be covered by a circular strip of rubber (a hardware improvement attempting to reduce the frequency of this issue). You can remove this cover simply by peeling it off. |
|||
== Fixing the leaking battery problem == |
|||
Examine the battery and its holder. Is there signs of acid leakage? Does the battery appear secure in its holder? |
|||
To access the Real Time Clock battery, follow the [[Disassembly_top|instruction for removing the back cover]]. |
|||
Remove the battery from the socket. Check for signs of leakage underneath the battery, in the holder, and on the motherboard and components around the battery holder. |
|||
If you determine that the cause of the problem was due to battery leakage: |
|||
'''If there is signs of battery leakage''': |
|||
# Remove the leaking coin cell battery and discard it. |
# Remove the leaking coin cell battery and discard it. |
||
# Carefully clean any leakage/corrosion in the battery holder, using e.g. a damp toothbrush. |
# Carefully clean any leakage/corrosion in the battery holder, using e.g. a damp toothbrush. |
||
Line 52: | Line 46: | ||
# Using a magnifying glass, look for damage to surrounding components or electrical tracks |
# Using a magnifying glass, look for damage to surrounding components or electrical tracks |
||
#* If present, you are advised to treat the motherboard as broken or dead-on-arrival. |
#* If present, you are advised to treat the motherboard as broken or dead-on-arrival. |
||
# Obtain a replacement cell battery (these parts are very standard) and install in the socket |
# Obtain a replacement cell battery (these parts are very standard) and install in the socket. |
||
#* Any decent electrical/DIY store will stock these, they are known as ML1220 batteries and commonly found in calculators. |
|||
[[image:XO_bad_rtc.jpg|thumb|Bad RTC battery holder]] [[image:XO_good_rtc.jpg|thumb|Good RTC battery holder]] |
|||
== Serial Procedure - for symptom 1 (screen does not turn on) == |
|||
'''If the battery does not fit well in the socket''', carefully examine the shape of the socket. Early production units had a defective battery holder, pictured here. The photos do not make the problem very obvious; the issue is that the shape of the battery holder does not 'grip' the battery. In other words, a side angle view of the battery holder should show the shape as follows: |
|||
You will need to [[Disassembly_top|disassemble the laptop]] to access the motherboard. |
|||
(_____) |
|||
=== Hook the laptop up to another one through the serial port === |
|||
However, the shape of the defective units is more like: |
|||
# Using an [[Serial_adapters|OLPC serial adapter]], connect the laptop to your personal laptop. On the laptop's motherboard, the serial adapter should be connected to [[XO_Motherboard_Repair|J1]]. J1 is a small white connector near the wireless module. |
|||
# Use a program like minicom (for Linux) or HyperTerminal (for Windows) to access the laptop serially |
|||
# The serial port settings should be 115200 baud, 8 data bits, no parity, and 1 stop bit and handshake parameter is disabled. |
|||
\_____/ |
|||
It is suggested practice to test communications with a known good laptop before debugging broken ones! |
|||
(these crude diagrams are exaggerated) |
|||
=== Getting to the prompt === |
|||
If your XO suffers from this problem, you must re-seat the coin cell battery in its holder and secure it so it doesn't come out again. This can be done by putting a drop of glue where the battery contacts the holder, away from the metallic contact. |
|||
''All these commands are typed on the "other" laptop that is connected serially to the one with the bad clock'' |
|||
* The best glue that Mitch has found for this purpose is clear solvent-based household cement. Technically, it is "nitro cellulose" cement. It is also known as "model airplane glue", marketed under various trade names such as "Duco Cement", "Tarzan's Grip". Loctite "Stik'n Seal", etc (Alleskleber, in Germany, maybe?). The solvent in this kind of cement is toxic and flammable, so keep it away from children! |
|||
* Stronger adhesives like epoxy or cyanoacrylate (super glue) would probably work too, but it might be difficult to remove the battery later without damaging the holder. |
|||
* Don't even think of "Gorilla Glue"; that's polyurethane, which foams as it cures. |
|||
* RTV silicone would be good, except that the common variety releases corrosive acetic acid as it cures - if it smells like vinegar, don't use it on electronics. |
|||
* Ordinary "white glue" (PVA, or polyvinyl acetate) will probably work, but it flows easily and goes down underneath the battery - that is probably okay if you are careful not to use too much. |
|||
* Hot melt glue doesn't work, because it doesn't stick very well to these materials. |
|||
* Power on the laptop under test. You should see "Page Fault" on the serial terminal, followed by an "ok" prompt. If you don't see "Page Fault", there are several possibilities: |
|||
** If you don't see anything on the serial terminal, either |
|||
*** The serial terminal is not connected correctly, or |
|||
*** Something else is wrong with the machine - the machine is quite quite dead and it's not an instance of the symptom 1 RTC problem. |
|||
** If you see a lot of startup messages, but the last one isn't "Page Fault" followed by "ok", then the machine is largely working, but the problem is not symptom 1 RTC problem. If the screen comes on, you should be following the "Developer Key Procedure" below, not this serial procedure. |
|||
* To set the date, do the following commands at the ok prompt (hitting enter after each one): |
|||
ok select /rtc |
|||
ok decimal |
|||
ok sec min hour day month year set-time |
|||
* sec, min, hour, day, etc in the previous command should be numbers correlating to the current date. For the current time: |
|||
ok {{CURRENTSECOND}} {{CURRENTMINUTE}} {{CURRENTHOUR}} {{CURRENTDAY}} {{CURRENTMONTH}} {{CURRENTYEAR}} set-time |
|||
* Insert a USB key containing the [[Firmware#Firmware_Releases|latest firwmare version]]. You will need to download the ''.rom'' file and place it on the key. |
|||
* To update the firmware, type the following command line at the ok prompt, substituting the correct ''.rom'' filename: |
|||
ok probe-pci probe-usb flash u:\q2d16.rom |
|||
If your XO had a black rubber strip covering the battery in the holder, install the cover again now. |
|||
* The machine should reboot automatically afterwards. You can then remove the USB stick, and the system should work correctly. You can disconnect the serial adapter and reassemble the machine. |
|||
=== |
=== XO-1.5 === |
||
Instead of using a non-XO computer to connect to the laptop being repaired, you may also use an XO. |
|||
On the XO-1.5, the RTC battery is stored away from the motherboard in shrink tubing, connected with a socket-secured cable, a further attempt to reduce the frequency of RTC battery-related problems. |
|||
# Install any build (650 or later) |
|||
# Boot the laptop, and connect to the internet. |
|||
# Go to the terminal and type: yum install minicom |
|||
# After it is done, set up minicom by typing: minicom -s |
|||
## Go to 'Serial port setup' and hit enter. |
|||
## Press 'a' and change it to /dev/ttyUSB0, and then hit enter twice. |
|||
## Go to 'Modem and dialing' and hit enter. |
|||
## Clear the contents of both 'Init string' and 'Reset string' (you get to those by hitting 'a' and 'b' |
|||
## Hit enter to get back to the 'configuration' menu. |
|||
## Go to 'Save setup as..' and hit enter. |
|||
## Name the setup as 'USB0' and hit enter. |
|||
## Go to 'Exit from Minicom' and hit enter. |
|||
# Now, to open minicom with the settings you want all you have to do is type: minicom USB0 |
|||
Even though the same standard coin-cell is in use, replacing the battery here is non-trivial as the shrink tubing will be destroyed as you open it. It may be possible to repair the tubing with some tape, or to discard the tubing and create your own enclosure with some electrical tape, although connecting and holding the wires to the battery may be tricky. |
|||
== Developer Key Procedure - for symptom 2 (screen turns on) == |
|||
The more sensible option would be to take the entire component (connector + cable + tubing + battery) from another laptop (or a spare parts supply sourced from OLPC). |
|||
''All these commands are typed on the OLPC keyboard of the laptop that has the bad clock'' |
|||
== Reprogram the time/date == |
|||
* Get a [[Activation and Developer Keys#Getting a Developer Key if the Machine Won't Boot|"developer key"]] for this machine and put it on a USB storage stick |
|||
* Also put the [[Firmware#Firmware_Releases|latest firwmare version]] on the USB storage stick. You will need to download the ''.rom'' file and place it on the key. |
|||
Reprogramming the time and date is done through the OpenFirmware ''ok'' prompt. |
|||
* Insert the USB stick into the laptop |
|||
* Power on the laptop |
|||
=== If the screen turns on === |
|||
* When the screen says "Type the Esc key to interrupt automatic startup", type the upper left key on the XO keyboard before the countdown expires. You should get an "ok" prompt. (If you don't see that message, something is wrong with the developer key.) |
|||
* Type these commands to set the date (hitting enter after each one): |
|||
If there is something visible on the display, you simply need to disable the XO laptop security system and press the escape key once you hear the bootup sound to access the OpenFirmware prompt. |
|||
In order to disable the security system (assuming it is enabled, which is generally only true for large deployments and G1G1 customers), you will need a [[Activation and Developer Keys#Getting a Developer Key if the Machine Won't Boot|"developer key"]] for this machine, on a USB storage stick. |
|||
Turn on the XO and hit Escape upon hearing the bootup jingle. |
|||
At the ''ok'' prompt, type these commands to set the date (hitting enter after each one): |
|||
ok select /rtc |
ok select /rtc |
||
ok decimal |
ok decimal |
||
ok sec min hour day month year set-time |
ok sec min hour day month year set-time |
||
* sec, min, hour, etc. should be numbers correlating to the current date |
|||
* Type this command to update the firmware, substituting the correct .rom filename: |
|||
ok flash u:\q2d16.rom |
|||
* The machine should reboot automatically afterwards. You can then remove the USB stick, and the system should work correctly. You can reassemble the machine. |
|||
sec, min, hour, day, etc in the previous command should be numbers correlating to the current date. For the current time: |
|||
=== If collection fails === |
|||
ok {{CURRENTSECOND}} {{CURRENTMINUTE}} {{CURRENTHOUR}} {{CURRENTDAY}} {{CURRENTMONTH}} {{CURRENTYEAR}} set-time |
|||
You can now turn off the machine by pressing the power button for a few seconds. |
|||
If the laptop boots, but immediately displays a system clock error and shuts down ''before'' the collector script runs: |
|||
=== If the screen does not turn on === |
|||
* Set up a serial terminal |
|||
* Power on the XO |
|||
Very old versions of OpenFirmware for the XO-1 laptop had a bug which would cause the screen to fail to power up when this RTC clock problem was encountered. If this happens, the recovery procedure involves linking up a special cable to another computer, and then using that other computer to reprogram the time and date. |
|||
* On the other computer/XO, immediately press '''"i"''' to interrupt the startup sequence |
|||
* Reset the system time (hitting enter after each command): |
|||
As there are numerous opporuntities for error, it is suggested practice to test serial console communications with a known good laptop before debugging broken ones! |
|||
# Using an [[Serial_adapters|OLPC serial adapter]], connect the laptop to your personal laptop. On the laptop's motherboard, the serial adapter should be connected to [[XO_Motherboard_Repair|J1]]. J1 is a small white connector near the wireless module. |
|||
# Use a program like minicom (for Linux) or HyperTerminal (for Windows) to access the laptop serially |
|||
# The serial port settings should be 115200 baud, 8 data bits, no parity, and 1 stop bit and handshake parameter is disabled. |
|||
# Power on the laptop under test. You should see "Page Fault" on the serial terminal, followed by an "ok" prompt. If you don't see "Page Fault", there are several possibilities: |
|||
#* If you don't see anything on the serial terminal, either |
|||
#** The serial terminal is not connected correctly, or |
|||
#** Something else is wrong with the machine - the machine is quite quite dead and it's not an instance of the symptom 1 RTC problem. |
|||
#* If you see a lot of startup messages, but the last one isn't "Page Fault" followed by "ok", then the machine is largely working, but the problem is not symptom 1 RTC problem. If the screen comes on, you should be following the "Developer Key Procedure" below, not this serial procedure. |
|||
Using the "other" laptop that is connected serially to the affected XO, type these commands at the ''ok'' prompt (hitting enter after each one): |
|||
ok select /rtc |
ok select /rtc |
||
ok decimal |
ok decimal |
||
ok sec min hour day month year set-time |
ok sec min hour day month year set-time |
||
* Power off the XO and then collect the UUID as outlined above |
|||
sec, min, hour, day, etc in the previous command should be numbers correlating to the current date. For the current time: |
|||
ok {{CURRENTSECOND}} {{CURRENTMINUTE}} {{CURRENTHOUR}} {{CURRENTDAY}} {{CURRENTMONTH}} {{CURRENTYEAR}} set-time |
|||
At this point, you are strongly advised to perform a firmware update to a version that does not suffer from this blank-screen problem. That way, if the RTC loses power again, your diagnosis/recovery procedure will not be as painful. |
|||
# Insert a USB key containing the [[Firmware#Firmware_Releases|latest firwmare version]]. You will need to download the ''.rom'' file and place it on the key. |
|||
# To update the firmware, type the following command line at the ok prompt, substituting the correct ''.rom'' filename: |
|||
ok probe-pci probe-usb flash u:\q2d16.rom |
|||
== Perform a verification test == |
|||
With the clock reprogrammed, we must now verify that the laptop is able to retain the time and date, otherwise this problem will resurface. |
|||
# Unplug the charger if it is plugged in. |
|||
# Remove the regular XO battery from the underside of the laptop (Note: this refers to the main battery that is charged through AC power, and can be easily accessed by turnign the laptop upside down. It does not refer to the coin cell battery, which you should not touch at this point). |
|||
# Leave the laptop in this state for 3-5 minutes |
|||
# Connect a power source (the battery, or the charger) and turn on the laptop |
|||
# Look carefully for an "Invalid System Date" error message appearing immediately |
|||
The lack of an error message indiciates that the repair was a success. You may wish to go into Linux and run <tt>date</tt> in the Terminal activity to verify that the clock was programmed correctly, although this should not be necessary. |
|||
If there is an error message, then 3 situations are possible: |
|||
# The RTC coin-cell battery is faulty and must be replaced. |
|||
#* You can verify this by installing a known-working battery, reprogramming the clock, and then repeating this verification test. Test pass would confirm this problem. |
|||
# There is a problem with the battery holder or the motherboard, so the laptop should be replaced. |
|||
#* You can verify this by installing a known-working battery, reprogramming the clock, and then repeating this verification test. Test fail would confirm this problem. |
|||
# If you are dealing with a defective shape battery holder, perhaps the RTC battery is (still) not maintaining electrical contact with the connector inside the battery holder. |
|||
[[Category:HowTo]] |
[[Category:HowTo]] |
Revision as of 16:08, 18 March 2010
This page describes how to fix a XO laptop suffering from problems with the Real Time Clock. If the laptop has security enabled, this problem will prevent the laptop from booting.
Problem Description
XO laptops with this problem show one of two symptoms:
- The laptop screen lights up and shows "Invalid System Date" and then powers off, or continues to boot, seeking an activation lease. Activating the laptop will result in the laptop working temporarily, but returning to the same problem on next boot.
- The power LED turns on, but the screen never turns on (not even the backlight). The microphone LED may flash briefly, but stays off. This symptom can only happen on XO-1 with very old versions of OFW (Q2D05 and Q2D06).
The problem is caused by bad date information stored in the Real Time Clock (RTC) chip. There are three ways that the date could become bad:
- The RTC chip lost all power. The RTC chip has a "coin cell" backup battery (ML1220) that powers the RTC chip when the AC and the main battery are not present, but unfortunately, problems with this backup battery are common.
- Some of the early production XO-1 machines were manufactured with a defective holder for the coin cell battery. On those machines, the coin cell battery can become loose or even pop out entirely during normal shipping and handling.
- Another occasional problem is leakage or corrosion from the battery, causing a loss of contact between the battery and the metal contacts inside the holder. Some photos here.
- It is also possible (and not too uncommon) that the coin cell battery simply does not work (or has ceased to work).
- The factory did not set the date. This is rare.
- The user explicitly set the date to an incorrect value, either by mistake or as an attempt to defeat activation security. This is also rare.
"RTC chip lost power" is by far the most common cause of the problem.
Repair process
The overall process is:
- Examine the battery and its holder, securing the battery in place if necessary
- Reprogram the time and date
- If running a very old version, update Open Firmware to the current version.
- Perform a verification test
Examine the battery and its holder
To access the Real Time Clock battery, follow the instruction for removing the back cover.
XO-1
On newer models of the XO-1, the RTC battery and its holder may be covered by a circular strip of rubber (a hardware improvement attempting to reduce the frequency of this issue). You can remove this cover simply by peeling it off.
Examine the battery and its holder. Is there signs of acid leakage? Does the battery appear secure in its holder?
Remove the battery from the socket. Check for signs of leakage underneath the battery, in the holder, and on the motherboard and components around the battery holder.
If there is signs of battery leakage:
- Remove the leaking coin cell battery and discard it.
- Carefully clean any leakage/corrosion in the battery holder, using e.g. a damp toothbrush.
- Neutralise the leakage/corrosion area with some baking soda.
- Using a magnifying glass, look for damage to surrounding components or electrical tracks
- If present, you are advised to treat the motherboard as broken or dead-on-arrival.
- Obtain a replacement cell battery (these parts are very standard) and install in the socket.
- Any decent electrical/DIY store will stock these, they are known as ML1220 batteries and commonly found in calculators.
If the battery does not fit well in the socket, carefully examine the shape of the socket. Early production units had a defective battery holder, pictured here. The photos do not make the problem very obvious; the issue is that the shape of the battery holder does not 'grip' the battery. In other words, a side angle view of the battery holder should show the shape as follows:
(_____)
However, the shape of the defective units is more like:
\_____/
(these crude diagrams are exaggerated)
If your XO suffers from this problem, you must re-seat the coin cell battery in its holder and secure it so it doesn't come out again. This can be done by putting a drop of glue where the battery contacts the holder, away from the metallic contact.
- The best glue that Mitch has found for this purpose is clear solvent-based household cement. Technically, it is "nitro cellulose" cement. It is also known as "model airplane glue", marketed under various trade names such as "Duco Cement", "Tarzan's Grip". Loctite "Stik'n Seal", etc (Alleskleber, in Germany, maybe?). The solvent in this kind of cement is toxic and flammable, so keep it away from children!
- Stronger adhesives like epoxy or cyanoacrylate (super glue) would probably work too, but it might be difficult to remove the battery later without damaging the holder.
- Don't even think of "Gorilla Glue"; that's polyurethane, which foams as it cures.
- RTV silicone would be good, except that the common variety releases corrosive acetic acid as it cures - if it smells like vinegar, don't use it on electronics.
- Ordinary "white glue" (PVA, or polyvinyl acetate) will probably work, but it flows easily and goes down underneath the battery - that is probably okay if you are careful not to use too much.
- Hot melt glue doesn't work, because it doesn't stick very well to these materials.
If your XO had a black rubber strip covering the battery in the holder, install the cover again now.
XO-1.5
On the XO-1.5, the RTC battery is stored away from the motherboard in shrink tubing, connected with a socket-secured cable, a further attempt to reduce the frequency of RTC battery-related problems.
Even though the same standard coin-cell is in use, replacing the battery here is non-trivial as the shrink tubing will be destroyed as you open it. It may be possible to repair the tubing with some tape, or to discard the tubing and create your own enclosure with some electrical tape, although connecting and holding the wires to the battery may be tricky.
The more sensible option would be to take the entire component (connector + cable + tubing + battery) from another laptop (or a spare parts supply sourced from OLPC).
Reprogram the time/date
Reprogramming the time and date is done through the OpenFirmware ok prompt.
If the screen turns on
If there is something visible on the display, you simply need to disable the XO laptop security system and press the escape key once you hear the bootup sound to access the OpenFirmware prompt.
In order to disable the security system (assuming it is enabled, which is generally only true for large deployments and G1G1 customers), you will need a "developer key" for this machine, on a USB storage stick.
Turn on the XO and hit Escape upon hearing the bootup jingle.
At the ok prompt, type these commands to set the date (hitting enter after each one):
ok select /rtc ok decimal ok sec min hour day month year set-time
sec, min, hour, day, etc in the previous command should be numbers correlating to the current date. For the current time:
ok 38 06 20 21 11 2024 set-time
You can now turn off the machine by pressing the power button for a few seconds.
If the screen does not turn on
Very old versions of OpenFirmware for the XO-1 laptop had a bug which would cause the screen to fail to power up when this RTC clock problem was encountered. If this happens, the recovery procedure involves linking up a special cable to another computer, and then using that other computer to reprogram the time and date.
As there are numerous opporuntities for error, it is suggested practice to test serial console communications with a known good laptop before debugging broken ones!
- Using an OLPC serial adapter, connect the laptop to your personal laptop. On the laptop's motherboard, the serial adapter should be connected to J1. J1 is a small white connector near the wireless module.
- Use a program like minicom (for Linux) or HyperTerminal (for Windows) to access the laptop serially
- The serial port settings should be 115200 baud, 8 data bits, no parity, and 1 stop bit and handshake parameter is disabled.
- Power on the laptop under test. You should see "Page Fault" on the serial terminal, followed by an "ok" prompt. If you don't see "Page Fault", there are several possibilities:
- If you don't see anything on the serial terminal, either
- The serial terminal is not connected correctly, or
- Something else is wrong with the machine - the machine is quite quite dead and it's not an instance of the symptom 1 RTC problem.
- If you see a lot of startup messages, but the last one isn't "Page Fault" followed by "ok", then the machine is largely working, but the problem is not symptom 1 RTC problem. If the screen comes on, you should be following the "Developer Key Procedure" below, not this serial procedure.
- If you don't see anything on the serial terminal, either
Using the "other" laptop that is connected serially to the affected XO, type these commands at the ok prompt (hitting enter after each one):
ok select /rtc ok decimal ok sec min hour day month year set-time
sec, min, hour, day, etc in the previous command should be numbers correlating to the current date. For the current time:
ok 38 06 20 21 11 2024 set-time
At this point, you are strongly advised to perform a firmware update to a version that does not suffer from this blank-screen problem. That way, if the RTC loses power again, your diagnosis/recovery procedure will not be as painful.
- Insert a USB key containing the latest firwmare version. You will need to download the .rom file and place it on the key.
- To update the firmware, type the following command line at the ok prompt, substituting the correct .rom filename:
ok probe-pci probe-usb flash u:\q2d16.rom
Perform a verification test
With the clock reprogrammed, we must now verify that the laptop is able to retain the time and date, otherwise this problem will resurface.
- Unplug the charger if it is plugged in.
- Remove the regular XO battery from the underside of the laptop (Note: this refers to the main battery that is charged through AC power, and can be easily accessed by turnign the laptop upside down. It does not refer to the coin cell battery, which you should not touch at this point).
- Leave the laptop in this state for 3-5 minutes
- Connect a power source (the battery, or the charger) and turn on the laptop
- Look carefully for an "Invalid System Date" error message appearing immediately
The lack of an error message indiciates that the repair was a success. You may wish to go into Linux and run date in the Terminal activity to verify that the clock was programmed correctly, although this should not be necessary.
If there is an error message, then 3 situations are possible:
- The RTC coin-cell battery is faulty and must be replaced.
- You can verify this by installing a known-working battery, reprogramming the clock, and then repeating this verification test. Test pass would confirm this problem.
- There is a problem with the battery holder or the motherboard, so the laptop should be replaced.
- You can verify this by installing a known-working battery, reprogramming the clock, and then repeating this verification test. Test fail would confirm this problem.
- If you are dealing with a defective shape battery holder, perhaps the RTC battery is (still) not maintaining electrical contact with the connector inside the battery holder.