On Wed, Sep 10, 2014 at 10:25 PM, <Valdis.Kletnieks@xxxxxx> wrote: > On Wed, 10 Sep 2014 21:58:48 +0300, Ran Shalit said: > >> 1. How can I make a process to notice this inactivity ? Do you think >> it can be implemented by some periodic process who check if there is >> activity ? It returns to the original question I raised, that I will >> use some periodic process who checks maybe cpu load or something like >> that. What do you think ? > > That's going to depend on your system and what processes are running. > > You may have an MP3 player going that doesn't take much CPU at all - but > shutting down because the user hasn't hit a button in 47 minutes will probably > irritate the user no end. Or there may be a screensaver running that takes > twice as much CPU as the MP3 player, but is totally OK on the system > suspending whenever the rest of the system wants it. > > You're going to have to look at your system design, and decide for yourself > what the criteria are. > > >> 2. What Do you mean here by process ? Do you mean SW process which >> register for suspend notification (how do we do this) ? What about >> devices which register for suspend/resume. Must they accept the >> suspend ? > > I believe Android already has libraries and monitor processes for this. > > It's really hard to give more specific advice without knowing what your > hardware, software, and usage is. Ok, Thanks, I just tried to understand and learn from your previous answer. I have OMAP Soc and knows that the linux SDK supports suspend/resume and other mechnism. I did n't hear about the notification before. Thanks, Ran _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies