Author Topic: Request: OS 9 hibernation  (Read 1103 times)

Offline powermax

  • Enthusiast Member (25+ Posts)
  • ***
  • Posts: 80
  • Hobbyist programmer
Request: OS 9 hibernation
« on: August 20, 2018, 12:38:45 AM »
Hello crews,

while hacking around the Trampoline, I noticed that Mac OS 9 does support system hibernation like OS X does ("Safe Sleep"). It seems to work on laptops only - I wasn't able to activate it in my iMac G3 indigo.

This feature can be supposedly enabled in the Energie saver control panel. There should be a check box "Preserve memory contents on sleep" in the "Advanced settings" tab.

Can someone owning an iBook G4 or similar verify if the above mentioned option is present in the Energie saver CP?

Enabling that hibernation mode will cause Mac OS 9 to write the entire memory content into a giant file (3 -4 GB?) of the HFS type 'bear' (I love these Apple's creative names). The hibernation file could be stored in the System folder, although I don't know its precise location. It could be named "Memory content" or had a localized name. Mac OS Trampoline looks for a file with the type 'bear' ignoring the actual name.

It would be a huge help in my RE effort if I could get my hands on that hibernation file. For the moment being, its structure can only be guessed.

The task to be done is to enable the hibernation mode, to locate the hibernation file and to send it to me anyhow (preferably splitted in chunks and compressed).

Thank you in advance!
Cheers
Powermax

Offline macdude888

  • Member
  • Posts: 3
  • New Member
Re: Request: OS 9 hibernation
« Reply #1 on: December 15, 2018, 10:11:20 PM »
I have a PB G3 Pismo. I have this option under Energy Saver; however itís grayed out. When I activate balloon help, it says itís bevause it isnít supported on my machine.

Offline darthnVader

  • Platinum Member (500+ Posts)
  • *****
  • Posts: 511
  • New Member
Re: Request: OS 9 hibernation
« Reply #2 on: December 16, 2018, 11:34:43 AM »
iBook G3 600mhz, option is greyed out.

Offline Daniel

  • Gold Member (200+ Posts)
  • *****
  • Posts: 268
  • Programmer, Hacker, Thinker
Re: Request: OS 9 hibernation
« Reply #3 on: December 17, 2018, 08:12:35 PM »
'bear' files have been created artificially a while ago, though it is still unclear if they can be enabled on any system at all under normal circumstances. 9.2.1 doesn't even have the option.

All the bears I have created myself have been named 'Memory Contents', resided in the System Folder, and were invisible. Something like ResEdit's "Get File/Folder Info" option (specifically, the feature that lets you turn invisibility off) is very helpful for interacting with them .

They are the size of virtual memory (vm must be turned on for them to be enabled). Using Open Firmware to limit the usable RAM is required if you want to do anything with the bear, as a file that takes up all of vm space is very very hard to open. Most programs try to load a file into memory all at once, which can't work unless the vm size the bear was created in is less than the current memory size.

Bears seem to compress pretty well, which is nice.

Offline kgllewellyn

  • Active Member
  • *
  • Posts: 8
  • CHRP I say, CHRP!
Re: Request: OS 9 hibernation
« Reply #4 on: April 28, 2019, 10:48:53 AM »
Apologies for bumping a somewhat old thread,

But as it wasn't covered. 'Preserve Memory Contents on Sleep' was disabled due to a bug in the feature that caused data loss. Apple temporarily disabled it using an extension and I believe later permanently disabled it in later software releases. As far as I'm aware, the bug was never resolved and the feature never made production ready. https://tidbits.com/2000/03/20/sleep-memory-extension-blocks-laptop-bug-2/

If you really want to force enable it, you might need to compare contents of system files between the original OS 9.0.x release and 9.1/9.2.x and modify 'em. But you'll likely run into the data loss bug, so use with caution. It should work on iBook G3 and PowerBook G3, and TiBooks I would imagine.

Cheers,

Kai