Author
Topic: hibernation would save a lot of time (Read 17513 times)

OK, now you guys have me sold, going from 100W+ to 15-20W would be great, but I can't argue that going down to 1W or zero power use would totally rock, especially if LinuxMCE could coordinate the entire house to dynamically power completely off and back on using Follow me. I think the downside would be that would introduce a significant delay when walking into a room with a slightly older projector or TV that needs to warm up, but the power savings would probably be worth it. The other big issue then would be making sure the MD could boot completely in the time it takes the TV to warm up, because the present slow boot is horrendous.

I'm not big on the whole earth worship thing, but I guess lower electric bills would be nice. I skimmed most of the post and was wondering if someone looked into suspend to disk and use a SSD (solid state disk) drives or for a little less $$ you could use a Compaq flash with a CP flash -to- SATA adapter for the HD. It would achieve a huge disk performance and less power consumption without having to have a fast enough USB drive hanging out of your MD. I don't think the HD on a MD need to be that large at all. and it can be used as a primary drive on the core, put the media on a traditional drive or on a NAS that will allow the drives to spin down when not active.

I know other places people are already slipping theses solutions into Laptops to make the batt last longer and the system perform faster. Switching to one of these alone might be a step in the direction you want before even adding the suspend/hibernate option.

I'm not big on the whole earth worship thing, but I guess lower electric bills would be nice.

If you hadn't got that in there people might have (oh no!!) assumed you thought that saving the Earth's resources and stopping the destruction of millions of species of animals was a worthwhile cause. Imagine that! Phew!

I'm not big on the whole earth worship thing, but I guess lower electric bills would be nice.

If you hadn't got that in there people might have (oh no!!) assumed you thought that saving the Earth's resources and stopping the destruction of millions of species of animals was a worthwhile cause. Imagine that! Phew!

My bad. I’ll try again.

SSD or a CF flash with a SATA adaptor will be a big step in LMCE and any area of PC development to make them more power conscious and perform better.

That’s the suggestion; let’s discuss that regardless of personal beliefs, faiths, movements were sympathetic to, sexual preferences, political affiliations, or any other divisive factors.

If you can’t handle a tongue and cheek comment from someone who doesn’t accept that mankind are a virus out to destroy the planet; maybe there needs to be a disclaimer that states only conformist allowed.

After playing with suspend to RAM a while, I found two things that needs some tweaking. Anyone else seen any problems ?

First, sometimes when I suspend the MD, it wakes up after only a few seconds. It seemed the network card was waking it up. So I changed the type of communication that would wake it up from "ug" to just "g": ethtool -s eth0 wol gNow it just wakes up when receiving a magic packet.

The other thing is that the lirc_serial needs reloading after resuming. I added a section about this in the wiki. Not sure if all lirc modules need reloading, but at least the lirc_serial module needs it.

I dont know if the lirc stop and start stuff are the correct LMCE way of doing things wrt. configuration etc. Please let me know if I should do simething different.

I also did some more research on suspend to disk. It might be possible to re-try resuming from a suspended image at a later time in the boot process, when the requried disk drivers has been loaded. However, this means we need to do changes to the initramfs. I havent got that far yet, but I guess I will try it at some point. ("If it ain't broken, fix it till it is" ) I havent found any good guides on how to do this either..

The problem I was seeing was that the orbiter seemed to be working, and typing "screen -r" showed all the usual suspects were running, but I could not get video or tv to start. I could still control lights though. I tried doing a quick reload router, and refresh and regen this orbiter, but the messages never reached the core (not sure if they should actually) and nothing happend. Also quitting out to the launch manager and clicking "Start Orbiter" had no effect. In the orbiter log it registered that it had started ok however!

If you can’t handle a tongue and cheek comment from someone who doesn’t accept that mankind are a virus out to destroy the planet; maybe there needs to be a disclaimer that states only conformist allowed.

Personally, I think that the prospect of lowering energy consumption by several percent in any scope of operation is good for everyone. Even those superstitious people who believe that electronic devices last forever.

Hmm, I have not seen this behaviour on my system. How do you suspend? I switch to a console session before suspending, perhaps you suspend from within your X session? Not sure if this should matter, because I think the suspend script switches to a console session before suspending anyway.

