[Defy Android Development] YetAnotherForumUser:
20130107 kernel without DSS errors; fixes spontaneous reboots

I can confirm that the reboot on wakeup and the DSS log spam in the 20130107 kernel are caused by the "OMAP/DSS2: Disable devices that failed to resume. Make multiple suspends and resume work correctly" commit. I reverted this commit and built a new kernel, using which I can suspend and wake up my phone as usual. The DSS related warnings in dmesg are gone as well.

For those who want to give it a try I attached this kernel to this posting. To install it on your phone I'd suggest booting into recovery, enabling adb (Advanced->Start adb) and pushing the kernel to your phone:

adb push zImage.gz /system/bootmenu/2nd-boot/zImage

Note that the file on the phone is called zImage (without any extensions) while the attached file has a .gz extension to get around the silly file type restrictions this BB places on uploaded files. Make sure the file on the phone gets the right name or you'll be running the original, reboot-prone kernel!

Do note that I'm not saying the kernel is perfect after reverting this commit. I notice a slew of wake-ups which are bound to increase power consumption:

<6>[ 2307.946441] request_suspend_state: sleep (0->3) at 1991955902095 (2013-01-08 00:00:42.376922601 UTC)
<6>[ 2308.815216] suspend: enter suspend
<6>[ 2308.815521] PM: Syncing filesystems ... done.
<4>[ 2308.893707] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2308.912719] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2308.914642] Suspending console(s) (use no_console_suspend to debug)
<3>[ 2308.923461] pm_noirq_op(): platform_pm_suspend_noirq+0x0/0x38 returns -11
<3>[ 2308.923492] PM: Device power.0 failed to suspend late: error -11
<3>[ 2308.923767] PM: Some devices failed to power down
<6>[ 2308.925567] wakeup wake lock: ehci_pm
<4>[ 2308.971679] Restarting tasks ... done.
<6>[ 2308.993286] suspend: exit suspend, ret = 0 (2013-01-08 00:00:43.525421142 UTC)
<6>[ 2309.993408] suspend: enter suspend
<6>[ 2309.993713] PM: Syncing filesystems ... done.
<4>[ 2310.071350] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2310.089965] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2310.091827] Suspending console(s) (use no_console_suspend to debug)
<7>[ 2310.098449] vfp_pm_save_context: saving vfp state
<6>[ 2310.098785] PM: Resume timer in 22 secs (748388 ticks at 32768 ticks/sec.)
<6>[ 2311.011138] Successfully put all powerdomains to target state
<6>[ 2311.012298] wakeup wake lock: cpcap-irq
<4>[ 2311.064392] Restarting tasks ... done.
<6>[ 2311.094390] suspend: exit suspend, ret = 0 (2013-01-08 00:00:45.533813476 UTC)
<6>[ 2311.171478] suspend: enter suspend
<6>[ 2311.171997] PM: Syncing filesystems ... done.
<4>[ 2311.249938] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2311.268798] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2311.270446] Suspending console(s) (use no_console_suspend to debug)
<7>[ 2311.277282] vfp_pm_save_context: saving vfp state
<6>[ 2311.277587] PM: Resume timer in 21 secs (709754 ticks at 32768 ticks/sec.)
<6>[ 2311.988006] Successfully put all powerdomains to target state
<6>[ 2311.989166] wakeup wake lock: cpcap-irq
<4>[ 2312.040863] Restarting tasks ... done.
<6>[ 2312.071533] suspend: exit suspend, ret = 0 (2013-01-08 00:00:46.534454345 UTC)
<6>[ 2312.161621] suspend: enter suspend
<6>[ 2312.161926] PM: Syncing filesystems ... done.
<4>[ 2312.249969] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2312.268829] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2312.270507] Suspending console(s) (use no_console_suspend to debug)
<7>[ 2312.277130] vfp_pm_save_context: saving vfp state
<6>[ 2312.277435] PM: Resume timer in 20 secs (676986 ticks at 32768 ticks/sec.)
<6>[ 2316.018432] Successfully put all powerdomains to target state
<6>[ 2316.019653] wakeup wake lock: wifi_wake
<4>[ 2316.071563] Restarting tasks ... done.
<6>[ 2316.093719] suspend: exit suspend, ret = 0 (2013-01-08 00:00:50.525909423 UTC)
<6>[ 2316.655364] suspend: enter suspend
<6>[ 2316.655670] PM: Syncing filesystems ... done.
<4>[ 2316.733734] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2316.752380] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2316.754241] Suspending console(s) (use no_console_suspend to debug)
<7>[ 2316.760894] vfp_pm_save_context: saving vfp state
<6>[ 2316.761199] PM: Resume timer in 16 secs (530055 ticks at 32768 ticks/sec.)
<6>[ 2316.940093] Successfully put all powerdomains to target state
<6>[ 2316.941314] wakeup wake lock: wifi_wake
<4>[ 2316.993225] Restarting tasks ... done.
<6>[ 2317.015441] suspend: exit suspend, ret = 0 (2013-01-08 00:00:51.525970458 UTC)
<6>[ 2317.590576] suspend: enter suspend
<6>[ 2317.591094] PM: Syncing filesystems ... done.
<4>[ 2317.671020] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[ 2317.690093] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
<4>[ 2317.691772] Suspending console(s) (use no_console_suspend to debug)
<7>[ 2317.698608] vfp_pm_save_context: saving vfp state
<6>[ 2317.698913] PM: Resume timer in 15 secs (499318 ticks at 32768 ticks/sec.)
<6>[ 2318.988128] Successfully put all powerdomains to target state
<6>[ 2318.989349] wakeup wake lock: wifi_wake
<4>[ 2319.040802] Restarting tasks ... done.
<6>[ 2319.062713] suspend: exit suspend, ret = 0 (2013-01-08 00:00:53.525665283 UTC)
...
... (etc)