Surfaceflinger as a standalone daemon is introduced
since honeycomb. Before that surfaceflinger is just
a service forked by system_server.
If we set the property system_init.startsurfaceflinger=1
honeycomb will keep the old behavior.
I don't remember why I chose to keep old behavior in
honeycomb-x86, probably because it's easier to debug.
However, in ics-x86 we run surfaceflinger as
a standalone daemon, like an android phone.
> What is still a bit strange with resume and suspend is that on suspending my
> device it wakes up immediately one time and goes to permanent suspend
> afterwards.
>
> THE PROBLEM IS ONE LINE OF CONFIGURATION!!!!!
>
> diff --git a/target/board/generic_x86/init.rc
> b/target/board/generic_x86/init.rc
> index a91ebd3..83283ed 100644
> --- a/target/board/generic_x86/init.rc
> +++ b/target/board/generic_x86/init.rc
> @@ -422,7 +422,7 @@ service zygote /system/bin/app_process -Xzygote
> /system/bin
> socket zygote stream 666
> onrestart write /sys/android_power/request_state wake
> onrestart write /sys/power/state on
> - onrestart restart surfaceflinger
> +# onrestart restart surfaceflinger
> onrestart restart media
> onrestart restart netd
I don't think it's the culprit of suspend/resume issue.
Actually on resume zygote is not restarted.
However, it's reasonable to remove that line,
as explained above.
> Another thing attracted my attention in this file:
>
> chown radio system /sys/android_power/state
> chown radio system /sys/android_power/request_state
> chown radio system /sys/android_power/acquire_full_wake_lock
> chown radio system /sys/android_power/acquire_partial_wake_lock
> chown radio system /sys/android_power/release_wake_lock
>
> onrestart write /sys/android_power/request_state wake
>
> We do not have the android_power driver integrated in our kernel (maybe also
> some other android kernel patches), so these line do make much sense, but
> commenting them seems to change nothing.
> The question is should we integrate this driver from google kernel sources?
Our kernel is just derived from Google android kernel.
It contains all necessary drivers to run android.
(otherwise it won't boot at all)
Actually /sys/android_power is an obsolete interface.
It probably has been removed since android kernel 2.6.32.
Modern android phones don't use it at all.
The modern interface is /sys/power.
Probably we should just remove those lines in init.rc.
I guess Google keeps them because some platform
(e.g. goldfish emulator) running old kernel 2.6.29
still use it.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
Well, how can I try? I don't have your device. :p
And seems you didn't state which device you're testing.
Even what you said is true, it's just a problem occurs on
honeycomb-x86. Check init.rc in android-x86 2.2, 2.3 and 4.0.
They don't have that line (onrestart restart surfaceflinger).
Do you mean suspend/resume works well in
2.2, 2.3 and 4.0 on your device?
I think your device has a different problem than
I've seen. It probably restart zygote on resume.
I don't see this behavior on my eeepc or tegav2.
Suspend/resume is a very complex problem.
Different platforms have different problems.
I don't think there is a general solution to all devices.
I even saw some device just hang on suspend --
it never resume back. It's probably be a kernel bug.
Anyway, thanks for pointing out a problem
in init.rc and providing a patch.
I'll apply it later.
> 2012/1/7 Chih-Wei Huang <cwh...@android-x86.org>
>>
>> I don't think it's the culprit of suspend/resume issue.
>> Actually on resume zygote is not restarted.
>> However, it's reasonable to remove that line,
>> as explained above.
--
Applied. Thanks again!