cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
garfy123
Contributor
Contributor
228 Views
Registered: ‎01-31-2018

cpu standby/suspend wakes up immediately on second try...

Hi,

I need help.

CPU standby/suspend wakes up immediately on second try. It only succeed on the first try after each reboot. 

target boardpicozed sdr, ZC706
Tool chain: petalinux 2015.4
Target OS: 
root@Xilinx-ZC706-2015_4:~# uname -a
Linux Xilinx-ZC706-2015_4 4.4.0-ge42619c-dirty #2 SMP PREEMPT Sat May 30 08:15:03 SGT 2020 armv7l GNU/Linux

I issue the commands to suspend the CPU and wake up on keyboard. The first try after reboot always succeed without fail. 

root@Xilinx-ZC706-2015_4:~# echo enabled > /sys/devices/soc0/amba/e0001000.serial/tty/ttyPS0/power/wakeup
root@Xilinx-ZC706-2015_4:~# echo mem > /sys/power/state
[ 347.479586] Freezing user space processes ... (elapsed 0.006 seconds) done.
[ 347.495161] Freezing remaining freezable tasks ... (elapsed 0.004 seconds) done.

<< SCREEN FREEZES>> 

<< AFTER I HIT THE KEYBOARD, IT RESUMES>> 
[ 347.550789] PM: suspend of devices complete after 37.325 msecs
[ 347.550918] PM: suspend devices took 0.050 seconds
[ 347.566696] PM: late suspend of devices complete after 15.593 msecs
[ 347.582972] PM: noirq suspend of devices complete after 16.072 msecs
[ 347.583801] PLL: shutdown
[ 347.584612] Disabling non-boot CPUs ...
[ 347.626269] CPU1: shutdown
[ 347.681362] Enabling non-boot CPUs ...
[ 347.757911] CPU1 is up
[ 347.759312] PLL: enable
[ 347.769173] PM: noirq resume of devices complete after 7.354 msecs
[ 347.783071] PM: early resume of devices complete after 10.580 msecs
[ 347.934141] PM: resume of devices complete after 150.867 msecs
[ 347.942989] PM: resume devices took 0.160 seconds
[ 348.009215] Restarting tasks ... done.

I issue the same command again. This time, it didn't freeze at all. The output does not suggest any errors.  

root@Xilinx-ZC706-2015_4:~# echo mem > /sys/power/state

root@Xilinx-ZC706-2015_4:~# echo mem > /sys/power/state
[ 534.291909] Freezing user space processes ... (elapsed 0.003 seconds) done.
[ 534.302600] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[ 534.360016] PM: suspend of devices complete after 39.500 msecs
[ 534.360514] PM: suspend devices took 0.050 seconds
[ 534.376310] PM: late suspend of devices complete after 15.593 msecs
[ 534.392586] PM: noirq suspend of devices complete after 16.072 msecs
[ 534.393415] PLL: shutdown
[ 534.394226] Disabling non-boot CPUs ...
[ 534.435938] CPU1: shutdown
[ 534.481668] Enabling non-boot CPUs ...
[ 534.557535] CPU1 is up
[ 534.558917] PLL: enable
[ 534.569295] PM: noirq resume of devices complete after 7.833 msecs
[ 534.582824] PM: early resume of devices complete after 10.469 msecs
[ 534.733433] PM: resume of devices complete after 150.424 msecs
[ 534.742188] PM: resume devices took 0.160 seconds
[ 534.808139] Restarting tasks ... done.

I have looked at a couple  of places (such as /sys/kernel/debug/suspend_stats),i'm still clueless. Any kind of help will be greatly appreciated. I have also looked at pm_test. No errors. 

root@Xilinx-ZC706-2015_4:/sys/kernel/debug# cat suspend_stats
success: 2
fail: 0
failed_freeze: 0
failed_prepare: 0
failed_suspend: 0
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
failures:
last_failed_dev:

last_failed_errno: 0
0
last_failed_step:

root@Xilinx-ZC706-2015_4:/sys/kernel/debug#

0 Kudos
0 Replies