I see wake_locks "PowerManagerService" from PowerManagerService.java and "KeyEvent" from EventHub.cpp. But I could not find out who invokes wake_lock "alarm" and when.
We have not written HAL for lights. Also dont have sysfs entries under /sys/class/power_supply/ . Will it affect the suspend/resume process. Also sometimes when I am trying to suspend the system, I am getting kernel crash below. # request_suspend_state: sleep (0->3) at 363253682815 (2000-01-01 00:06:56.76809662 9 UTC) stop_drawing_early_suspend: timeout waiting for userspace to stop drawing omaplfb: **** SUSPEND # # alarm_release: clear alarm, pending 0 alarm_release: clear alarm, pending 0 alarm_release: clear alarm, pending 0 swap_free: Bad swap file entry 00000001 BUG: Bad page map in process Thread-9 pte:00000200 pmd: 89c61031 addr:a8589000 vm_flags:08100075 anon_vma:cf9757b0 mapping:cf538f64 index:289 vma->vm_ops->fault: filemap_fault +0x0/0x374 vma->vm_file->f_op->mmap: nfs_file_mmap +0x0/0x70 [<c0039a50>] (unwind_backtrace+0x0/0xd8) from [<c009f414>] (print_bad_pte+0x19c/0x1 cc) [<c009f414>] (print_bad_pte+0x19c/0x1cc) from [<c00a13b0>] (unmap_vmas +0x3b0/0x584) [<c00a13b0>] (unmap_vmas+0x3b0/0x584) from [<c00a39d0>] (exit_mmap +0x98/0x12c) [<c00a39d0>] (exit_mmap+0x98/0x12c) from [<c005e27c>] (mmput +0x38/0xd4) [<c005e27c>] (mmput+0x38/0xd4) from [<c0061838>] (exit_mm+0x10c/ 0x114) [<c0061838>] (exit_mm+0x10c/0x114) from [<c0062e90>] (do_exit +0x184/0x5a0) [<c0062e90>] (do_exit+0x184/0x5a0) from [<c0063328>] (do_group_exit +0x7c/0xac) [<c0063328>] (do_group_exit+0x7c/0xac) from [<c006be5c>] (get_signal_to_deliver+0x2 d0/0x300) [<c006be5c>] (get_signal_to_deliver+0x2d0/0x300) from [<c0036920>] (do_signal+0x68/ 0x618) [<c0036920>] (do_signal+0x68/0x618) from [<c0036ee8>] (do_notify_resume +0x18/0x48) [<c0036ee8>] (do_notify_resume+0x18/0x48) from [<c0033f0c>] (work_pending+0x1c/0x20 ) Disabling lock debugging due to kernel taint BUG: Bad page map in process ndroid.launcher pte:8a93134d pmd: 89eb9031 page:c0670620 flags:00000010 count:0 mapcount:-1 mapping:(null) index: 0 addr:00153000 vm_flags:00100077 anon_vma:cf9758f8 mapping:(null) index: 153 [<c0039a50>] (unwind_backtrace+0x0/0xd8) from [<c009f414>] (print_bad_pte+0x19c/0x1 cc) Thanks, Arun On Dec 7, 6:26 pm, Deva R <[email protected]> wrote: > You can track who holds and releases wake_lock. > > I looked into this a bit sometimes back, to reduce this exact delay, but > shortening the delay is not a quick hack it seems. > > The delay between 'key-press' and 'actual-suspend' is mostly dicated by user > side, which are mostly due to wakelock held by below components > -system activity wakelock management is at > ./frameworks/base/services/java/com/android/server/PowerManagerService.java > > -key events handling from > ./frameworks/base/libs/ui/EventHub.cpp > > its also very possible that a kernel driver also holding a wakelock for some > timeout period.. > > > > > > On Tue, Dec 7, 2010 at 11:26 AM, Arun Joseph <[email protected]> wrote: > > Hi, > > > I am trying to get suspend/resume enabled in OMAP3 EVM with rowboat > > sources. For this I enabled power management feature (set hw.nopm to > > false). When I press power key, early-suspend handlers are getting > > executed and surfaceflinger is down. But It takes 6-7 seconds to enter > > into linux suspend procedures (enter_state). > > > What would be the reasons for there is a delay between > > request_suspend_state and enter_state invokations? > > > I see an new wake lock introduced to the system: lock name: alarm lock > > type WAKE_LOCK_SUSPEND timeout 5.0 seconds after I press power key. > > > Can someone help me in understanding where this wakelock is getting > > introduced from? Is this wakelock delaying the suspend procedure? > > > Thanks, > > Arun > > > -- > > unsubscribe: > > [email protected]<android-porting%2Bunsubscribe@ > > googlegroups.com> > > website:http://groups.google.com/group/android-porting > > -- > Regards, > Devawww.bittoggler.com -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
