suspend/resume issues still unsolved

Skip to first unread message

Ben Dooks

May 10, 2011, 6:11:00 AM5/10/11
to android-porting
I've returned to looking at the resume issue with our current
Android port (generic build of 2.3.2, with a 2.6.37 android
kernel with support added for our board).

The problem is, as previously stated that the system immediately
shuts itself back down when you hit a resume source. We have fixed
this by adding a patch to the resume path to do the following:

--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -248,6 +248,9 @@ int suspend_devices_and_enter(suspend_state_t state)
static void suspend_finish(void)
+ request_suspend_state(PM_SUSPEND_ON);

To ensure that the main android power driver does not decide that it
needs to suspend again, and re-run the suspend process.

I've checked through the android source tree, and it seems the only
two places where /sys/power/state is referenced is in the powerd sources
(system/core/toolbox/powerd.c) and the init.rc.

The powerd source does not seem to be built into the toolbox, and
there's no mention in my build. Is this some form of problem known
to the "generic" build?

I've tried changing one of my resume buttons to send the POWER key
to see if this is required, but it does not make any difference to
the result.

The init.rc script has a service statement which should also make
sure that the power state is set, but it does not seem to be executed.

> service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
> socket zygote stream 666
> onrestart write /sys/android_power/request_state wake
> onrestart write /sys/power/state on
> onrestart restart media
> onrestart restart netd


Ben Dooks <>

Reply all
Reply to author
0 new messages