Alarm fail to wake up system from sleep state

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

Alarm fail to wake up system from sleep state

1,017 Views
jesselee
Contributor II

I am using iMX6q to build a system based on Android 5.0.

 

I closed uart log print as following:

BOARD_KERNEL_CMDLINE := console=null init=/init video=mxcfb0:dev=lcd,TM-QVGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=400M androidboot.console=null consoleblank=0 androidboot.hardware=freescale cma=384M androidboot.dm_verity=disabled android.ril=ttymxc3 printk.time=y androidboot.selinux=disabled

modified:

console=ttymxc0,115200 -> console=null

androidboot.console=ttymxc0 -> androidboot.console=null

When I set a alarm, it fail to wake up the system from sleep state sometimes, but when the alarm time is past, then I wake up the system manually, the alarm fired immediately.

Some conditions :

1、When the phone powered on thread,then set a new alarm, the alarm can't wakeup the system from sleep state, until I wake up the system manually, the alarm fired immediately.

2、If I delete all the existed alarm, then set a new alarm, the phenomenon is same as 1.

But, if I don't close the UART log print, the alarm can wake up the system from sleep state normally.

log as following:

<6>[ 135.579426] alarm_set alarm 2 set 403.430000000//--------set a new alarm
<4>[ 136.965764] yue.zhong:gpio_keys:button->code=116
<4>[ 136.965788] [yue.zhong:][gpio_keys_gpio_report_event][397]yue.zhong:pressed
<4>[ 136.965788]
<4>[ 137.085723] yue.zhong:gpio_keys:button->code=116
<4>[ 137.085741] [yue.zhong:][gpio_keys_gpio_report_event][403]yue.zhong:pressed over
<4>[ 137.085741]
<4>[ 137.265783] yue.zhong:gpio_keys:button->code=116
<4>[ 137.265788] [yue.zhong:][gpio_keys_gpio_report_event][397]yue.zhong:pressed
<4>[ 137.265788]
<4>[ 137.395758] yue.zhong:gpio_keys:button->code=116
<4>[ 137.395782] [yue.zhong:][gpio_keys_gpio_report_event][403]yue.zhong:pressed over
<6>[ 137.458774] alarm_set alarm 3 set 156.951000000
<6>[ 137.458974] alarm_set alarm 3 set 157.555000000
<6>[ 137.934236] request_suspend_state: sleep (0->3) at 137928550016 (2019-06-10 10:00:34.498733682 UTC)
<4>[ 137.934588] lcd_early_suspend
<4>[ 137.934598] matrix_keypad release ptt_wake_lock
<6>[ 138.247100] active wake lock PowerManagerService.Broadcasts
<6>[ 138.483614] PM: suspend entry 2019-06-10 10:00:35.048114016 UTC
<7>[ 138.483633] PM: Preparing system for mem sleep
<4>[ 138.485584] Freezing user space processes ... (elapsed 0.001 seconds) done.
<4>[ 138.735717] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
<7>[ 138.737203] PM: Entering mem sleep
<4>[ 138.737210] Suspending console(s) (use no_console_suspend to debug)//-------enter sleep state
<3>[ 138.741178] rtc-rx8130 2-0032: rx8130_get_time: date 34s 0m 10h 1wd 10md 5m 119y
<3>[ 138.745473] [Gsensor] kxtj2_1009_suspend
<6>[ 138.746342] PM: suspend of devices complete after 8.617 msecs
<6>[ 138.746349] PM: suspend devices took 0.010 seconds
<6>[ 138.746891] PM: late suspend of devices complete after 0.536 msecs
<6>[ 138.747576] PM: noirq suspend of devices complete after 0.678 msecs
<4>[ 138.747579] Disabling non-boot CPUs ...
<5>[ 138.748317] CPU1: shutdown
<5>[ 138.749554] CPU2: shutdown
<5>[ 138.750711] CPU3: shutdown
<6>[ 138.751375] Suspended for 0.000 seconds
<2>[ 138.751438] suspend_enter wakeup source CNTR=0x00000000, PGR=0x00000000, IMR1=0x7C73E613,IMR2=0xFC7B378F,IMR3=0xFFFE0003,IMR4=0xFF38F7BF ISR1=0x04080011, ISR2=0x00000000, ISR3=0x20000000, ISR4=0x80000000
<6>[ 138.751668] Enabling non-boot CPUs ...
<4>[ 138.752221] CPU1: Booted secondary processor
<6>[ 138.752434] CPU1 is up
<4>[ 138.752974] CPU2: Booted secondary processor
<6>[ 138.753186] CPU2 is up
<4>[ 138.753726] CPU3: Booted secondary processor
<6>[ 138.753974] CPU3 is up
<6>[ 138.754343] PM: noirq resume of devices complete after 0.361 msecs
<6>[ 138.754898] PM: early resume of devices complete after 0.394 msecs
<3>[ 138.762984] [Gsensor] kxtj2_1009_resume
<3>[ 138.777462] [Gsensor] KXTJ2_1009_CheckDeviceID 760 : KXTJ2_1009_CheckDeviceID 0x35 pass!
<3>[ 138.777462]
<3>[ 138.777463] rtc-rx8130 2-0032: rx8130_get_time: date 59s 4m 10h 1wd 10md 5m 119y
<6>[ 138.777489] devalarm_triggered: type 3
<6>[ 138.777919] PM: resume of devices complete after 23.011 msecs
<6>[ 138.778485] PM: resume devices took 0.030 seconds
<7>[ 138.778652] PM: Finishing wakeup.
<6>[ 138.779872] devalarm_triggered: type 3
<4>[ 138.778659] Restarting tasks ... done.
<6>[ 138.786150] PM: suspend exit 2019-06-10 10:04:59.011634333 UTC
<6>[ 138.786170] active wake lock PowerManagerService.WakeLocks
<6>[ 139.309045] PM: suspend entry 2019-06-10 10:04:59.534522667 UTC
<7>[ 139.309072] PM: Preparing system for mem sleep
<4>[ 139.309605] Freezing user space processes ... (elapsed 0.001 seconds) done.
<4>[ 139.555748] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
<7>[ 139.557223] PM: Entering mem sleep
<4>[ 139.557230] Suspending console(s) (use no_console_suspend to debug)
<3>[ 139.561264] rtc-rx8130 2-0032: rx8130_get_time: date 0s 5m 10h 1wd 10md 5m 119y
<3>[ 139.564717] dpm_run_callback(): platform_pm_suspend+0x0/0x5c returns -16
<3>[ 139.564722] PM: Device alarmtimer failed to suspend: error -16
<3>[ 139.564726] PM: Some devices failed to suspend
<3>[ 139.570597] rtc-rx8130 2-0032: rx8130_get_time: date 0s 5m 10h 1wd 10md 5m 119y//----------alarm time---->10:05
<6>[ 139.570627] devalarm_triggered: type 2
<6>[ 139.570642] devalarm_triggered: type 3
<6>[ 139.571008] PM: resume of devices complete after 6.274 msecs
<6>[ 139.571548] PM: resume devices took 0.010 seconds
<7>[ 139.571635] PM: Finishing wakeup.
<4>[ 139.571641] Restarting tasks ... done.
<6>[ 139.573697] alarm_set alarm 3 set 462.458000000
<6>[ 139.574209] PM: suspend exit 2019-06-10 10:05:00.006179666 UTC
<6>[ 139.574236] PM: suspend entry 2019-06-10 10:05:00.006213000 UTC//-----------the alarm wakeup, but suspend immediately
<7>[ 139.574251] PM: Preparing system for mem sleep
<4>[ 139.579654] Freezing user space processes ... (elapsed 0.016 seconds) done.
<4>[ 139.845745] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
<7>[ 139.847187] PM: Entering mem sleep
<4>[ 139.847196] Suspending console(s) (use no_console_suspend to debug)

 

Anyone know how to fix it?

Thanks.

Labels (2)
0 Kudos
0 Replies