从官方下载下来的源码编译出来的system.img 跑起来会有不断睡眠,唤醒,最后深度睡眠,串口不能输入,屏幕黑屏。下面记录一下问题:
1. log
root@sabresd_6dq:/ # logd.auditd: start
healthd: No charger supplies found
healthd: No battery devices found
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
warning: `main' uses 32-bit capabilities (legacy support in use)
lowmemorykiller: lowmem_shrink: convert oom_adj to oom_score_adj:
lowmemorykiller: oom_adj 0 => oom_score_adj 0
lowmemorykiller: oom_adj 1 => oom_score_adj 58
lowmemorykiller: oom_adj 2 => oom_score_adj 117
lowmemorykiller: oom_adj 3 => oom_score_adj 176
lowmemorykiller: oom_adj 9 => oom_score_adj 529
lowmemorykiller: oom_adj 15 => oom_score_adj 1000
acc_open
acc_release
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:04, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
PM: suspend entry 1970-01-01 00:00:50.386960672 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ...
PM: Wakeup pending, aborting suspend
last active wakeup source: eventpoll
Freezing of tasks aborted after 0.007 seconds (33 tasks refusing to freeze, wq_busy=0):
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:00:50.424929672 UTC
PM: suspend entry 1970-01-01 00:00:50.529705339 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 112.778 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.602 msecs
PM: noirq suspend of devices complete after 0.662 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.694 msecs
PM: early resume of devices complete after 0.445 msecs
PM: resume of devices complete after 160.096 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ...
PU: Power-off latency exceeded, new value 40333 ns
done.
root@sabresd_6dq:/ # PM: suspend exit 1970-01-01 00:01:00.746934671 UTC
root@sabresd_6dq:/ #
root@sabresd_6dq:/ #
root@sabresd_6dq:/ #
root@sabresd_6dq:/ # =============gsl_load_fw end==============
PM: suspend entry 1970-01-01 00:01:05.849601672 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 106.157 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.557 msecs
PM: noirq suspend of devices complete after 0.670 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.296 msecs
PM: early resume of devices complete after 0.416 msecs
PM: resume of devices complete after 157.060 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ...
done.
PM: suspend exit 1970-01-01 00:01:32.740100005 UTC
root@sabresd_6dq:/ # PM: suspend entry 1970-01-01 00:01:32.846149339 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 108.820 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.559 msecs
PM: noirq suspend of devices complete after 0.674 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.291 msecs
PM: early resume of devices complete after 0.422 msecs
PM: resume of devices complete after 157.384 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:02:38.731249338 UTC
PM: suspend entry 1970-01-01 00:02:38.836478671 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ...
PM: Wakeup pending, aborting suspend
active wakeup source: alarm
Freezing of tasks aborted after 0.006 seconds (6 tasks refusing to freeze, wq_busy=0):
Restarting kernel threads ... done.
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:02:38.893806338 UTC
PM: suspend entry 1970-01-01 00:02:38.998882338 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 102.856 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.559 msecs
PM: noirq suspend of devices complete after 0.676 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.285 msecs
PM: early resume of devices complete after 0.423 msecs
PM: resume of devices complete after 157.351 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:05:50.742816672 UTC
PM: suspend entry 1970-01-01 00:05:50.847980005 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 103.277 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.561 msecs
PM: noirq suspend of devices complete after 0.678 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.288 msecs
PM: early resume of devices complete after 0.428 msecs
PM: resume of devices complete after 157.348 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:13:32.730899005 UTC
PM: suspend entry 1970-01-01 00:13:32.851416005 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 117.318 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete after 0.560 msecs
PM: noirq suspend of devices complete after 0.669 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.340 msecs
PM: early resume of devices complete after 0.426 msecs
PM: resume of devices complete after 160.704 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:30:30.749500339 UTC
PM: suspend entry 1970-01-01 00:30:30.865977005 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 102.891 msecs
PM: suspend devices took 0.100 seconds
PM: late suspend of devices complete after 0.568 msecs
PM: noirq suspend of devices complete after 0.687 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.337 msecs
PM: early resume of devices complete after 0.425 msecs
PM: resume of devices complete after 160.617 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:42:30.730735005 UTC
PM: suspend entr1970-01-01 00:42:30.851555005 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
I'am in gsl_ts_suspend() start
PM: suspend of devices complete after 117.405 msecs
PM: suspend devices took 0.110 seconds
PM: late suspend of devices complete a鎡er 0.569 msecs
PM: noirq suspend of devices complete after 0.677 msecs
Disabling non-boot CPUs ...
Resume caused by IRQ 51, rtc alarm
Suspended for 0.000 seconds
PM: noirq resume of devices complete after 0.335 msecs
PM: early resume of devices complete after 0.423 msecs
PM: resume of devices complete after 160.710 msecs
PM: resume devices took 0.160 seconds
Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:54:30.730835005 UTC
PM: suspend entry 1970-01-01 00:54:30.864510672 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
2. 正常情况下
root@sabresd_6dq:/ # cat /sys/power/
autosleep pm_print_times wake_lock
pm_async pm_test wake_unlock
pm_freeze_timeout state wakeup_count
root@sabresd_6dq:/ # cat /sys/power/autosleep
off
root@sabresd_6dq:/ # cat /sys/power/pm_print_times
0
root@sabresd_6dq:/ # cat /sys/power/wake_lock
PowerManagerService.Display
root@sabresd_6dq:/ # cat /sys/power/wake_unlock
KeyEvents PowerManagerService.WakeLocks
root@sabresd_6dq:/ # cat /sys/power/pm_async
1
root@sabresd_6dq:/ # cat /sys/power/pm_freeze_timeout
20000
root@sabresd_6dq:/ # cat /sys/power/pm_test
[none] core processors platform devices freezer
root@sabresd_6dq:/ # cat /sys/power/state
freeze standby mem
root@sabresd_6dq:/ # cat /sys/power/wakeup_count
root@sabresd_6dq:/ #
3. 参考了一些资料之后,往/sys/power/wake_lock写入:
1. echo "PowerManagerService.noSuspend" > /sys/power/wake_lock
2. echo wake > /sys/power/wake_lock
之后,串口可以输入(没有被freeze掉),但屏幕依然黑屏。
参考资料:
1. 基于wakeup_source的linux autosleep分析
2. android系统电源管理--如何防止系统进入深度睡眠
3. 解决android系统唤醒时间偏长------看log找可疑的地方
4. Suspending console(s) (use no_console_suspend to debug) android4.0 OMAP4460
5. no_console_suspend
6. 关于Android Suspend有关问题
7. Wakelock机制分析---从JNI层到内核层
8. i.MX6DQ Android 5.1.1_2.1.0-ga fails resume.