How to find wakeup reason ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to find wakeup reason ?

2,316 Views
vinothkumars
Senior Contributor IV

Hi All,

I am working on Android Automotive with IMX8QM-MEK board. I trying to find wakeup reason.

mek_8q:/ # echo mem > /sys/power/state
[   47.251886] PM: suspend entry (deep)
[   47.257789] Freezing user space processes ... (elapsed 8.586 seconds) done.
[   55.850844] OOM killer disabled.
[   55.854069] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   55.862736] Suspending console(s) (use no_console_suspend to debug)
[   56.497486] PM: suspend devices took 0.628 seconds
[   56.508738] Disabling non-boot CPUs ...
[   56.524203] CPU1: shutdown
[   56.527413] CPU0: update max cpu_capacity 1024
[   56.543414] psci: Retrying again to check for CPU kill
[   56.543417] psci: CPU1 killed.
[   56.560011] CPU2: shutdown
[   56.563412] CPU0: update max cpu_capacity 1024
[   56.579413] psci: Retrying again to check for CPU kill
[   56.579416] psci: CPU2 killed.
[   56.595901] CPU3: shutdown
[   56.599411] CPU0: update max cpu_capacity 1024
[   56.615413] psci: Retrying again to check for CPU kill
[   56.615416] psci: CPU3 killed.
[   56.631766] CPU4: shutdown
[   56.635412] CPU0: update max cpu_capacity 1024
[   56.651412] psci: Retrying again to check for CPU kill
[   56.651415] psci: CPU4 killed.
[   56.667667] CPU5: shutdown
[   56.687410] psci: Retrying again to check for CPU kill
[   56.687413] psci: CPU5 killed.
[   56.687913] fail to power on resource 289
[   56.687913] fail to power on resource 309
[   56.688269] Enabling non-boot CPUs ...
[   56.689556] Detected VIPT I-cache on CPU1
[   56.689583] GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000
[   56.689629] CPU1: Booted secondary processor [410fd034]
[   56.690088]  cache: parent cpu1 should not be sleeping
[   56.690390] CPU1 is up
[   56.691754] Detected VIPT I-cache on CPU2
[   56.691768] GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000
[   56.691790] CPU2: Booted secondary processor [410fd034]
[   56.691995]  cache: parent cpu2 should not be sleeping
[   56.692237] CPU2 is up
[   56.693514] Detected VIPT I-cache on CPU3
[   56.693528] GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000
[   56.693549] CPU3: Booted secondary processor [410fd034]
[   56.693764]  cache: parent cpu3 should not be sleeping
[   56.694026] CPU3 is up
[   56.696838] CPU0: update max cpu_capacity 1024
[   56.696876] Detected PIPT I-cache on CPU4
[   56.696893] GICv3: CPU4: found redistributor 100 region 0:0x0000000051b80000
[   56.696918] CPU4: Booted secondary processor [410fd082]
[   56.697148]  cache: parent cpu4 should not be sleeping
[   56.697225] imx8_cpufreq_init: cluster 1 running at freq 1596 MHz, suspend freq 1596 MHz
[   56.697505] CPU4 is up
[   56.698798] Detected PIPT I-cache on CPU5
[   56.698809] GICv3: CPU5: found redistributor 101 region 0:0x0000000051ba0000
[   56.698827] CPU5: Booted secondary processor [410fd082]
[   56.698998]  cache: parent cpu5 should not be sleeping
[   56.699282] CPU5 is up
[   56.699366] CPU1: update max cpu_capacity 1024
[   56.720135] imx6q-pcie 5f000000.pcie: pcie phy pll is locked.
[   57.520496] PM: resume devices took 0.748 seconds
[   57.760936] OOM killer enabled.
[   57.764078] Restarting tasks ...
[   57.765449] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
[   57.766216] done.
[   57.768276] healthd: battery l=85 v=3 t=35.0 h=2 st=2 c=400 fc=4000000 cc=32 chg=a
[   57.786102] PM: suspend exit

I need to adb shell command to find wake reason.

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos
3 Replies

2,180 Views
vinothkumars
Senior Contributor IV

Solution here,

IMX8QM-MEK Power Management difference between Linux and Android 

Regards,

VinothS.

Regards,
Vinothkumar Sekar
0 Kudos

2,180 Views
b36401
NXP Employee
NXP Employee

The command like this:
adb shell dumpsys batterystats --checkin
provides a statistic for wakeups, including the reasons.

0 Kudos

2,180 Views
vinothkumars
Senior Contributor IV

Hi Victor,

Thank you for the reply.

But after wakeup I not getting wr identifier

Section identifierDescriptionRemaining fields
wrWakeup Reasonwakeup reason, time, count

Will you please validate the steps and check my log,

1. send suspend
   #  echo mem > /sys/power/state   
wait for wakeup 
2. check wake reason (wr)
    adb shell dumpsys batterystats --checkin

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos