Reduction of power during graceful shutdown of Jetson Xavier/ Nano

Hello Support,

We are working on backup system of Jetson Xavier/ Nano in our custom board for graceful shutdown during sudden power loss. As per datasheet, peak power of Jetson Xavier/ Nano is 15W/ 10W respectively. Some questions,

  1. Do Xavier/ Nano consume peak power during shutdown process? If not then what is approx % of peak power they are consuming during this process. Of course, we will measure it practically but some theoretical worst case figures will be helpful if know the answers.

  2. Any suggestions to reduce power consumption during shutdown process will be helpful, i.e what could be done as first thing after receiving shutdown signal so as to reduce power consumption during that process.

Regards,
jagdish

If nvpmodel is set to enable consuming more power, then you could use nvpmodel to run a low energy model prior to shutdown. I have no idea if something would be triggered in high power mode which might consume more power during shutdown, but if your nvpmodel is set to a low power mode prior to shutdown, then this should be honored. Just don’t “save” the low power mode and keep your desired running mode for the default of “nvpmodel”.

OK, we can set nvpmodel to low power mode once we detect power fail.
Any more comments from other contributors which are going to be helpful?

hello jagdish.karamchandani,

may I have more details about your use-case?
please access Xavier NX Product Design Guide, and review [Figure 5-3] and [Figure 5-4] for the power-down sequence.
thanks

Hello Jerry,
We are designing backup power to support graceful shutdown of Jetson Nano/ Xavier. I have already gone through the details send by you. We plan to detect mains failure through suitable circuit & once failure is detected we will assert shutdown signal. Now to support 10s of shutdown period we need suitable backup solution. In order to reduce size of energy storage components, I was thinking to reduce power consumption (as low as possible) during shutdown to provide solution with minimum size. So I was trying to explore power consumption figures during shutdown period as well as try to know any commands/ methods to reduce power consumption.

I hope this helps.

Hello Jerry,
Any suggestions after providing details.

Regards,
jagdish

@jagdish.karamchandani
Do you want to trigger SHUTDOWN_REQ signal in case of sudden power loss?

Yes correct, we want to trigger shutdown on sudden field power loss.

hello jagdish.karamchandani,

please have confirmation, is this actually 10-second, or, the time period is 10ms.
thanks

Hello Jerry,
Yes, this is 10s which is shutdown time required for Jetson Nano/ Xavier, as informed from NVIDIA support community.

Regards,
jagdish

Hello Jerry,

Any further suggestions on this after knowing the shutdown time.
Regards,
jagdish

hello jagdish.karamchandani,

where did you read this. could you please share the linkage for reference?

things are still confused.
did you mean press power button for 10-second to shutdown the board?
or,
you would like to trigger software commands to shutdown the board when you unplugs the battery?

Hello Jerry,
10s is shutdown time of Jetson Nano as advised on this community, please see the reference,

Yes, we would like to trigger software command on getting power loss signal.

Regards,
jagdish

hello jagdish.karamchandani,

due to power loss may happen anytime,
may I have more details about using software commands to achieve this. why don’t use hardware based shutdown.
thanks

Hello Jerry,

I think all needed details information has been given to you. Please advise do you have any comments on reduction of power during shutdown irrespective the way we are triggering it. If we face trigger related issues, I shall come up in separate thread later but as of now do you have more suggestion apart from linuxdev.

Regards,
jagdish

hello jagdish.karamchandani,

we don’t have an estimation for this power,
it should be less than Supported Modes and Power Efficiency shown in the documentation.
thanks

It isn’t exactly what you are asking for, but you might be interested in changing how shutdown proceeds rather than minimizing power during shutdown. Are you familiar with “Magic SysRq”? This was really intended for developers, but could also help during automatic “expedited” shutdown.

Normally what this would do is allow certain hot key combinations to exert various emergency system control tasks. An example is calling sync, and this would work even on systems which are locked up (beware that calling sync when not needed in solid state memory would shorten the life of that memory, but shutdown has to call sync anyway). If you were to monitor “dmesg --follow”, and hit the key combination “ALT+SYSRQ+s”, then you’d see a note about emergency sync (it does require sysrq to be enabled, but most of the time this is enabled by default).

Another magic sysrq is to kill all applications other than init, and another to set up the filesystem as read-only. A possibly useful combination would be to (A) call sync, (B) kill all non-essential programs (they wouldn’t get to save any results), (C) sync the filesystem again, (D) set the filesystem to read-only, and (E) force shutdown or reboot (an immediate force, not a graceful shutdown, but since you are already read-only, then only the data from killed running programs would be lost).

You’re probably thinking this isn’t useful since you’re not there to produce the right keystrokes. However, this is also used for remote debugging over serial console, and anything enabled for sysrq keystrokes can be used with an echo and redirect to file “/proc/sysrq-trigger”. This allows remote debugging of the Linux kernel to do things like halt the kernel, set break points, and then continue the debugger running the Linux kernel itself. You are not debugging, but a series of echo of characters to that file could conceivably provide an emergency shutdown which would not corrupt the filesystem.

On a typical system (not just a Jetson) running Linux, if I’ve done something to lock up the system I will usually “ALT-SYSRQ-s” to sync, then “ALT-SYSRQ-u” to remount the filesystem read-only, followed by “ALT-SYSRQ-b” to force immediate reboot.

The file normally used to modify the availability of sysrq is “/etc/sysctl.conf”. There is a parameter in this such as:
kernel.sysrq=1

Sysrq enable is based on a bitwise mask. Not all sysrq function is valid on all architectures, and so everything possible might use a mask of other than 1. There are other ways of enabling this as well, and so even if the parameter is commented out in “/etc/sysctl.conf”, then the feature could still be enabled. I suggest monitoring “dmesg --follow” and trying “ALT-SYSRQ-s” to see if an emergency sync message shows up.

A way to see what is currently allowed in the sysrq mask:
cat /proc/sys/kernel/sysrq

An example of using an echo of a character instead of a hot key to call sync:
sudo echo 's' > /proc/sysrq-trigger

I think it is a difficult and complicated task try to alter the entire operating system to try to run in a lower power mode in some real time performance prior to emergency shutdown. Killing applications and sync prior to switch to read-only mode would save the system against corruption, but if you are looking to also shut down individual programs gracefully, then going to a low power mode is going to likely leave you unsatisfied with the results. You would either have to have some sort of backup power which allows graceful shutdown, or else accept running programs are going to die without saving their data.

Hello Linuxdev,
Thanks for this information & appreciate your detailed response. This can surely help us.