Ticket #11793 (reopened defect)

Opened 2 years ago

Last modified 16 months ago

Battery light flashes red on 100% charge

Reported by: tonyforster Owned by: pgf
Priority: normal Milestone: 12.1.0
Component: embedded controller Version: not specified
Keywords: Cc: rsmith
Action Needed: never set Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Twice now, once on OS883 and previously I think OS880, XO-1.5 in sleep mode is flashing the red battery light. Resuming from sleep does not clear the fault, neither does reboot. Have to remove the battery. 3 most recent power logs attached.

Attachments

pwr-SHC0160126E-120420_172112.csv Download (1.3 KB) - added by tonyforster 2 years ago.
pwr-SHC0160126E-120420_204711.csv Download (5.5 KB) - added by tonyforster 2 years ago.
pwr-SHC0160126E-120420_223354.csv Download (6.8 KB) - added by tonyforster 2 years ago.
pwr-130503-063417-35421314000000c2.csv Download (26.0 KB) - added by peasthope 17 months ago.
pwr-130502-220348-35421314000000c2.csv Download (35.2 KB) - added by peasthope 17 months ago.
pwr-130521-171903-35421314000000c2.csv Download (0.6 KB) - added by peasthope 17 months ago.
pwr-130522-054136-35421314000000c2.csv Download (5.6 KB) - added by peasthope 17 months ago.

Change History

Changed 2 years ago by tonyforster

Changed 2 years ago by tonyforster

Changed 2 years ago by tonyforster

follow-up: ↓ 2   Changed 2 years ago by dsd

  • owner set to pgf
  • cc rsmith added
  • component changed from not assigned to embedded controller
  • milestone changed from Not Triaged to 12.1.0

in reply to: ↑ 1 ; follow-up: ↓ 6   Changed 2 years ago by rsmith

Next time it happens please:

cat /sys/class/power_supply/olpc-battery/error

and report back what error number it is.

You are correct that the only way to clear the battery error is by removing the battery. On error all battery operations are halted.

  Changed 2 years ago by pgf

tony -- have you seen this again, with that battery, or any other?

can you remember specifics? the logs don't imply that the battery was depleted -- is that your recollection? i'm wondering if there's anything i can do to try and reproduce.

  Changed 2 years ago by tonyforster

  • status changed from new to closed
  • resolution set to worksforme

No it has not happened again. Looks like it was some random thing now. I opened this ticket incase it was a fault introduced by new software/firmware and the log gave som insight. I am closing this ticket. Will reopen if it happens again. Thanks.

  Changed 2 years ago by tonyforster

sorry, forgot to answer your question, my recollection is that the battery was not depleted

in reply to: ↑ 2 ; follow-up: ↓ 7   Changed 18 months ago by peasthope

  • status changed from closed to reopened
  • resolution worksforme deleted

Replying to rsmith:

cat /sys/class/power_supply/olpc-battery/error and report back what error number it is.

0
Indicating no error? But the error is easily replicated.

Install the Fluendo decoder. Save an mp3 audio to your machine. My instance is an episode of Quirks & Quarks.  http://www.cbc.ca/quirks/ Another format might be just as effective.

At bedtime, connect the machine to external power and double click on the icon for the sound file. Totem should begin producing sound. Turn on Edit > Repeat Mode. Check that the audio is repeated. Turn off the screen illumination by pressing the button in the top row of the keyboard. Set the audio volume low enough to not disturb sleep. Sleep. Next morning the red light is probably flashing. Shut the system down. Remove the battery for a few seconds and replace it. The light will be yellow indicating charging. After a few minutes the light will turn green indicating the fully charged state. This is a 1.5 running 12.1.0, Build 21, firmware Q3C07. Ref.  http://wiki.laptop.org/go/What_release_am_I_running%3F .

Regards, ... Peter E.

in reply to: ↑ 6 ; follow-ups: ↓ 8 ↓ 9   Changed 18 months ago by rsmith

Replying to peasthope:

Replying to rsmith:

cat /sys/class/power_supply/olpc-battery/error and report back what error number it is.

0

Did you do this while the led was flashing? You can also reboot to OFW and do watch-battery and then press a key to exit. watch-battery will tell you the error on exit (if it still exists). The led should stay flashing until you remove the battery or reset the EC.

system down. Remove the battery for a few seconds and replace it. The light will be yellow indicating charging. After a few minutes the light will turn green indicating the fully charged state.

What state is the battery in when you plug it up?

Please attach your power log(s).

Also if you can duplicate this easily then in a terminal please run olpc-pwr-log before you do your test and just let it log. olpc-pwr-log records most of the same thing as what is in your power log but it logs every 20 seconds.

in reply to: ↑ 7   Changed 18 months ago by peasthope

Replying to rsmith:

Also if you can duplicate this easily then in a terminal please run olpc-pwr-log before you do your test and just let it log. olpc-pwr-log records most of the same thing as what is in your power log but it logs every 20 seconds.

Will supply the pwr-log a.s.a.p.

... Peter E.

in reply to: ↑ 7 ; follow-up: ↓ 10   Changed 17 months ago by peasthope

Replying to rsmith:

Did you do this while the led was flashing?

No. Forget the 0 error. It was after removing and inserting the battery.

What state is the battery in when you plug it up?

Almost fully charged.

Please attach your power log(s). Also if you can duplicate this easily then in a terminal please run olpc-pwr-log before you do your test and just let it log. olpc-pwr-log records most of the same thing as what is in your power log but it logs every 20 seconds.

The sequence leading to flashing red has a few more steps than described originally. Start the sound application and leave it running. Unplug external power. Eventually the system shuts down automatically but I have yet to witness the automatic shutdown. Later, when finding the system down, plug in external power and restart it. Then in some cases the red light will be flashing. To stop the flashing red, shut down, cycle the battery and start up. With external power connected the light will change from yellow to green after 5-10 minutes.

[olpc@xo-53-1d-bb ~]$ cat /sys/class/power_supply/olpc-battery/error
12
[olpc@xo-53-1d-bb ~]$ olpc-pwr-log
Checking/waiting for a battery
Found one.
Reading eeprom data.
Starting log pwr-130428-051813-35421314000000c2.csv

1367126294,100,7485920,163541,3417,13652916,Charging,0,0
1367126294,100,7485920,163541,3417,13652916,Charging,0,0
1367126386,100,7485920,163541,3417,13652916,Charging,0,1
1367126407,100,7485920,163541,3417,13652916,Charging,0,1
1367131372,100,7485920,163541,3417,13652916,Charging,0,84
1367131392,100,7485920,163541,3417,13652916,Charging,0,84
1367131498,100,7485920,163541,3417,13652916,Charging,0,86
1367131679,100,7485920,163541,3417,13652916,Charging,0,89
1367131787,100,7485920,163541,3417,13652916,Charging,0,91
1367131807,100,7485920,163541,3417,13652916,Charging,0,91
1367131827,100,7485920,163541,3417,13652916,Charging,0,92

Isn't logging suspended when the screen goes black after an idle time. I don't know what to call the state. Hibernation, suspended, quiescent? Is there a time stamp encoded in the log?

Wouldn't automatic shutdown before the red light be preferable to shutdown after the flashing red has begun?

Regards, ... Peter E.

in reply to: ↑ 9 ; follow-up: ↓ 11   Changed 17 months ago by rsmith

Replying to peasthope:

 [olpc@xo-53-1d-bb ~]$ cat /sys/class/power_supply/olpc-battery/error
 12

Error 12 is no voltage change error. Meaning that the voltage stayed the same for > 4 minutes. Its possible your battery is just going bad. You should establish a baseline by doing the following.

Charge battery
then in terminal do:
- Stop powerd. 'sudo service powerd stop'
- run olpc-pwr-log unplug external power and let it run until it powers off.

Then remove battery and re-connect power and boot back up to terminal and

- Stop powerd. 'sudo service powerd stop'
- run olpc-pwr-log
- insert battery 

Once the battery had charged back up attach both of the power logs.

> Isn't logging suspended when the screen goes black after an idle time. I don't know what to call the state. Hibernation, suspended, quiescent?

You said you were running an audio app playing a .wav file in repeat mode. I assumed that was to prevent suspend. Yes the logging would be suspended if the XO goes into suspend.

In any case the above baseline won't suspend and will most likely show whats going on.

Is there a time stamp encoded in the log?

Yes.

Wouldn't automatic shutdown before the red light be preferable to shutdown after the flashing red has begun?

Automatic shutdown occurs when energy level of the battery drops to a level where hard power off is minutes away. The red led comes on any time the remaining capacity is < 10% which is quite a ways from automatic shutdown.

Flashing red is an error. If you have a flashing red then the battery system has halted. Depending on what the error is nothing else in the battery system may be valid.

Changed 17 months ago by peasthope

Changed 17 months ago by peasthope

in reply to: ↑ 10 ; follow-up: ↓ 12   Changed 17 months ago by peasthope

Replying to rsmith:

Once the battery had charged back up attach both of the power logs.

Attached. Sorry for the reversed order.

Regards, ... Peter E.

in reply to: ↑ 11 ; follow-ups: ↓ 13 ↓ 19 ↓ 20   Changed 17 months ago by rsmith

Replying to peasthope:

Replying to rsmith:

Once the battery had charged back up attach both of the power logs.

Attached. Sorry for the reversed order.

