On 04/27/2013 09:21 PM, Max Liao wrote:
I was porting Android 4.0.4 to a board, and the kernel is based on
linux-3.6.9.
According to the usage of android wakelocks,
if I input
echo asdf > /sys/power/wake_lock
and then input
echo mem > /sys/power/state
the system won't suspend and sleep.
But actually not!
The console print following infos:
# echo asdf > /sys/power/wake_lock
# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
It means the system suspends and sleeps.
I don't know why, can anyone help me?
So the current wakelocks code doesn't prohibit explicit suspends from
the sys/power/state interface, but instead they block the autosleep code
from putting the system to sleep, if its enabled.
See:
https://lwn.net/Articles/479841/
and:
Documentation/ABI/testing/sysfs-power
thanks
-john
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.