Sleep Mode for BBB

Hi Robert,

There are some power saving modes in Linux:
suspend, hibernate, and hybrid-sleep.
All of these modes are under condition:
where execution of the OS is paused.
Not very clear to me what exactly means the execution of OS is paused.
There are system drivers, daemon threads, services, Network devices, CAN buses activities, DataBase Servers, and application processes, etc. They are running all the time. And there is no input devices, such as keyboard and mouse for our Linux devices.
In Windows, I guess the system is checking keyboard and mouse activities and the system determines to enter power saving mode based on settings.
Could you please give me some explanations how to implement power saving mode in Linux?

Thank you,
David

For the BBB, “suspend to ram” is exactly that, you set your wake up condition (gpio pin), then the system suspends to ram, and everything shut’s down. Main core is off, and nothing can be done… Till the system resumes…

For other power savings, look to cpu frequency, or just disable USB, which takes a bit.

Regards,

Hi Robert,
Thank you so much for your information and help!
Best Regards,
David

Hi Robert,

It enters power saving to ram:
echo -n mem > /sys/power/state
But is there a default wake-up GPIO pin already defined/configured in the BBB?
(GPOI 7 ?) . I guess the power button is not used for wake-up purpose, either.
Or I have to compile it with
wakeup_gpio_pins: pinmux_wakeup in the device tree?

Best Regards,

David

Here is the old guide:

https://processors.wiki.ti.com/index.php/AM335x_Power_Management_Standby_User's_Guide

Regards,

Hi Robert,
Thank you for the guide. It is very useful.
I have made standby and wakeup by rtc. But I have hard time to set wakeup by gpio. Based on the document:
echo uart0_rxd.gpio1_10=0x27,rising > standby_gpio_pad_conf
it gives me Permission Denied. Even if I use a different gpio, say gpio_20 pin.
The standby_gpio_pad_conf can not be found under /sys or under /debugfs.
Anything I have missed?
Best Regards,
David

Those directions assume root, much of it was based off of TI’s v3.14.x based kernel, sadly not everything went mainline…

Regards,

Thank you,

David

Hi Robert,

Wakeup by GPIO is not working. Here is what I have tried:
sudo -i //as root
following instructions on Section Wakeup from a peripheral via GPIO method .
https://processors.wiki.ti.com/index.php/AM335x_Power_Management_Standby_User’s_Guide#Standby_Mode

The folder : /debugfs/omap_mux/board doesn’t exit. (See Screen Dump)

Proceed without cd to the folder ./board
echo … cmd returns with Permission Denied.

  1. The second way I tried, directly goes to folder /sys/power/state
    and /sys/class/gpio/gpio115
    But found no ./gpio115/power/wakeup
  2. sudo -i, as root, without creating /debugfs
    echo … cmd works, it creates standby_gpio_pad_conf file, with gpio3_19=0x73, rising written. It certainly will not trigger a wakeup.

Thank You,

David

Hi Robert,

On BBBw, the PWR_BUT is on P9_9, which can wake up from sleep mode.
On System reference Manual: Section 5.10: Power Button
Can alert processor to wake up from sleep mode and restore state before sleep was entered.
It seems to me it is directly controls TPS65217 PMIC. PWR_BUT is not on any gpio. Am I right?

Thank you,
david

That is correct, by holding down that button for more then 8 seconds has the same affect as yanking your power cord off the back of a pc…

By ‘toggling’ the OS will start the shutdown sequence properly…

Regards,

Hi Robert,

Under /sys/power/state: there is freeze state,
but echo freeze > /sys/power/state
it returns:
-bash: echo: write error: Invalid argument

Best Regards,
David

Hi Robert,

The BBBw has TPS65217 PMIC for power management. I tried RTC, PWR_BUT, and UART0 Tx, they all work. But GPIO pins (on Bank0) are con configurable for a wakeup. I didn’t find any gpio pin with exported wakeup. Or is it just not exportable, and works internally. Please confirm that. If yes, please give a few guidelines to recompile a dtbo for a gpio wakeup.

Also, is TPS65217 PMIC chip required for a GPIO pin wake-up?

Thank you,
David