[Gta04-owner] suspend with QTMOKO or SHR

arne anka openmoko at ginguppin.de
Sat Feb 23 14:32:04 CET 2013


thanks a bunch!
but apparentyl that's more or less happens already -- at least it does not  
change anything.
if i do those two calls in bash, the device still does not go down and  
still wakes up (if it ever sleeps) when tocuhing the screen.

i have the dim recollection that i got some hint to another mail where i  
mentioned this besides a bunch of other issues, but i can't find that mail  
again :-(



> Neil Jerram <neil at ossau.homelinux.net> writes:
>
>> "arne anka" <openmoko at ginguppin.de> writes:
>>
>>> how do QTMOKO or SHR manage suspend?
>>
>> I'm afraid I don't really know, but have you tried "echo mem >
>> /sys/power/state" ?
>
> I realised that I could quite easily find a better answer for you.  In
> QtMoko, the code (neosuspend.cpp) does this:
>
>     QProcess::execute("before-suspend.sh");
>     chargeNowBeforeSuspend = readChargeNow();
>     suspendTime = QDateTime::currentDateTime();
>
>     // Check if wakeup sources havent changed. If yes, then the write  
> will fail
>     // For more info see:
>     //  
> http://lists.goldelico.com/pipermail/gta04-owner/2012-July/002587.html
>     if (Qtopia::
>         writeFile("/sys/power/wakeup_count", wakeupCount.constData(),
>                   wakeupCount.count(), false, 0, 1)) {
>         qLog(PowerManagement) <<
>             "suspend aborted because by kernel wakeup sources";
>         return false;
>     }
>
>     Qtopia::writeFile("/sys/power/state", "mem", 3, false);
>
> The before-suspend.sh script is a hook for users, and is empty by
> default.
>
> In summary, I think that means that "echo mem > /sys/power/state" is
> mostly the right answer, but see also the referenced email (which, IIRC,
> is to do with a race between wakeup sources and the suspend process).
>
>      Neil
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner


More information about the Gta04-owner mailing list