![]() |
Can apps that disable dyntick be considered bugs?
I have read in various threads that when running some apps, such as Xterm and Microb dyntick will not lower the' tick rate', thereby decreasing battery life when in 'lock screen and keyboard' mode.
To me that seems like a bug, but I can't find anything about this in Maemo bugzilla. Would this be a 'bug' in those specific apps or is something in the OS in need of fixing? |
Re: Can apps that disable dyntick be considered bugs?
Well it's not disabling, it's that these tasks do thing that don't allow dyntick to take effect.
This may or may not be a bug - some applications require such behaviour (e.g. timers) while others do not (either unnecessary or could be done some other way). In almost all cases though, when an application goes into the background, timers should be stopped, to allow battery saving behaviours to take effect. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
@iamthewalrus: So if you start a timer and then "lock screen and keys" what do you want it to do? Keep accurate time? or stop the timer to save power?
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
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. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
The easiest solution is probably that if you minimise an app it should attempt to stop all dyntick-stopping behaviour. Do apps get a signal that the screen has been locked? If so, these apps should stop display routines/update timers anyway as the output is not being seen.
|
Re: Can apps that disable dyntick be considered bugs?
Applications with a user interface are usually event-driven and idle most of the time. Only when a user does something, an event is generated and handled by the application. Only when all applications are idle, the device can go into power-save mode.
Timers can be setup by applications to trigger actions without user input at regular intervals. Since these also run while the device is idle, they prevent the device from switching to power-save mode. Good behaving applications never let timers be run when not needed. But many applications unfortunately do. Many applications were ported from desktop-Linux where extreme power-saving is simply not an issue. Application programmers need to be made aware of power-efficient programming. This is relatively new. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
Quote:
Without thinking it through too much I see a couple of scenarios: - Minimised mode: Browser should finish load the currently loading page, but stop any animations. My satellite tracking software (vaporware at the moment) will stop updating the tracking display while minimised. - Screen locked: All updates of (the invisible) screen to stop. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
What matters is that applications do unnecessary work that consumes power. It is about ratio between sleeping device and active device (with microsecond precision) where 'sleeping device' consists of separate sleeping parts - CPU, wi-fi, bluetooth, audio/DSP, display, touchscreen, mmc cards, usb, .... Once this ratio is bad enough you have dead device in few hours. Some applications abuse CPU, some do network activity, some leave audio open, some scan mmc cards or read/write to files ... |
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
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.
|
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> |
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
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. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
Code:
$ browser(Although I just read xterm is one of the culprits...) |
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 |
Re: Can apps that disable dyntick be considered bugs?
Quote:
1. really everything is frozen so even some stuff that should be done is not done and system is mildly confused with amnesia after wakeup. 2. you need to wake up periodically each minute to ping the watchdog or system reboots. This means that your programs are periodically woken up too for short moments and can feel bad about it too (e.g. when playing sound or using network). SIGSTOP/SIGCONT may cause similar issues but at least it is not done every minute. s2ram may indeed save more power but most people don't care if your tablet lasts 20 or 40 days in such standby mode. With clean firmware N810 lasts 30 days after fresh charge when not used at all. So it is not that bad when power management really works. For better effect both ways can be combined (first send SIGSTOP to all suitable tasks and then do s2ram trick periodically). Another solution for longer periods of inactivity is to implement suspend to disk (=card). Wakeup may take few seconds though. Still much better than current shutdown/boot procedure taking tenths of seconds. |
Re: Can apps that disable dyntick be considered bugs?
30 days? I thought everyone recharged their NIT every day :)
The issue isn't only the time it requires the device to boot. The issue is also booting drains the battery life. An embedded device either doesn't boot much, or booting is quick. With the NIT's low battery life you get neither which drains the battery even more. Say you fire up the NIT in the morning to check mail. Then you drive to work, suspend it, and after 8 hours you fire it up to check your mail again. Or you did this during your lunch break. If you want a really high battery life while not using the device for long you'd suspend to disk. This is slower than suspend to RAM though, and on a computer it costs some time and energy to do this. You really don't want to suspend to disk every minute your laptop isn't in use, but I think for the NIT the difference is minor (especially with the SDHC kernel). If you are using a lot of RAM suspend to RAM will use the swap to suspend to provided you have one (else it'll fail). In any case, only if you need to reboot suspend isn't an option. Else, it is almost always worth it after X minutes where X is e.g. 15, provided the suspending works correct. The ideal X is something one can researh after an implementation exists. This not only counts for laptops as well. It also counts for PCs. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
Quote:
As well as that, I can leave my N810 with wifi up and an ssh session running on my PC all evening (~4 hours, not doing much though, but that's like email), every night of the week and it will probably last a week. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
How about a GUI to see which (userspace) applications have used lots of resources in a certain timeframe, and way to indicate which applications to halt (with SIGSTOP) when not using the tablet. |
Re: Can apps that disable dyntick be considered bugs?
Well, I'm sorry, but I have a laptop at home and this device is always online when I have it at home (and soon with me, with 3G). If I wouldn't have a laptop I would use a desktop or workstation instead (actually, I do, but its almost always off, also to save costs on power which is becoming more expensive these days). I do like to wake up and see if I have e-mail based on the NIT's ambient light... but come on... its simply much easier to read e-mail on a bit bigger screen with my own favourite e-mail application with calendar support and so on.
When I leave the house I immediately don't have a connection anymore. No more WLAN. How am I always-on then? I'd need a seperate device for always-on. So, if you look at it this way, the NIT doesn't have the hardware to be always-on while on the move. If I travel, and I don't need to use the NIT, I should either close my resource hungry applications or use suspend. Heck, if I'd travel with my NIT, I wouldn't be able to use the on-board GPS because the chipset is crappy. The NIT doesn't have 3G either. It doesn't have as much storage as my Iriver H340 (with only 25 GB filled) which works several hours with Rockbox. So, IMO, or at least for me, the NIT isn't very useful as a always-on device. Perhaps I should clearlify how I use my NIT: as a backup device in case I lost my way on the road, or if I'd need to look up something on the Internet while on the road. This doesn't happen much; so why leave the device on the whole time? I don't run many non-standard applications on the NIT either. PowerTOP is a great application to see how many W an application uses but it requires a patched kernel. |
Re: Can apps that disable dyntick be considered bugs?
Quote:
I'd envisage three lists: * A whitelist of core system processes which should never be stopped. * A whitelist of processes to keep running when locked/screen off * A blacklist of processes to always stop when locking or the screen goes off after some timeout. In fact, I remember suggesting SIGSTOP as part of Hildon Desktop and/or Maemo back in the OS2005 days :-) Quote:
|
Re: Can apps that disable dyntick be considered bugs?
Quote:
|
| All times are GMT. The time now is 16:39. |
vBulletin® Version 3.8.8