Sorry to revive an old thread but I wanted to add my solution to this
problem somewhere and this seems like the most appropriate place to do it.
I was also experiencing the Bone shutting itself down on AC Power removal
regardless of a battery present. The logs showed it was registering the
removal as a button press condition and powering down the unit. I had a
product running on 4.1.19-bone20 and did not want to update to a later
kernel but it appears to be resolved in later kernels already.
To fix on 4.1.19-bone20, I modified the file mentioned here
(/drivers/mfd/tps65217.c) and commented out this code entirely:
/*
if (int_reg & TPS65217_INT_ACI) {
/* Handle AC power status change
dev_dbg(tps->dev, "AC power status change\n");
/* Press KEY_POWER when AC not present
input_report_key(tps->pwr_but, KEY_POWER,
~status_reg & TPS65217_STATUS_ACPWR);
input_sync(tps->pwr_but);
}
*/
After I rebuilt and deployed the modified kernel, the problem was resolved,
no more power down on AC removal.
For anyone who needs further instructions, I'd be happy to help.
On Wednesday, November 19, 2014 at 10:12:05 AM UTC-5,
[email protected] wrote:
>
> 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 */
>
>
>
> On Tuesday, November 18, 2014 1:57:47 PM UTC-5, Gerald wrote:
>>
>> Then the SW needs to be changed to change that behavior.
>>
>> Gerald
>>
>>
>> On Tue, Nov 18, 2014 at 10:37 AM, David Hirst <[email protected]> wrote:
>>
>>> 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
>>>
>>>
>>> On Monday, November 17, 2014 10:04:21 AM UTC-5, Gerald wrote:
>>>>
>>>> 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
>>>>
>>>> On Mon, Nov 17, 2014 at 8:58 AM, Michel Gerin <[email protected]>
>>>> wrote:
>>>>
>>>>> 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.
>>>>>
>>>>>
>>>>> 2014-11-17 12:31 GMT+01:00 Gerald Coley <[email protected]>:
>>>>>
>>>>>> Interesting. Sounds like something I need to get fixed.
>>>>>>
>>>>>> Gerald
>>>>>>
>>>>>>
>>>>>> On Monday, November 17, 2014, Michel Gerin <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> 2014-11-17 1:09 GMT+01:00 David Funk <[email protected]>:
>>>>>>>
>>>>>>>> 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
>>>>>>>> .
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, Nov 16, 2014 at 5:52 PM, William Hermans <[email protected]
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> in /etc/inittab
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *# What to do when the power
>>>>>>>>> fails/returns.pf::powerwait:/etc/init.d/powerfail
>>>>>>>>> startpn::powerfailnow:/etc/init.d/powerfail
>>>>>>>>> nowpo::powerokwait:/etc/init.d/powerfail stop*
>>>>>>>>>
>>>>>>>>> You need to do some google "research" and see if this is a
>>>>>>>>> potential issue for you.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sun, Nov 16, 2014 at 4:49 PM, William Hermans <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> 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.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> For more options, visit http://beagleboard.org/discuss
>>>>>>>>> ---
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "BeagleBoard" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> For more options, visit http://beagleboard.org/discuss
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "BeagleBoard" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> For more options, visit http://beagleboard.org/discuss
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "BeagleBoard" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Gerald
>>>>>>
>>>>>> [email protected]
>>>>>> http://beagleboard.org/
>>>>>> http://circuitco.com/support/
>>>>>>
>>>>>> --
>>>>>> For more options, visit http://beagleboard.org/discuss
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "BeagleBoard" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>>> For more options, visit http://beagleboard.org/discuss
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "BeagleBoard" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Gerald
>>>>
>>>> [email protected]
>>>> http://beagleboard.org/
>>>> http://circuitco.com/support/
>>>>
>>> --
>>> For more options, visit http://beagleboard.org/discuss
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Gerald
>>
>> [email protected]
>> http://beagleboard.org/
>> http://circuitco.com/support/
>>
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/6407bc5c-17dd-4c4f-8ac6-5ca6cb3ee531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.