Reply
Thread Tools
Posts: 566 | Thanked: 150 times | Joined on Dec 2007
#11
Originally Posted by fanoush View Post
Well, non-programmers may be confused by this. We are talking about microsecond precision here. And we are also talking about various parts of the device going independently into their power saving modes, not just the main CPU. In normal mode of operation even if device is (heavily) used, various bits go to power-saving mode every now and then. So there is no one power-save mode that such applications continuously prevent to enter. .
There may technically not be a single power save 'mode', but from the users standpoint it is clear when you're done using a device and want to put it away without having to reboot it. So I wonder isn't it possible to just halt a process, no matter how good or bad the application is written?
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#12
Just to answer that very last question, without going into ramifications at all: Yes, it's possible. There's a Unix signal for that: SIGSTOP. It suspends the application until you send SIGCONT.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#13
Yes, it is possible. You can send SIGSTOP to the process and later resume it with SIGCONT.
This basically freezes the process.

Code:
kill -STOP <pid>
But the average user wouldn't want to do this. Maybe some (yet unwritten) suspend tool could handle this.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#14
Originally Posted by iamthewalrus View Post
So I wonder isn't it possible to just halt a process, no matter how good or bad the application is written?
Yes, it works in most cases see e.g. this. In general this does not solve everything but majority of cases are solved by this. It would not solve e.g. when application leaves audio open (preventing dsp from sleeping). Also you can't stop everything, you want to leave some parts of system running. So there is the problem of determining what can be stopped like this and what not.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#15
Originally Posted by lardman View Post
Do apps get a signal that the screen has been locked?
signal sender=:1.6 -> dest=(null destination) path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=tklock_mode_ind
string "locked"
signal sender=:1.6 -> dest=(null destination) path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=tklock_mode_ind
string "unlocked"

Programs using libosso may already recieve those dbus events, if not, I guess monitoring for them manually would work too.
 
Posts: 566 | Thanked: 150 times | Joined on Dec 2007
#16
Originally Posted by fanoush View Post
Also you can't stop everything, you want to leave some parts of system running. So there is the problem of determining what can be stopped like this and what not.
In case of a 'suspend' mode I would think you only want to keep those processes running that you need to get out out suspend mode again.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#17
Originally Posted by iamthewalrus View Post
In case of a 'suspend' mode I would think you only want to keep those processes running that you need to get out out suspend mode again.
Yes. So start xterm, run ps and tell me which are those :-) Even on freshly flashed firmware with no 3rd party application installed the list is long and it is hard to tell.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#18
Originally Posted by fanoush View Post
Well, technically you currently don't tell your device to go to power-saving mode. Device goes to power-saving mode automatically whenever possible.

I see what you mean but part of the problem is in fact lack of such explicit power-saving mode. there is offline mode, mode when screen is off, mode when touchscreen and keyboard is locked but no explicit 'please do really nothing and save power' mode.

Good example is media player, people want it to play even in offline mode, with screen, keyboard and touchscreen off. This is can of worms, random people want random set of features to work in such idle mode so there can't be one such mode.
There is a 3rd party addon: n800-s2ram.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#19
Originally Posted by TA-t3 View Post
Just to answer that very last question, without going into ramifications at all: Yes, it's possible. There's a Unix signal for that: SIGSTOP. It suspends the application until you send SIGCONT.
Its very easy to manage this in Bash:

Code:
$ browser
^Z
$ fg
^Z (CTRL+Z) does SIGTOP; fg (foreground) does SIGCONT.

(Although I just read xterm is one of the culprits...)
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#20
People usually don't start browser from xterm :-) What you can do is to call something like
Code:
for p in `pidof browser` ; do kill -SIGSTOP $p ; done
It can be done from powerlaunch script when keys are locked/released.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
Reply

Tags
dynticks

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:25.