Is it possible to wake the Jetson Nano after having halted it (other than plugging in and out USB power cable)?
When you do sudo halt on a Raspberry Pi it actually essentially reboots except that on reboot the bootloader prevents the boot-up process from continuing unless it sees GPIO3 pulled low.
The sudo halt squirrels away a volatile magic value that the bootloader can read on startup. If the system wasn’t stopped this way or the Pi was power cycled (and so lost the magic value) then the bootloader lets the full boot process run thru.
However, if the bootloader does see this magic value it puts the board into a low power sleep mode from which it can be woken be pulling GPIO3 low.
So is there any similar functionality on the Jetson Nano board?
I can’t find any good reference for the Raspberry Pi behavior - but it seems to be well known, e.g. it’s described in this Github comment by a Kodi developer.
Hi,
We don’t have experience of using ‘sudo halt’. Could you share more information about the function? It seems software controls hardware pin GPIO3 on Raspberry Pi. If we would like to run it on Nano, maybe we have to configure it to designate pin?
I believe the use of ‘halt’ is system specific. In the case of Solaris, issuing a ‘halt’ command takes the system to the ‘ok’ boot prompt.
However, with the Jetson Nano, issuing halt causes a Dump for CPU0 and takes the system to a ‘debug’ prompt. If there is no entry from the console it will bring the system back up again.
Using a FTDI to USB serial cable connected to J44, this is what is seen on the console after issuing ‘sudo halt’.
NOTE: Typing exit will cause the system to reboot again.
Sorry for the confusion - I thought halt and shutdown now / poweroff were synonymous - they are on some systems. But as Jonny Move points out the behavior is system specific.
So I actually just meant is it possible to wake the system from the state it enters when you shut it down via the command line, e.g. with sudo shutdown now?
halt, poweroff, reboot and shutdown are all soft links to /sbin/systemctl which invokes different behavior depending on the name with which it was invoked.
I’m guessing poweroff and reboot are identical as far as the shutdown process is concerned, so I’m interested in the point in the process where one of the two decides to continue on into booting up again and the other decides to enter a powered but unresponsive state.
Is it possible to wake it from this unresponsive state? As noted in my original message it is possible with the Pi - you just pull the GPIO3 pin low.
Maybe first it would be interesting to find out in what exact state the Nano is in when you’ve done shutdown? On the Pi the bootloader has pushed it into an extremely low power situation (from which it can be woken as described).
Note that systemd-halt.service (and the related units) should never be executed directly.
Instead, trigger system shutdown with a command such as "systemctl halt" or suchlike
Also, from the link you reference, this question seems to be specific to Windows 10 IoT and thus is not OS specific. Also, as is mentioned in the post you listed, the behavior on the RasPi is implemented in the bootcode.bin firmware which is where the 10 LED blinks before shutdown comes from.
Also, I have seen with the RasPi where something like the MATRIX Creator will auto boot the Pi when shutdown even if you issue a ‘shutdown -h’ but I am not sure if it something they had implemented in their hardware or a driver they load.
The eLinux wake on halt behavior is exactly what I’m talking about.
Shorting pin 6 (ground) to pin 5 (GPIO3) pulls GPIO3 low and brings the Pi out of the deep sleep mode into which it was placed by the bootloader (this is implemented in the bootcode.bin firmware that you mention).
OK - so now we’re clear that this behavior exists for the Pi.
So all I’m asking is - is their similar functionality on the Jetson Nano development board?
If you’re building the board into a robot or such like it can be convenient to be able to wake up the board, in this kind of way, if it’s been shutdown without having to somehow cycle the power.
Thanks for the reply bbasu. But don’t actually want to resume a previous state - either via hibernate or resume.
When I say “wake” I simply mean I want to get the system out of the inactive state it reaches on doing a shutdown.
When I’ve shutdown my Nano the board is still powered, i.e. the USB power supply is still connected.
It seems odd to me that the only apparent way to then power up the system is to first actively remove power, i.e. disconnect the USB power cable, before reconnecting it.
It would be interesting to know what changes in the state of the board as a result of having the power disconnected, such that when it is reconnected it doesn’t just reenter the same inactive state but instead boots up.
Maybe it’s possible to achieve this same state change without disconnecting the USB power cable.
On various computer systems that I own the power button doesn’t simply cycle the power - it generally does nothing if pressed while the computer is running (though typically one can hold it depressed for several seconds to force a power down), but if pressed after a shutdown it causes the system to boot.
So this question is all about whether it’s possible to implement something similar with the Nano? As discussed, it is with some other SBCs - on the Pi for example pulling GPIO3 low will do this (shorting ground and pin 5).
Thanks jonnymovo - that was exactly the information I was looking for.
I just got things working as I wanted and can confirm that the J40 header enables access to the functionality I was looking for.
I wrote up my experiences in some more detail here.
I haven’t been been a member here long enough that I can use the img tag - but you can see one of the pictures from my write up here, showing the Nano connected to a push button that will startup the system when pressed.