maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Can apps that disable dyntick be considered bugs? (https://talk.maemo.org/showthread.php?t=22932)

iamthewalrus 2008-08-18 12:42

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by fanoush (Post 214858)
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?

TA-t3 2008-08-18 12:51

Re: Can apps that disable dyntick be considered bugs?
 
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.

pycage 2008-08-18 12:52

Re: Can apps that disable dyntick be considered bugs?
 
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.

fanoush 2008-08-18 13:02

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by iamthewalrus (Post 214864)
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.

qwerty12 2008-08-18 13:50

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by lardman (Post 214843)
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.

iamthewalrus 2008-08-18 13:52

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by fanoush (Post 214875)
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.

fanoush 2008-08-18 14:06

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by iamthewalrus (Post 214886)
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.

allnameswereout 2008-08-19 07:05

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by fanoush (Post 214829)
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.

allnameswereout 2008-08-19 07:10

Re: Can apps that disable dyntick be considered bugs?
 
Quote:

Originally Posted by TA-t3 (Post 214868)
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...)

fanoush 2008-08-19 07:24

Re: Can apps that disable dyntick be considered bugs?
 
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.


All times are GMT. The time now is 16:39.

vBulletin® Version 3.8.8