Posted May 20, 2010 13:24 UTC (Thu) by xav (subscriber, #18536)
Parent article: Blocking suspend blockers
I have a N900 which, unlike Android, uses a more desktop-like system. It's a "normal" kernel where applications have to be careful not to drain the battery.
And believe me, even if it seems it's a good idea, it sucks for a phone. I often find my phone dead because some IM app just wakes up once every few seconds, which is nearly undetectable with top but is sufficient to avoid deep sleep and drains the battery like mad.
So, even if at first I found the concept of a desktop-like linux on a phone better, the more I learn about Android the more I think the latter made the right design decision.
Posted May 20, 2010 19:01 UTC (Thu) by zlynx (subscriber, #2285)
[Link]
Another point.
With suspend blockers the developer must take action in order to keep the system awake by setting a suspend block on purpose.
Without suspend blockers the developer will keep the system awake by default just by writing normal software. The developer must take action, often quite a lot of code redesign, in order to *not* keep the system awake.
Android looks good in that aera
Posted May 20, 2010 18:25 UTC (Thu) by farnz (guest, #17727)
[Link]
Suspend blockers would help in one or possibly two ways:
You can log whenever a suspend blocker is taken out or released, so it's then obvious that the IM app is causing the power draw; when it just wakes up briefly once a second to poll things, it vanishes in system noise. Even an in-memory log is enough to let you spot apps that are claiming a suspend blocker once a second.
Assuming you have appropriate system capabilities, you can prohibit the application from taking out the block in the first place. For example, you could set permissions that prevent the app from taking out a suspend block, or use a library to lie to the application and tell it that it has a block taken out when it doesn't.
Android looks good in that aera
Posted May 20, 2010 22:26 UTC (Thu) by iabervon (subscriber, #722)
[Link]
IM applications never consider the possibility that the system could suspend. They are poor citizens because they don't think about the issues, not because they consider the issues and decide to be bad. This would mean that they wouldn't even consider the possibility that they could need or want a suspend blocker. And, on a system that uses suspend blockers, their naive design is fine: they check for updates every 5 seconds if the system is awake, but don't keep the system awake if there's nothing else keeping it awake.
In fact, the current situation doesn't really give IM applications the ability to behave well; they need to update is a reasonable amount of time without any user interaction if the user is watching the window out of the corner of their eye, but don't need to do anything if the user is actually not paying attention. There's no current easy way for an application to say "sleep for 5 seconds, but don't bother waking me if the user doesn't care", and applications just don't consider this situation anyway, so they don't tend to try to set up a negotiation with the screensaver or something.
Android looks good in that aera
Posted May 21, 2010 0:48 UTC (Fri) by brendan_wright (subscriber, #7376)
[Link]
I've used a couple of Android devices as my main phone over the last two years. While their early JVM's were very inefficient and chewed through the power when you were actually using them (which has since been improved greatly), their ability to not suspend on you when you're playing music or using the nav software, but also not be "mysteriously dead" when you need to use them, is awesome!
I wish I could say the same about my Ubuntu powered laptops - they're either suspending on you 10 minutes into your movie because you left the power management switched on, or are unexpectedly dead when you need them because you switched it off. I'm hoping the merge of suspend blockers will improve this situation, as enable all the money that's being thrown at building Android powered phones, in-car devices, tablets etc to broaden the range of drivers compatible with the mainline Linux kernel.
Android looks good in that aera
Posted May 20, 2010 18:40 UTC (Thu) by felipebalbi (subscriber, #56613)
[Link]
Badly written apps aren't the only problems in N900, due to a HW problem smartreflex (which is a technology to automatically adjust the regulators in the PMIC to save battery) can't be used.