Thanks. So your battery seems to be fine. A minor problem is that you are experiencing the "end of the rope" bug in the ACR register that was fixed in 1.75 and XO-4. I'll take a look at backporting that fix into 1.5 EC code.

The bug isn't the cause of your problems. I just means that the watt-hour measurement for the charging log won't be correct. The EC doesn't use that that value to determine full so its mostly harmless.

So now please duplicate the conditions that cause the flashing red and the quick yellow to green transition.

Its not clear in your earlier test if the laptop is suspending or not. For now just run your test as you have before but please run olpc-pwr-log first. Even if the laptop is suspending it will wake up on 1% battery SOC changes and log the results.

When you get a flashing red please follow this sequence:

Plug up external power and stop at OFW by pressing the esc key when you hear the startup sound. Then at the ofw 'ok' prompt run 'watch-battery' when watch-battery starts showing battery info (which won't be correct due to the errror) hit a key to exit 'watch-battery' it will then print out what the error is.

Make a note of the error and then remove all power from the laptop both external power and the battery. Then only connect up external power (no battery) boot the laptop up to terminal and stop powerd 'sudo service powerd stop' then run 'olpc-pwr-log'. It will wait for you to insert the battery.

Insert the battery and let it charge. Repeat this entire scenario until you capture the conditions where you see the very quick yellow to green change.

in reply to: ↑ 12   Changed 17 months ago by rsmith

Replying to rsmith:

Insert the battery and let it charge. Repeat this entire scenario until you capture the conditions where you see the very quick yellow to green change.

And then please attach all your logs indicating which ones resulted in flashing red and which ones have quick yellow to green. The first 2 blocks of numbers in the file name are date and time (time is in GMT) for example your last log file was run on 2013-05-02 at 22:03:48 GMT. That may help you to keep which one is which. You can also add a comment to the log file via olpc-pwr-log by giving it a argument

olpc-pwr-log "Discharge run 1"

That adds "Discharge run 1" into the COMMENT: section of the log. The quotes are required if the string has spaces in it. You won't know ahead of time on the discharge run but for the charging run you know if you had a red blinking led prior.

follow-ups: ↓ 15 ↓ 18   Changed 17 months ago by peasthope

So now please duplicate the conditions that cause the flashing red ,

The phenomenon isn't as routinely duplicated as I indicated originally. What if olpc-pwr-log is started from profile or bashrc at startup?

Thanks, ...Peter E.

in reply to: ↑ 14 ; follow-up: ↓ 16   Changed 17 months ago by rsmith

Replying to peasthope:

So now please duplicate the conditions that cause the flashing red ,

The phenomenon isn't as routinely duplicated as I indicated originally. What if olpc-pwr-log is started from profile or bashrc at startup?

Sure. No problem. If you do that you may want to grab the latest olpc-pwr-log from  http://dev.laptop.org/~rsmith/pwr_scripts/olpc-pwr-log . Somewhere I added a bit of state tracking so that if the battery is full it does not continue to log but I don't remember at what stage I did that.

in reply to: ↑ 15 ; follow-up: ↓ 17   Changed 17 months ago by peasthope

Replying to rsmith:

... grab the latest olpc-pwr-log from  http://dev.laptop.org/~rsmith/pwr_scripts/olpc-pwr-log .

The one you cite contains VERSION="2.0.5".

The olpc-pwr-log in 12.1.0 contains VERSION="2.1.0".

Do you have a still later version? Could you have revised but not put the latest on the server? I'll wait for your latest version before starting automated logging.

Thanks, ... Peter E.

in reply to: ↑ 16   Changed 17 months ago by rsmith

The olpc-pwr-log in 12.1.0 contains VERSION="2.1.0". Do you have a still later version? Could you have revised but not put the latest on the server? I'll wait for your latest version before starting automated logging.

Oops. Sorry about that. Thanks for checking. 2.1.0 is the latest. I've updated whats on dev.l.o

in reply to: ↑ 14   Changed 17 months ago by peasthope

Replying to peasthope:

What if olpc-pwr-log is started from profile or bashrc at startup?

Adding "olp-pwr-log" as the last line in .bash_profile doesn't work. It works from .bashrc but I'm not familiar with the intricacies. Is .bashrc the right place? Should the command be "olpc-pwr-log" or "olpc-pwr-log &" or "exec olpc-pwr-log" or "nohup olpc-pwr-log </dev/null >> ~/pwr-log-errors 2>&1 &" or something worse?

Thanks, ... Peter E.

in reply to: ↑ 12 ; follow-up: ↓ 24   Changed 17 months ago by peasthope

Replying to rsmith:

Its not clear in your earlier test if the laptop is suspending or not. For now just run your test as you have before but please run olpc-pwr-log first. Even if the laptop is suspending it will wake up on 1% battery SOC changes and log the results. When you get a flashing red ...

OK, flashing red this morning. The screen is dark but pointer or keyboard input wakes it. The log started running last evening, is dated 130521 and is attached.

... please follow this sequence: Plug up external power and stop at OFW by pressing the esc key when you hear the startup sound. Then at the ofw 'ok' prompt run 'watch-battery' ...

ok watch-battery
AC:on Battery:BYD LiFePO4 100% 7.47V 0.17A 33C error charging MPPT

Make a note of the error and then remove all power from the laptop both external power and the battery. Then only connect up external power (no battery) boot the laptop up to terminal and stop powerd 'sudo service powerd stop' then run 'olpc-pwr-log'. It will wait for you to insert the battery. Insert the battery and let it charge.

Yellow switched to green not immediately but after minutes. I was busy and didn't watch. The log started this morning, dated 130522 and is also attached.

Repeat this entire scenario until you capture the conditions where you see the very quick yellow to green change.

If another trial will help, let me know.

Regards, ... Peter E.

Changed 17 months ago by peasthope

Changed 17 months ago by peasthope

in reply to: ↑ 12 ; follow-up: ↓ 21   Changed 16 months ago by peasthope

Replying to rsmith:

Repeat this entire scenario until you capture the conditions where you see the very quick yellow to green change.

By "very quick" do you you mean only a second or two from reconnecting power until the light switches to green? In my system, the transition to green is always after several minutes; I'd guess about 10 minutes but can time it,

Regards, ... Peter E.

in reply to: ↑ 20 ; follow-up: ↓ 22   Changed 16 months ago by rsmith

Replying to peasthope:

Replying to rsmith:

Repeat this entire scenario until you capture the conditions where you see the very quick yellow to green change.

By "very quick" do you you mean only a second or two from reconnecting power until the light switches to green? In my system, the transition to green is always after several minutes; I'd guess about 10 minutes but can time it,

Hi... Sorry I've not been very responsive. I've been away on vacation. Things a bit chaotic for me at the moment but I'll try to analyze the logs you put up soon.

The 10 minute one is the one I'm interested in. That scenario is possible if for some reason the battery is very close to full and its just getting topped off but should not happen after an overnight discharge like you are talking about.

Did you solve the olpc-pwr-log on start up problems? You should be able to start it from your .bashrc with olpc-pwr-log > /dev/null &

in reply to: ↑ 21 ; follow-up: ↓ 23   Changed 16 months ago by rsmith

The 10 minute one is the one I'm interested in.

Clarification. I'm interested in all the logs that show odd things happening. :)

in reply to: ↑ 22   Changed 16 months ago by peasthope

Did you solve the olpc-pwr-log on start up problems?

Solved, yes. When logging is automated I don't miss an interesting case.

Replying to rsmith:

The 10 minute one is the one I'm interested in.

Clarification. I'm interested in all the logs that show odd things happening. :)

Have a look at the latest two and then you can let me know the next step.

in reply to: ↑ 19   Changed 16 months ago by rsmith

Replying to peasthope:

When you get a flashing red ...

OK, flashing red this morning. The screen is dark but pointer or keyboard input wakes it. The log started running last evening, is dated 130521 and is attached.

Sadly 130521 isn't very useful. It only has 3 lines of data in it. Odd since even if the laptop was suspended the 1% battery ticks should have woken up the system an eventually caused it to log more readings.

... please follow this sequence: Plug up external power and stop at OFW by pressing the esc key when you hear the startup sound. Then at the ofw 'ok' prompt run 'watch-battery' ...

You didn't quite do enough. The error is printed when watch-battery _exits_. Thats what I want. After you run watch-battery hit a key to make it stop and then see what error it prints.

Make a note of the error and then remove all power from the laptop both external power and the battery. Then only connect up external power (no battery) boot the laptop up to terminal and stop powerd 'sudo service powerd stop' then run 'olpc-pwr-log'. It will wait for you to insert the battery. Insert the battery and let it charge.

Yellow switched to green not immediately but after minutes. I was busy and didn't watch. The log started this morning, dated 130522 and is also attached.

If 130522 really is the log resulting from the above procedure then it indicates that not very much of your battery was discharged before power was connected. 130522 shows a charging profile of a battery that was very close to full. Nothing unusual. I don't see how that could be the case if the XO was powered up all night. Something doesn't match.

Lets fix your ACR register though so we get good ACR readings. Yours has run up to the limit where it stop. Please do the following at the ok prompt.

ok 0 bg-acr!

Then remove all power and continue on as normal.

I guess I still need more data since I don't see anything that would cause a red flash yet. Once you actually get the error from the watch-battery exit then that will give me more to go on.

Note: See TracTickets for help on using tickets.