From eLinux.org
< R-Car
Revision as of 07:56, 13 November 2017 by Geert (talk | contribs) (Document test procedures for System Suspend and Wake-Up)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document describes test procedures for System Suspend and Wake-Up on Renesas ARM boards.

System Suspend

System Suspend allows to suspend the system to save power, and wake up the system to continue running later.

Linux supports up to four system suspend states:

  • Suspend-to-Idle aka s2idle (freeze): The system is frozen,
  • Standby / Power-On Suspend aka shallow (standby): Similar to Suspend-to-Idle (not covered here),
  • Suspend-to-RAM aka deep (mem): System state is retained in RAM, some system components may be powered down,
  • Suspend-to-Disk (disk): System state is stored to disk, and the system is powered down (not covered here).

Not all states are available on all systems.

Wake-Up Sources

When the system is suspended, it can be woken up using one or more wake-up sources, after which normal operation is resumed.

Which wake-up sources are available in which suspend state depends on the actual system. While Suspend-to-Idle supports all wake-up sources configured by Linux, this may not be the case for deeper suspend states.

  • On Renesas 32-bit ARM systems, Suspend-to-RAM doesn't power down the SoC, and all wake-up sources supported by Suspend-to-Idle are also supported by Suspend-to-RAM,
  • On Renesas 64-bit ARM systems, Suspend-to-RAM calls into PSCI, which asks the PMIC to power down the SoC. Hence only the PMIC can wake up the system. Make sure to use Suspend-to-Idle if you want to use standard wake-up sources.


  • You can check which suspend states are available using:
# cat /sys/power/state
freeze mem
  • In general, the system is suspended to one of the suspend states using:
echo <state> > /sys/power/state     # freeze, standby, mem, or disk
  • On some systems, additional setup steps may need to be performed before suspending the system. Please refer to the individual board pages for more information.
  • As of v4.10, you can configure which state to use for Suspend-to-RAM (mem, default is deepest available):
echo <state> > /sys/power/mem_sleep # s2idle, shallow, or deep
  • You can obtain a list of enabled wake-up sources and wake statistics using:
# cat /sys/kernel/debug/wakeup_sources
name               active_count  event_count  wakeup_count  expire_count  active_since  total_time  max_time  last_change  prevent_suspend_time
e6800000.ethernet  1             1            0             0             0             0           0         679148       0
keyboard           0             0            0             0             0             0           0         1197194      0
deleted            0             0            0             0             0             0           0         0            0
  • You can control if a device is enabled for wakeup by manipulating sysfs, e.g.:
# cat /sys/devices/platform/keyboard/power/wakeup
# echo disabled > /sys/devices/platform/keyboard/power/wakeup
# cat /sys/devices/platform/keyboard/power/wakeup

Board Specifics

Supported suspend states and wake-up methods for each board can be found on the individual boards' pages:


  • The console can be kept enabled during system suspend using:
echo 0 > /sys/module/printk/parameters/console_suspend
  • You can test all states and steps using:
for i in freezer devices platform processors core none; do
	echo Trying $i
	echo $i > /sys/power/pm_test
	echo mem > /sys/power/state

See Also