BeagleBone Black powers down when AC adapter is removed while the USB is connected.

I am trying to manage power myself including battery backup, however if I have USB power and AC adapter power whenever I disconnect the AC power, the system shuts down shortly after. I would like to manage the shutdown myself.
Can anyone tell me how to disable the default control

Thanks

As far as I know, it shouldn’t do that.

The USB should provide power if the AC (+5v) is removed.

What else is connected to the BBB ?

“No one could make a greater mistake than he who did nothing because he could do only a little.”

“All that is necessary for the triumph of evil is that good men do nothing” Edmond Burke (1729 - 1797)

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

As far as I know, it shouldn’t do that.

The USB should provide power if the AC (+5v) is removed.

What else is connected to the BBB ?

I have a cape with a lithium battery, a serial port talking to a wireless gateway which is powered from the AC input also and an ethernet cable to the BBB nothing else, the battery is connected to the charging circuit of the PMIC.
I have two BBB which both do the same

As far as I know, it shouldn’t do that.

The USB should provide power if the AC (+5v) is removed.

What else is connected to the BBB ?

I have a cape with a lithium battery, a serial port talking to a wireless gateway which is powered from the AC input also and an ethernet cable to the BBB nothing else, the battery is connected to the charging circuit of the PMIC.
I have two BBB which both do the same

I just tried the same thing without the cape and the same thing happens so all that is connected to the BBB is AC, USB and ethernet. uname -a gives “Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux”

unplug the ethernet. some USB sources are unable to provide enough
power for everything.

Yeah, I doubt its the ethernet jack being plugged in and used. I have a TEMPER USB thermometer plugged in and running, plus ethernet, and USB networking.

There could be a service on these new images that monitors AC power, so that it issues a shutdown when this occurs. I know threre is at least “CTRL + ALT + DEL” key press combo “event” in /etc/inittab, but have not looked to see if there is anything else. There could also a a conditional systemd service potentially doing this.

in /etc/inittab

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

You need to do some google “research” and see if this is a potential issue for you.

There is a previous thread, several weeks ago about this same behavior. That thread involved an application that ran off mains but had battery backup and everytime mains failed, and 5V goes away, the BBB shutdown.

IIRC, this is a known software default behavior when the 5V goes away, it is programmable and needs to be set accordingly to how the end user whats it to behave.

-david
.

Hello,

I had a similar problem. David mentions perhaps this thread:

https://mail.google.com/mail/u/0/?tab=wm#inbox/149198bbf7826f64

Bremenpl suggested to use the debian console version instead of the LXDE version. It solved my problem.

We just encontered a 2 hours mains power outage this saterday.The BBB went on running flawless with the battery backup.

Michel

Interesting. Sounds like something I need to get fixed.

Gerald

Attn Gerald Coley,

Hello,
In order to avoid any misunderstanding, I wrote “I had a similar problem”. But I didn’t use the USB connection.
Only 5V DC and battery were connected to the BBB.
As soon as 5V DC PS was off, the Debian LXDE version was shutting down but a warning was appearing telling the user the system was shutting down within 60s if this procedure wasn’t canceled.
Maybe David Hirst’s problem is related to the same software “mecanism”.

Kind regards

Michel.

That should be bale to be fixed by changing the behavior of the SW. You can look at the datasheet for the TPS65217C to see what registers to change.

Gerald

The fact that it powers down is a problem to me, if for instance a slight power interruption occurs ( lets say 5 seconds) during which time the CPU is powered by the battery backup I would like to carry on running, if its longer then I would like to make the decision when to shutdown.
As it stands now I have no option but to have the system power down.
With the current implementation In the event of a small interruption, the system will start to power down but if that the power has now returned prior to the shutdown occurring the system needs intervention to power back up, by power cycling either the USB or AC. I want to smooth out short power cycles and let the long power outages re-power the board when the power returns

Then the SW needs to be changed to change that behavior.

Gerald

I guess a rebuild is in order, I did the same test with Debian and saw the same result, except that with Debian a message is posted to the console explaining that shutdown is occurring due to loss of AC power

in /drivers/mfd/tps65217.c i believe this is where the magic happens, and needs to be changed

if (int_reg & TPS65217_INT_PBI) {
/* Handle push button /
dev_dbg(tps->dev, “power button status change\n”);
input_report_key(tps->pwr_
but, KEY_POWER,
status_reg & TPS65217_STATUS_PB);
input_sync(tps->pwr_but);
}
if (int_reg & TPS65217_INT_ACI) {
/
Handle AC power status change */

I like this behaviour and thought I could use it to cleanly shutdown the bbb. I therefore connected a ‘powerbar’ usb battery to the usb otg port. Now when I remove the 5V (strangely called ac) I expect a clean shutdown on power delivered by my cheap ‘ups’. Only I find out that in /this/ case the bbb shutdown immediate instead of a clean shutdown!

So there seams to be a difference in connecting the otg usb to a pc or just to a powerbar.

Anyone who can explain this behaviour? In my quest to shutdown a bbb simple, cheap and clean.

There is a signal, on P9 I believe, called “power”.

If you pull this pin low with a pushbutton switch, you will get the clean shutdown you are looking for.

“No one could make a greater mistake than he who did nothing because he could do only a little.”

“All that is necessary for the triumph of evil is that good men do nothing” Edmond Burke (1729 - 1797)

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

http://ca.linkedin.com/pub/bill-pretty/2b/b07/602

Yes indeed, and that is a perfect way to shut down our baby. It’s another way of pressing the power button. Thing is you need another 10 sec. of shutdown power (to cleanly shutdown).

So I’m looking for the use case where somebody stupid (talking 'bout me) yanks the 5V and I still get a clean shutdown. We need external ‘ups’ power for that last 10 sec. of shutdown. Now I keep 5V always on. Till power company screws up. 64 million dollar question: how many times can power company screw up before bbb screws up?

Question remains why I get a unclean shutdow with me (the stupid one) feeding 5v to otg usb with powerbar and getting clean shutdown when connected to regular pc.

Call me stupid but the correct answer awaits tickets for the next frank zappa concert!

thx,
Michiel

Yes indeed, and that is a perfect way to shut down our baby. It's another
way of pressing the power button. Thing is you need another 10 sec. of
shutdown power (to cleanly shutdown).

That's possible with a backup supply, NIMH/NICD with a resistor to
charge and a diode to prevent overcharge, if you have a cutoff when
the batteries reach 1.1 volts, you're fine. I'd suggest a 1 farad
capacitor, but the BBB wants several hundred mills when running, and I
suspect that's a bit much.

So I'm looking for the use case where somebody stupid (talking 'bout me)
yanks the 5V and I still get a clean shutdown. We need external 'ups' power
for that last 10 sec. of shutdown. Now I keep 5V always on. Till power
company screws up. 64 million dollar question: how many times can power
company screw up before bbb screws up?

Ok, comparator and you shut down (gracefully) when the DC power goes
away. Problem is to determine that (if you're also battery
powered.... this is good....)

Question remains why I get a unclean shutdow with me (the stupid one)
feeding 5v to otg usb with powerbar and getting clean shutdown when
connected to regular pc.

May have to do with how the power is actually disconnected, clean off
vs make/break/make/break by disconnecting

Call me stupid but the correct answer awaits tickets for the next frank
zappa concert!

*or is that a *sears* poncho?*

Harvey