PDA

View Full Version : cron jobs and suspend / power save mode


zippy
2007-02-14, 02:54
I don't have an N800 yet, so my apologies if the following is too newbie-ish.

My question is about cron jobs and different power modes, specifically what would be called "off" and "suspend" on a traditional machine.

I'd like to write an application that looks for a wireless access point every 15 minutes, but otherwise puts the N800 in a state where it draws as little power as possible.

Are user-created cron jobs triggered even when the unit is in suspend mode (I may not be using the right term here - I mean the mode where the unit is running on as little power as possible while not being completely off)?

Secondly, do cron jobs run when the computer is off? That is, does the timer for alarms work even when the machine is in a state the user thinks of as "off" or "shut down"?

I appreciate any answers, and apologize in advance if I've asked something completely obvious.

aflegg
2007-02-15, 15:43
The device already can look for a wireless connection every 15 minutes. Personally, I have mine set to look every 30, and disconnect after 10 minutes of inactivity.

Unfortunately, you have to disable the presence applet is (apparently) this keeps pinging the IM servers.

zippy
2007-02-15, 18:24
That is good to hear about the wireless. How close to completely shut down can the tablet be while still looking for wireless?

I'm still interested in how close to shut down the device can be and still run cron jobs - if someone could test this for me, or perhaps explain what the different power modes of the device are, I'd appreciate it. Just for explanation, I am curious how close to "completely off" the device can be and still run a task of my choosing every 15 minutes.

gnuite
2007-02-15, 22:03
As far as I know, the Nokia N800 (and, perhaps to a lesser extent, the Nokia 770) are always trying to use as little power as possible while still being usable. This is a feature of the CPU itself - if CPU cycles are not being used, then little power is being used. Certain software may run in the background, though, so be careful about what applications you choose to install and run (especially with applets).

Aside from the CPU, then, there is the screen (whose power-draining state is visibly obvious), the memory card interfaces (which should only use power when files are being accessed), and the radios. The radios can be disabled entirely via "Offline" mode, but otherwise they will occasionally search for access points (unless you disable that as described by aflegg). If you're not in Offline mode, then applications can trigger an auto-connect if they try to access the internet, so, again, be careful which software you choose to run in the background.

So, other than being careful about your software, you shouldn't have to do anything special to minimize power consumption - maemo does all that for you.

As for cron jobs: I think that those will still run in any mode other than completely switched off. Alarms will work. Audio will work. Pretty much everything works in every mode except for the radios (which only don't work in Offline mode) and the screen.

zippy
2007-02-16, 02:53
Thank you for the info. Based on some of the things I've read in this thread, I was able to find this documentation:

http://maemo.org/platform/docs/howtos/howto_alarm_interface_bora.html

Here's the quote that caught my eye:

"The alarmd daemon can also be asked to start the system up for an event even from poweroff."

If I'm correct that I can set arbitrary cron-like jobs via alarmd, this would mean that I could invoke specific applications even from a power off state.

The reason I'm fixated on this is that I want to get the absolute maximum run time (minimum battery use) for an application that I want to run at a regular interval. I don't need screen or wireless or anything else between the intervals, so being able to run this app even from "power off" would be ideal.

thebeck
2007-02-16, 03:13
I understand the N800 can sound an alarm while turned off, but wouldn't anything more complex require the whole boot process? If this is the case would booting and shutting down every 15 minutes not be more battery draining than sitting idle the whole time?

zippy
2007-02-16, 06:19
That's a good point. If the machine has suspend mode, where it powers down everything except RAM, it might be less power consuming than actually rebooting the machine. It would depend on the amount of power actually consumed during reboot (less than a traditional machine, since there's no hard drive involved), the amount consumed during suspend mode, and the interval of restarts.

thebeck
2007-02-16, 06:31
The N800 can sit idle for several days. My laptop, a Compaq v2000z w/good battery can sit in suspend mode for only 2 or 3 days at the most.

I know it's comparing apples to oranges but I have the feeling that you are not going to get much more out of the N800's already good power management. I don't think a deeper suspend mode is going to get you much more when such a little battery already lasts so many days in idle mode.

Since you have to keep the ram powered anyway I guess the best solution would be to keep the screen wireless off and background processes to a minimum. If you need longer run time I would look into getting an external battery that you can plug into the charger port.

Edit: Notebook model number corrected.

TA-t3
2007-02-16, 10:49
I've said it before, but compared to the power requirements of my old PDA when using wi-fi the N800 power drain with wi-fi is near non-existent. It doesn't seem to make a difference if I have wi-fi connected or not, at least the battery is still full at the end of the day (sitting idle on the desk, the rss feed checks in every 30 minutes).
Even when actively using wi-fi (browsing and the like) the drain isn't anything like I was used to from the PDA.
In short, it's good..! :D

zippy
2007-02-16, 19:21
These replies are really helpful. I'm impressed by just how much thought Nokia has put into this device around power saving and alarms. I've been thinking so much about working around them and doing better only because previous Linux handhelds I looked at did not do this good a job.

I can think of several Linux PDAs where alarms wouldn't fire if the device was off. So you were forced to leave the machine on in order to get alarms, but the power consumption was so great you'd be lucky to get 6 hrs of run time!

So what you've been telling me is starting to sink in :)

Nokia has done it right, and I probably won't need to spend cycles trying to improve on their work here.