![]() |
Hibernation / Suspend to Disk
Hi,
does or will Maemo support hibernation (suspend to disk), which Linux supports on most PCs? It is a very useful feature if you want keep all your applications open and in the same state over periods of power off. There are several scenarios in which you want or have to turn off the device but don't want to start all applications again: * over night: saves energy and let's you sleep * in the proximity of sensitive devices (clinic) * battery changing cheers |
Re: Hibernation / Supsend to Disk
Quote:
Quote:
|
Re: Hibernation / Supsend to Disk
Quote:
I see no point in keeping the device on during my sleep. I don't mean saving battery power but energy in general. I know some people are used to keeping all devices on (TV) even if they leave their house but some people are more environmentally aware. Quote:
|
Re: Hibernation / Supsend to Disk
Though, I'd like hibernation very much. At least to change battery when the first one is dead.
Could be an interesting project when my N900 is available; maybe tough too. |
Re: Hibernation / Supsend to Disk
Quote:
AFAIK, booting the device up consumes so much power that you're doing better by keeping the device in offline mode over night. |
Re: Hibernation / Supsend to Disk
Quote:
Quote:
|
Re: Hibernation / Supsend to Disk
Quote:
Suspension to RAM/disk would probably be best as a Brainstorm idea at this point. |
Re: Hibernation / Supsend to Disk
Quote:
See here for a simple calculation: http://talk.maemo.org/showthread.php...639#post297639 Quote:
|
Re: Hibernation / Supsend to Disk
Quote:
|
Re: Hibernation / Supsend to Disk
Quote:
Please ask them what is the system current draw at idle, and during shutdown./boot. Then do the math. |
Re: Hibernation / Supsend to Disk
My empiral evidence (aka my anecdote) is that the four reboots is enough to bring the N810 battery to its knees.
Without rebooting, it lasts around two days of medium use, and a week of light use. |
Re: Hibernation / Supsend to Disk
Interesting idea.
I have a feeling that switching to off-line mode would conserve more power overnight than hibernating. Although the internal storage "disk" has no moving parts, I'm guessing that writing, then reading back on restore, 256 MB is still relatively power hungry? Plus the additional overheads on both sides. I really doubt Suspend would be worth it either, as power conservation has always been a top priority for Maemo. I guess switching to off-line mode overnight would gain that tiny bit extra and is effectively Standby mode, as there would be no need for the device to perform any actions so virtually no power consumption from internal components. I do like the idea of Hibernation for battery swaps though. Not an issue for my current usage of N810 + E90, but could see this occuring with the N900 as my single device, with all that gorgeous computing power at my disposal 24/7 - I feel almost obliged to use it to it's max! :D |
Re: Hibernation / Supsend to Disk
Hildon has already a framework for battery swapping "hibernation". I've never seen it working, though (save when you don't have swap enabled and ZZZ appears on a task switcher icon).
|
Re: Hibernation / Supsend to Disk
Quote:
Quote:
|
Re: Hibernation / Supsend to Disk
My personal wacko EE theory is that booting is not as strenuous as it seems at first glance, but does for some reason mess up the charge indicator/battery chemistry/power management in general, which in turn can/will influence possible runtime. I'm pretty certain it's not 'straight current draw' after losing 30% battery power on a N810 reboot (that would result in a serious meltdown if true :) ), and after gaining 7% on another (unrelated) reboot.
|
Re: Hibernation / Supsend to Disk
Quote:
is hibernation more than saving used pages to flash (may be compressed), kernel init and reloading the pages from flash? Granted, whether you can actually save power by hibernation compared to off-line mode depends on how long you don't need to use the device, but continuous discharging of the battery could also reduce battery life, correct? However, for me the main purpose of hibernation is not necessarily to save power, but to be able to restore all application states after a period of power off. Suppose your battery is low after a long day of intense use and you can only recharge it when you come back to your desk. Now you have two options: 1) turn the device off and lose the session state (running applications) or 2) hibernate, and wake up as soon as it is connected to power again (or you have swapped the battery). Don't you think that 2) would be a useful feature? |
Re: Hibernation / Supsend to Disk
Quote:
- What you're explaining is correct. Even the builtin battery meter tends to keep on saying "the battery just got better" ;) up to an hour after rebooting. - Tracker. Or metalayer or whatever it's called on Diablo. Indexing 4 GiB takes a load of time -- plenty of time to suck power without overheating anything. I've also found a few weird things. First reboot usually shows 100% battery even if before rebooting it was at 90%. Second reboot shows half the battery. Every other reboot shows "battery low" warning. This was with around half an hour between reboots (was trying to create a hildon-desktop patch and messed something up:) ). |
Re: Hibernation / Supsend to Disk
Quote:
Quote:
|
Re: Hibernation / Supsend to Disk
Hibernate would be neat sure, but i know that resurecting is causing lot of issue specially with some hardware ...
But if it saves the batteries it would reduce flash life... Talking about that, is powertop available for ARM ? |
Re: Hibernation / Supsend to Disk
This would be a very interesting feature, not seldom used a lot, but there are several circumstances I wish I could just remove the battery/change SIM without going through a full reboot. Could be a nice feature to be implemented by the community. Any coders around for it?
|
Re: Hibernation / Supsend to Disk
Quote:
e: and here's straight answer: Quote:
|
Re: Hibernation / Supsend to Disk
Quote:
|
Re: Hibernation / Supsend to Disk
Trying to make the discussion of power consumed during reboot experimental, rather than theortical or mythological, I ran my N810 through reboot loops. Here are the results:
No route to host is when the N810 did not boot after it powered off for some reason. The results of the experiment are that the battery managed 44 reboot cycles. If we take the official 240 hours standby time, it means that a reboot cycle is equivalent to about 5.5 hours of standby. Code:
14:11:10:~$ for i in `seq 1 100` ; do echo $i ; ssh n810 battery-status ; ssh n810 battery-status ; ssh n810 reboot ; sleep 150 ; done |
Re: Hibernation / Supsend to Disk
Heh, someone actually coming up with data to back up the discussion! :D
Thanks for that, very interesting. And it seems to back up the assertion that a reboot sucks about as much as the night's sleep anyway. 44 reboots, that's probably a reasonably fresh battery. The battery I finally replaced (from Jan. 2007) could only manage a couple of reboots when fully loaded, and barely a single reboot after a day. |
Re: Hibernation / Supsend to Disk
Actually, it is an almost two years old and heavily used battery. I actually estimate that it now holds about 50% as much power as a new battery.
If you look at the battery reading, you will note that it reads the battery as full for about 15 reboots, then goes from full to 55% in one reboot, and goes approximately linearly to 0% from there. |
Re: Hibernation / Supsend to Disk
Quote:
|
Re: Hibernation / Supsend to Disk
Thanks for the experimentation. Regarding:
Quote:
|
Re: Hibernation / Supsend to Disk
My N800 battery didn't start to show its age until it was about 26-27 months old. Up until this I had no indication of detoriation. After this point though it became noticably worse at a rate which was visible in some 2-months steps, until it fiinally became almost unusable around now (34 months old).
|
Re: Hibernation / Supsend to Disk
Quote:
I also doubt that a hibernate cycle consumes as much power as a full shutdown/boot cycle. Experiments with a Linux notebook could shed some light on that issue... |
Re: Hibernation / Suspend to Disk
There are some patches for suspend to disk for ARM/OMAP,
however, for older kernel versions: http://elinux.org/Suspend_To_Disk_For_ARM they claim that the snapshot boot would dramatically reduces booting time |
Re: Hibernation / Supsend to Disk
@Matan: +1 interessing experience, if someone can do it on a brand new battery / device
maybe the boot can be optimised too , i am thinking about keeping the light low as soon as possible ... |
Re: Hibernation / Supsend to Disk
Quote:
|
any news on suspend mode ?
I was wondering if there's been any progress on implementing suspend mode. I'd like it for flights, where you have to waste battery turning it off and on, when the next recharge may not be for a long time.
|
suspend to memory "howto"
Found an easy way to suspend to memory. It's sudo sh -c "echo mem > /sys/power/state", to add in a queenbee script widget. The phone suspends to memory immediately and can wake up instantly on power or lock or camera shutter or keyboard slide (not my choice but hey). Yeah, that means you have to use sleep in terminal mode so you have time to close the keyboard, otherwise it wakes up when you do.
There are still a few problems. One, unless it's already in offline mode, there is a good chance the phone will wake up quickly due to external (radio, wifi) events because only the CPU is asleep not the peripherals. So it's a good idea to go offline first to shut those off. Two, the phone wakes up with messed up clock (clock stops when it goes to sleep) and even automatic update doesn't fix it. |
Re: Hibernation / Supsend to Disk
Quote:
|
All times are GMT. The time now is 23:16. |
vBulletin® Version 3.8.8