I think that you may be wrong.

Most times when this happens its because there is some user mode service or
middle-were that needs to consume the wake event and *that* thing should be
grabbing a wake lock from user mode through the normal android API's.

I would say you are missing some integration in your user mode stack that
needs fixing more than hacking up the kernel more.

BTW looking at the changes to the kernel/common.git, android-3.3 branch, it
looks like there is some significant changes coming WRT the power manager
service (the PMS) I look forward to seeing.

Putting more of your own PM hacks into the kernel will come back and bite
you.  I'd see about grabbing the user mode wake lock before putting any
more code into the kernel wake lock flows.

--mark

On Sat, Apr 7, 2012 at 6:43 AM, Ventanas <guerreromarc...@gmail.com> wrote:

>
> So do I have to encrease this timeout?
> I guess user mode android code will echo on to the /sys/Power/state
> file, Right? Or ama I wrong?
>
>
> On 30 Mar, 19:50, mark gross <mark97...@gmail.com> wrote:
> > there is a time out wake lock (1 sec) that gets grabbed at the end of
> > the pm_suspend code path path (I think).  (you'll have to look in your
> > specific kernel version for it)
> >
> > Someone needs to grab a wake lock in user mode or echo on before that
> > wake lock times out or you gobackto sleep.
> >
> > This is by design.  (and it has been oh-so-much-fun to discuss on
> > linux-pm in the past)
> >
> > User mode should be grabbing a wake lock under this implementation to
> > hold off subsequent sleeps.
> >
> > --mark
> >
> >
> >
> >
> >
> > On Wed, Mar 28, 2012 at 2:40 PM, Ventanas <guerreromarc...@gmail.com>
> wrote:
> > > I have been working with a linux kernel 2.6.29 and I now have
> > > implemented thesuspend/resume for my machine based on PXA310.
> >
> > > So I can putAndroidintosuspendby typing 'echo mem > /sys/power/
> > > state', so I can wakeup the machine fromsuspendby a trigger (i.e.
> > > hardware on-off button) andAndroidwakes up for some seconds andgoes
> > > againbacktosuspend, showing these messages over the serial port:
> >
> > > wakeup wake lock: mmc_delayed_work
> > > wake_lock: mmc_delayed_work, type 0
> >
> > > wake_lock: mmc_delayed_work, type 0, timeout 0.500
> > > wake_lock: mmc_delayed_work, start expire timer, 64
> > >suspend: exitsuspend, ret = 0 (2000-01-01 00:01:52.743408205 UTC)
> > > expire_wake_locks: start
> > > wake lock mmc_delayed_work, expired
> > > expired wake lock mmc_delayed_work
> >
> > > expire_wake_locks: done, has_lock 0
> > >suspend: entersuspend
> > > PM: Syncing filesystems ... done.
> > > Freezing user space processes ... (elapsed 0.00 seconds) done.
> > > Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
> > > Suspending console(s) (use no_console_suspend to debug)
> >
> > > anyone knows why??
> >
> > > if I am able to type 'echo on > /sys/power/state' over the serial port
> > > just one second after the device resumes fromsuspend, then the
> > >ANDROIDwakes and stays on and it doesn't getbacktosuspend.
> >
> > > Why?
> >
> > > help me, help me....!!!!
> >
> > > Marco
> >
> > > --
> > > unsubscribe:android-kernel+unsubscr...@googlegroups.com
> > > website:http://groups.google.com/group/android-kernel
> >
> > --
> > create interesting things.
>
> --
> unsubscribe: android-kernel+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-kernel




-- 
create interesting things.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to