Putting the BeagleBone to sleep, and waking it up

Hi!

I want to use my BeagleBone to do some measurements at a remote location, running on battery power.
Several places tell me that I can put it into sleep mode using “echo mem > /sys/power/state”, but this
fails, as if the USB subsystem is busy:
[14140.644681] PM: Syncing filesystems … done.
[14140.650269] PM: Preparing system for mem sleep
[14140.663425] Freezing user space processes … (elapsed 0.01 seconds) done.
[14140.675773] Freezing remaining freezable tasks … (elapsed 0.01 seconds) done.
[14140.695735] PM: Entering mem sleep
[14140.695813] Suspending console(s) (use no_console_suspend to debug)
[14140.701010] pm_op(): usb_dev_suspend+0x1/0xa returns -16
[14140.701062] PM: Device usb1 failed to suspend async: error -16
[14140.701127] PM: Some devices failed to suspend

there is nothing on the USB bus (there may be later though).
Do I need something additional to shut down the USB bus first?

Next, the idea is to have an external gadget produce a signal to wake it up again,
I haven’t thought much about were to connect that to yet though.

Cheers – Bram

You can't. There is no working suspend+resume on beaglebone.

That’s unfortunate. So either I should look for ways to bring down the consumption while
keeping it running (I think I read something about that already) or do a shutdown and
reboot.

Now I noticed that after a shutdown the 'bone boots again, so this would need some way
to cut the power before that, until the moment it should come back. Maybe there’s a clean
way to do that? Otherwise I could play with timers, but that would be a kind of a hack.

Bram