Incomplete Shutdown/Halt

Started by martinayotte, April 09, 2014, 06:44:15 PM

Previous topic - Next topic

martinayotte

I have purchase some LiPo recently and plug them on my different Debian A20 boards.
But I discovered that boards can't be shutdown/halt anymore ...
If I execute "halt" command, it start sequence but simply reboot at the end of the shutdown.
I've unplugged LiPo on one of them, plug the TTY debug and I see the following message at the end of the shutdown process, while the Red led was still powered :

BUG: scheduling while atomic: halt/2690/0x00000002

Any ideas ?

UPDATE : I found this old thread, https://www.olimex.com/forum/index.php?topic=2409.0, I think we are due for a new A20 image ...

martinayotte

#1
I've compile an new kernel 3.4.79+, but unfortunately, it doesn't seems to be resolved ...

Here is what can be seen on debug-tty during last phase of the shutdown :

<6>[sw-ehci1]: shutdown end
[   37.863812] [sw-ehci1]: shutdown end
<0>Power down.
[   38.880768] Power down.
<6>[hotplug]: cpu(0) try to kill cpu(1)
[   38.886805] [hotplug]: cpu(0) try to kill cpu(1)
<3>[hotplug]: try to kill cpu:1 failed!
[   41.043843] [hotplug]: try to kill cpu:1 failed!
[axp] send power-off command!
[   41.053400] [axp] send power-off command!
[axp] set flag!
[   41.099636] [axp] set flag!
[axp] reboot!
[   41.144067] [axp] reboot!

So, there is something wrong in the AXP driver ...  :(

UPDATE : I found also this thread, https://www.olimex.com/forum/index.php?topic=2377.0, but How to Shutdown if both power are there ?


splite

Hey,

I'm having the same issue.
When AC and LiPo are pluged in, the board is rebooting when typing shutdown -h -t 1 now or halt. When only LiPo pluged in the board is able to shutdown correctly.

@martinayotte did you manage something ?

Thank

JohnS

There are more posts about this and someone recently mentioned a fix that was posted on the linux-sunxi list, involving axp20_poweroff() (or some such).

John

splite

Hey JohnS


Talking about this one https://www.olimex.com/forum/index.php?topic=4207.0, It might be me...

I was running into a strange behavior, the board was running by itself when the DC power was plugged in.

Now the board don't want to halt by itself, it is always rebooting except when the lipo is plugged in and AC unplugged.

This is really tricky to tweak this AXP209...

I still can't find a good solution

splite

Well, I think I found the solution https://lists.debian.org/debian-kernel/2015/03/msg00365.html which does need to recompile the whole kernel :( Bad news !