Either way, you could create a script like the lirc module loading/unloading to stop and start your X server. This way, it will be taken care of automatically when hibernating. I suppose a LMCE implementation (from a menu) would just call hibernate-ram or hibernate-disk, based on user choice. So making a script like this will make this transparent from a LMCE integration's point of view.

I also got hibernation (suspend to disk) to work. I'll do a write-up on this after Christmas, I guess the next days will be a bit busy..

As promised before Christmas, I would post information about suspend to disk. I currently have a SATA HDD in my MD from before I started using LMCE, so I am using that as a swap partition (for suspend to disk). I plan on buying a CF card and CF/IDE adapter and test this, but I don't see any reason why this should not work as well. As far as I know, this will just be detected in the kernel as a normal IDE disk (or SATA, if you have a CF/SATA adapter).

Please note that I have been trying a few things before I ended up with this solution, so please tell me if something is not working, and I will try to figure out what I missed in the howto.

After using suspend for a while, I discovered some problems with playing music after resuming (did not try video or TV). It might be the same problem as you had, chrisbirkinshaw. I also restarted the X server, and all seemed to work again. Not sure why. Anyway, I suppose we need to inform the core about the MD suspending, so it knows that it needs to wake it if it needs to access the MD. Maybe the problem with audio/video is related to the fact that this happens without the core really knowing, and that it somehow messes things up in the Orbiter or Application server.

This may well be the same problem I am having, but it appears it sometimes does work when resuming. I have not idea about when it works and when it don't. I was thinking that it may be dependent on the amount of time the MD has been suspended, but this is just a wild idea, I have no knowledge to support it.

Is this consistent with what you see? Or is the AppServer always dead when resuming, no matter how long it was suspended? Or perhaps it is completely random?

I might have time to look into it during the weekend. I will of course post if I discover anything.

This seems to be the same behaviour I experience. For me, suspend to disk works the same as suspend to RAM.

So this strengthens my suspicion that the AppServer somehow gets "out of tune" with the core during long periods of sleep. I'll see what I can find out, but I suspect we need to have someone with a better understanding of the AppServer/DCE router stuff to look into it.

Regarding debugging the suspending, I haven't done it myself, but I suggest you read the s2ram article linked from the wiki suspend article. From what I understand, it is often a buggy driver that causes suspend/resume to fail.

Matthew,I suppose that by "the MD device itself" you mean the LinuxMCE/Orbiter part? (The required software packages are already available in Ubuntu, so its just a matter of installing and configuring them).

As far as integrating it into the floorplan and suspending the MD via the Orbiter (and other similar uses), I suppose one would need to have a DCE command to tell the AppServer to suspend the MD, and to add a suspend button to the Orbiter power menu, and also add a way to suspend a device from the floorplan (I see there is already a power button on the floorplan, what does this do?).

I have no knowledge about the AppServer/Orbiter, so I wouldn't know where to start such an integration, but I am a C++ programmer (rather, I did some C++ a couple of years ago) and I would probably be able to do it, given the right amount of time

I suppose that by "the MD device itself" you mean the LinuxMCE/Orbiter part? (The required software packages are already available in Ubuntu, so its just a matter of installing and configuring them).

I mean the host PC, as controlled by the LMCE (with maybe a GUI to it in its Orbiter). I'd expect the event to work more like Home Automation, sent by a scenario from the Core under control of an Orbiter or a schedule, or maybe by a presence server detecting where people are in the Floorplan and activating MDs/lights/etc like in Get Smart.

As far as integrating it into the floorplan and suspending the MD via the Orbiter (and other similar uses), I suppose one would need to have a DCE command to tell the AppServer to suspend the MD, and to add a suspend button to the Orbiter power menu, and also add a way to suspend a device from the floorplan (I see there is already a power button on the floorplan, what does this do?).

I have no knowledge about the AppServer/Orbiter, so I wouldn't know where to start such an integration, but I am a C++ programmer (rather, I did some C++ a couple of years ago) and I would probably be able to do it, given the right amount of time

One item in my task list is to help add events to device status in the Floorplan. When I get to that, I'll look at adding a hibernate/restore command to the MD device. I'll tap you if you can help with the C++. I'm a C++ programmer myself, but there's plenty of the coding to go around.