Hi,

During the N900 development we had the same issue. That is, sensor daemon was polling the accelometer constantly (twice a sec but resulted a lot more syscalls and wakeups). The polling was done constantly regardless if there where any application using the data. This killed the battery and use-times.

We ended up implementing the solution what Chris suggested below. Applications tell when they need the sensor data. When no application needs, the polling is not done. Further optimization is not to poll but us interrupts, and disable interrupt when no applications needing the data.

After the optimization, the power usage was hugely improved.

-sakari

On 03/28/10 22:13, ext Chris Pearson wrote:
Hi Xing,

Are you sure that all applications for your daemon would want polling to
stop when they are in the background?  Can we not imagine an application
that runs in background (e.g., as an icon) and displays a pop-up message
when some sensor event is detected?  If so, instead of the daemon deciding
how all application(s) must behave, why not allow each application to tell
the daemon when to stop polling (or what polling rate is required)?  This
seems possible since there is already a connection between the application
and the daemon.

-- Chris

----- Original Message -----
From: "Zhang, Xing Z"<[email protected]>
To: "Jussi Kukkonen"<[email protected]>;<[email protected]>
Sent: Saturday, March 27, 2010 3:40 AM
Subject: Re: [MeeGo-dev] How to get screen active application in Meego


My application is a sensor daemon supplying data to application, e.g.
accelerometer data.
If an application connects to my daemon, the daemon will poll driver in a
high sample rate which obviously kills power.
so if I could know which application is viewable to user, I could stop
polling since sensor awareness application is running at background
My thought is to write a context provider of window manager to provide
such feature.

Thank you your suggestion. I will take a look of Libwnck first.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jussi Kukkonen
Sent: Friday, March 26, 2010 5:00 PM
To: [email protected]
Subject: Re: [MeeGo-dev] How to get screen active application in Meego

Zhang, Xing Z wrote:
Hi all: Do we have method to get known which application is active on
screen now? I filter properties of contextkit,  Session.State makes
sense to me. Is there a more detailed info tells me which application
is in fullscreen mode (by pid or others)?

Libwnck may be worth a look, but I don't know if it's available in all
versions... If you explain what you want to achieve (and in what
context), you might get better suggestions.


HTH,
  Jussi
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to