RevoGirl / RevoBoot

The RevoBoot-loader project
http://revogirl.wordpress.com/
Other
50 stars 138 forks source link

DeepSleep hibernation image not picked up #9

Open flAked opened 13 years ago

flAked commented 13 years ago

I was testing hibernatemode 25 and noticed that RevoBoot didn't pick up my hibernation file. Later on Chameleon found an image but thankfully ignored it as it was too old.

RevoGirl commented 13 years ago

I use sleep rather than shutdown and thus I don't have issues with this. Sleep works fine for me, and thus I never planned adding support for hibernation in RevoBoot. I also won't have time for this any time soon.

You might think that it is as easy as porting Chameleon code, but I want to write my own code. To learn something new again, and write it from the ground up. Limiting support to Lion only.

p.s. Pike asked me to answer this - he said that you might want to implement this?

flAked commented 13 years ago

https://github.com/flAked/RevoBoot/commit/73f0255aea561ca62c2d6ea18e6fa05c7f0fc633 https://github.com/flAked/RevoBoot/commit/524a3f8060e0c60ed3c3bde6cbb3c8a8a862f7ef

Let me know if this is OK to include in RevoBoot or if I need to rework something.

This is based on Chameleon code, which in itself just relies on the private kernel header and the resume-code by mackerintel.

Hibernation support can be switched off via settings.h. Hmm I should ifdef the whole resume file ey? Done.

RevoGirl commented 13 years ago

What is the outcome of this patch? What does it add code size wise, and what change do you see in time when you boot with the patch compared to RevoBoot without the patch? Is is worth the trouble?

p.s. Dave (dgsga) said that his setup (with a RevoDisk) boots so fast now that it doesn't even show the spinner!

LOL Who needs hibernation when you have this: http://browse.geekbench.ca/geekbench2/view/423762 http://www.dumpt.com/img/viewer.php?file=myh8h7a5gsozfm2u6629.png http://www.dumpt.com/img/viewer.php?file=s8p6ng17phgwyjc8mdyr.png

flAked commented 13 years ago

There are certain situations when it is desirable to save the entire work status of the OS to disc, power down the PC and resume the next morning. Normal sleep/wake isn't practical in that situation, because the PC still needs to be powered (RAM).

The patch will support the sleepimage that is generated by setting "pmset -a hibernatemode 1".

Disabling HIBERNATE_SUPPORT doesn't extend the binary.

It's not about speed in any way, HibernateBoot must read the entire image into RAM again and that takes time.

@spinner: oh wow! what are RevoDisk's?

EDIT: it would be possible to strip the header and resume.c, because I stripped the graphical preview already, if code size is a concern.

flAked commented 13 years ago

The current patch doesn't work correctly. It worked once, then I changed something and I can't remember what it was, bummer.

Tests with DP4 have shown that hibernatemode 1 (only SafeSleep to disc) is not supported any more (might change for release of course). So this whole patch might get obsolete very soon.

RevoGirl commented 13 years ago

Yeah Lion is going to be a game changer again. That was why I didn't bother about it.

p.s. RevoDisk is just a RevoDrive with RevoBoot on it, but a simple OCZ Vertex 3 series comes pretty quite close too these days. In fact I am thinking about ordering one or two myself (so much cheaper here).