On Thu, Nov 19, 2009 at 10:34:44AM -0600, Victor Lowther wrote: > >However, upon resume pm-utils will run the various scripts in > >/etc/pm in > >order. The idea would be to have a hook, say, 80-openmoko, that tells > >pm-utils: "forget it, we need to go back to sleep". And at that point > >pm-utils will: > >1. stop running further resume scripts > >2. start running suspend hooks starting from the one that canceled the > > resume 80-openmoko > >3. suspend again > > It seems like a reasonable request, nut it is not obvious how to > implement it in a general way.
It looks like I was following the wrong approach. I took some timings, and standard pm-utils scripts seem to be a bit too heavyweight for a mobile phone: 00auto-quirk suspend... result: 0 0.721047sec 00logging suspend... result: 0 0.800695sec 00powersave suspend... result: 0 1.787498sec 49bluetooth suspend... result: 254 0.551373sec 55NetworkManager suspend... result: 254 0.769849sec 55wicd suspend... result: 252 2.561117sec 75modules suspend... result: 254 1.077796sec 90clock suspend... result: 254 0.808920sec 94cpufreq suspend... result: 0 0.612665sec 95led suspend... result: 254 0.106237sec 98smart-kernel-video suspend... result: 254 0.715426sec 99video suspend... result: 0 1.037772sec 99video resume... result: 0 4.003470sec 98smart-kernel-video resume... result: 0 0.755774sec 95led resume... result: 254 0.112618sec 94cpufreq resume... result: 0 0.678049sec 90clock resume... result: 254 0.629024sec 75modules resume... result: 0 0.843291sec 55wicd resume... result: 252 2.202079sec 55NetworkManager resume... result: 254 0.772729sec 49bluetooth resume... result: 254 0.696186sec 00powersave resume... result: 0 2.062235sec 00logging resume... result: 0 0.554852sec 00auto-quirk resume... result: 0 0.732000sec This is not your fault, you're obviously targeting a different platform. But I would still want to allow openmoko apps to be installed on my desktop and still work, so I'd like to have, on my phone, suspend/resume plugins that are compatible with pm-utils. To that end, I prototyped a "light" version of pm-utils: http://git.debian.org/?p=users/enrico/omhacks.git It tries to do the same, but it's implemented in C, it's simple minded and it does not ship the default heavyweight pm-utils hooks. It also implements "cancel resume", when a hook exits with status 250. It's all still a proof of concept, and it hasn't proven the concept yet: I'm now trying to port a complicated suspend/resume setup to it to see if it copes. I seems like a reasonable tradeoff to me to have the normal pm-utils and a lighter version that at least share the standard behaviours, so if the idea is viable I could be quite happy with it. Only, I'd like the standard to stay in sync. I've had to pick an extra special exit status to implement "cancel resume", and it might be a good idea if we eventually standardise it, so that the proper pm-utils don't pick it in the future for something else, forcing all scripts that use that feature to be rewritten. Ciao, Enrico -- GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enr...@enricozini.org>
signature.asc
Description: Digital signature
_______________________________________________ Pm-utils mailing list Pm-utils@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pm-utils