Coomand line shutdown -r or reboot doesn't work

Started by David Goadby, November 10, 2012, 03:28:47 AM

Previous topic - Next topic

David Goadby

After some configuration changes on A13 Debian I executed "shutdown -r now". The system did shutdown but did not restart again; I had to use the reset button instead.

Looking at the messages log there is an entry: "shutting down for system reboot" so, at some point my reboot intentions were accepted.

I did try the command and left the system for 10 minutes in case the watchdog might pick this up but I don't think the watchdog is operational at this time.

Any idea why the restart never occurs?

TranceTrouble


David Goadby

I tried <reboot> and that doesn't work either - it just shuts down the processor. I also tried <poweroff> and the end result was the same. This is not surprising since <halt>, <reboot> and <poweroff> are all really <halt> anyway.

In both cases to restart the system after the "shutdown" I have to press the reset button not power so the board is not powered off it seems.

The question is what state is the board in after <reboot> or <poweroff>? Is it in some form of hibernation? The USB network dongle LED goes off so it is it just halted/paused?

Providing the system state is ok to change the SD card or plug in a USB device then, for me, a complete software controlled power-off is not a deal breaker. The ability to reset correctly using <reboot> or <shutdown -r now> is more important as I might be 2000 miles away and unable to reach the reset button. Since currently we don't have a working watchdog (subject of another post) then I need to crack this problem with a reliable solution.

Update:

Just once, the <reboot> command did work for me. I need to reproduce the conditions but it seems there is an interaction going on somewhere with a file or a part of the A13. Once we understand this I think a workaround or permanent solution ought to be possible.

If it helps I am using the A13-wifi with USB keyboard and mouse with Olimex USB network dongle and Olimex supplied Debian Linux. Nothing else is attached to the A13 and no extra software has been downloaded.


richardg


David Goadby

My version of <shutdown> does not have the -m option.


David Goadby

mmmm, shutting down without syncing data seems a bit extreme and might leave the SD card corrupted. The command option is only allowed with halt or reboot.

Anyway, with a spare SD card to hand, I tried <reboot -n> to see what happens. The result is just a "shutdown" which requires a press of the reset button to restart.

I quoted shutdown as the actual state of the system is not clear to me. The Ethernet dongle LED is off and just the single power LED is lit. Is this actually powered off or some form of suspended state? If powered off then why does reset restart it rather than power?

I'm going to try my other system with a fresh SD card to see if this is a one-off or normal response.

anubis

Similar issues with A13-Olinuxino Rev.C  using different images and kernels.

Reboot command works time to time (~50/50).

When it won't reboot last dmesg lines are:

==========
* Will now restart
<6>[sw-ohci1]: shutdown start
[sw-ohci1]: close clock
<6>[sw-ohci1]: shutdown end
<6>[sw-ehci1]: shutdown start
[sw-ehci1]: Set USB Power OFF
[sw-ehci1]: close clock
<6>[sw-ehci1]: shutdown end
[sw_hcd0]: sw_hcd shutdown start
[sw_hcd_host0]: Set USB Power OFF
[sw_hcd0]: sw_hcd shutdown end
<0>Restarting system.
[  346.790000] Restarting system.
==========

... and hangs.


Somebody knows how to fix it?
This problem makes board useless for industrial applications till fixed.


jwischka

I know you've said "different images and kernels" but can you list which ones?

Quote from: anubis on March 22, 2013, 02:54:27 AM
Similar issues with A13-Olinuxino Rev.C  using different images and kernels.

Reboot command works time to time (~50/50).

When it won't reboot last dmesg lines are:

==========
* Will now restart
<6>[sw-ohci1]: shutdown start
[sw-ohci1]: close clock
<6>[sw-ohci1]: shutdown end
<6>[sw-ehci1]: shutdown start
[sw-ehci1]: Set USB Power OFF
[sw-ehci1]: close clock
<6>[sw-ehci1]: shutdown end
[sw_hcd0]: sw_hcd shutdown start
[sw_hcd_host0]: Set USB Power OFF
[sw_hcd0]: sw_hcd shutdown end
<0>Restarting system.
[  346.790000] Restarting system.
==========

... and hangs.


Somebody knows how to fix it?
This problem makes board useless for industrial applications till fixed.

BJFreeman

on the schematic the axp209 has the  poweron/off on pin47 so one of the Gpios needs to send a pulse to this pin during shutdown sequence.
there is suppose to be a PWR_But on the board also but I can't locate it.
Fulltimer since 89

JohnS

On my WiFi board PWR_BUT is by the power jack and labelled PWR_BUT.

John

BJFreeman

Fulltimer since 89

anubis

Just tested all public Images.

Problem is reproduced on all 3.4.29 kernel images only:

3.4.29-jwischka-3.4-video-20130308-R18+
3.4.29-kickstart-anubis-R1+



nvd

I am having the issue with "3.0.57+" as well.

Has anyone looked into the driver of AXP209.

I am looking into the source, finding out how does it toggle "PWROK" to reset the uP.

JohnS

I can't even get my board to reboot reliably from uboot!  (Using its reset command.)

Looking at the code it relies on the chip's watchdog to reset the system.

John