[Gta04-owner] Suspend / Resume on 3.12.0
Dr. H. Nikolaus Schaller
hns at goldelico.com
Sat Nov 16 17:27:26 CET 2013
Hi Ben,
Am 16.11.2013 um 16:12 schrieb Benjamin Deering:
>
> It looks like the master branch on git still has off_mode enabled which is pretty unstable. Do you have something like this to disable off-mode?
>
> diff --git a/arch/arm/mach-omap2/board-omap3gta04.c b/arch/arm/mach-omap2/board-omap3gta04.c
> index a49cf1e..b96aeb9 100644
> --- a/arch/arm/mach-omap2/board-omap3gta04.c
> +++ b/arch/arm/mach-omap2/board-omap3gta04.c
> @@ -1685,8 +1685,8 @@ static void __init gta04_init_late(void)
> {
> omap3630_init_late();
>
> - omap_pm_enable_off_mode();
> - omap3_pm_off_mode_enable(1);
> + //omap_pm_enable_off_mode();
> + //omap3_pm_off_mode_enable(1);
> // omap_hsmmc_late_init(mmc); // if we do it here, we must comment out the other call in the led
> #if defined(CONFIG_VIDEO_OV9655) || defined(CONFIG_VIDEO_OV9655_MODULE)
> gta04_camera_setup();
>
> I see the mmc errors, but not the backtrace.
Ok, it appears to work better [1]!
Still some strange things in dmesg:
[ 41.593322] PM: Syncing filesystems ... done.
[ 55.610229] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 55.619628] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 55.628753] Suspending console(s) (use no_console_suspend to debug)
[ 55.637298] si47xx_suspend
[ 55.763366] PM: suspend of devices complete after 126.825 msecs
[ 55.764495] PM: late suspend of devices complete after 1.068 msecs
[ 55.766387] GPS SET to 0
[ 55.766571] PM: noirq suspend of devices complete after 2.044 msecs
[ 55.766754] Successfully put all powerdomains to target state
[ 55.767242] GPS SET to 0
[ 55.772583] PM: noirq resume of devices complete after 5.676 msecs
[ 55.774078] PM: early resume of devices complete after 0.884 msecs
[ 55.775146] GPS resuming 0 0
[ 56.163879] si47xx_resume
[ 56.204132] mmc1: error -110 during resume (card was removed?)
[ 56.204162] dpm_run_callback(): mmc_bus_resume+0x0/0x70 returns -110
[ 56.204193] PM: Device mmc1:0001 failed to resume: error -110
[ 56.204528] PM: resume of devices complete after 430.121 msecs
[ 56.284423] Restarting tasks ... done.
[ 59.184936] PM: Syncing filesystems ... done.
[ 63.593383] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 63.604064] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 63.613311] Suspending console(s) (use no_console_suspend to debug)
[ 63.621856] si47xx_suspend
[ 63.753997] PM: suspend of devices complete after 132.867 msecs
[ 63.755126] PM: late suspend of devices complete after 1.098 msecs
[ 63.756988] GPS SET to 0
[ 63.757202] PM: noirq suspend of devices complete after 2.044 msecs
[ 63.757385] Powerdomain (core_pwrdm) didn't enter target state 1
[ 63.757385] Could not enter target state in pm_suspend
[ 63.757843] GPS SET to 0
[ 63.763061] PM: noirq resume of devices complete after 5.523 msecs
[ 63.764465] PM: early resume of devices complete after 0.884 msecs
[ 63.765563] GPS resuming 0 0
[ 64.154632] si47xx_resume
[ 64.195373] mmc1: error -110 during resume (card was removed?)
[ 64.195404] dpm_run_callback(): mmc_bus_resume+0x0/0x70 returns -110
[ 64.195434] PM: Device mmc1:0001 failed to resume: error -110
[ 64.195770] PM: resume of devices complete after 431.037 msecs
[ 64.281341] Restarting tasks ... done.
[ 82.388641] PM: Syncing filesystems ... done.
[ 85.964172] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 85.974395] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 85.983642] Suspending console(s) (use no_console_suspend to debug)
[ 85.992950] si47xx_suspend
[ 86.125671] PM: suspend of devices complete after 133.996 msecs
[ 86.126800] PM: late suspend of devices complete after 1.098 msecs
[ 86.128692] GPS SET to 0
[ 86.128875] PM: noirq suspend of devices complete after 2.044 msecs
[ 86.129058] Powerdomain (core_pwrdm) didn't enter target state 1
[ 86.129058] Could not enter target state in pm_suspend
[ 86.129516] GPS SET to 0
[ 86.135009] PM: noirq resume of devices complete after 5.798 msecs
[ 86.136474] PM: early resume of devices complete after 0.884 msecs
[ 86.137695] GPS resuming 0 0
[ 86.526062] si47xx_resume
[ 86.566741] mmc1: error -110 during resume (card was removed?)
[ 86.566772] dpm_run_callback(): mmc_bus_resume+0x0/0x70 returns -110
[ 86.566802] PM: Device mmc1:0001 failed to resume: error -110
[ 86.567138] PM: resume of devices complete after 430.521 msecs
[ 86.652709] Restarting tasks ... done.
root at gta04:~# echo mem >/sys/power/state
-bash: echo: write error: Operation not permitted
root at gta04:~#
But it appears to be suspended between the echo and the write error (which shows
after resume).
Another interesting observation is that a sync should be done before sending the
device to suspend. Or it may take some seconds - and need the same time again
for the next suspend. So issuing a 'sync' command from the command line might
do a little more than the "PM: Syncing filesystems ... done.". Maybe, the PM sync
does not write the buffers to SD card.
I will try a little more to decide if it is already enough to commit to the 3.12.0-master
since there is still "Powerdomain (core_pwrdm) didn't enter target state 1" and the
mmc_bus_resume error. I think we have to test if WiFi is still working after a suspend.
At least I was able to successfully ifconfig wlan0 up and iwlist scan.
And I was able to resume correctly an ssh over otg session even with triggering the
resume by unplugging the cable (and replugging shortly after so that TCP/IP could
recover).
Please test and send observations (optimally through [2]).
BR and tnx,
Nikolaus
[1]: http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/3.12.0-suspend
I have commented the offmode-things out by #if OFF_MODE_IS_STABLE
[2]: http://projects.goldelico.com/p/gta04-kernel/issues/512/
More information about the Gta04-owner
mailing list