I am having problems with applications re-launching from scratch, rather than continuing where they left off, when resuming my Mac (alumimum MacBook, fall 2008) after its battery runs low. This results in losing any unsaved work and very slow resume times. How can I prevent this?
This problem only appeared during the past few months after I upgraded to Lion. I am now running Lion (10.7.3)
In the past (Snow Leopard), after the battery ran low/out, the computer would keep track of the state of all open applications and the computer was plugged in and resumed (power key). No data was lost and I was able to get right back to work.
But now, when the battery runs out, most/all of the previously running programs relaunch from scratch. For browsers (Chrome/Firefox) this means bringing up an error page and asking if I'd like to restore the session. Microsoft Office products splash screens re-appear and I am prompted to recover files from backups. Terminal starts a new session with old results greyed out. LyX attempts to load backup files. MATLAB splash screen re-appears and I lose all unsaved data. Etc.
Visually the resume process is also different: Rather than showing a greyed out version of the desktop as I left it with a progress bar, I now get a generic login screen with the grey tweed background. However, it does not behave as though I had manually forced a power off since a) rEFIt doesn't prompt for Mac vs Windows and b) All applications that were previously running start again, rather than only the default login set.
pmset -g customshows that all power modes are using the default
hibernatemode 3where the system state is both written to disk and kept in memory as long as the battery power allows.
- Battery is in the "Replace Soon condition"
- Harddisk is fairly full 27/285GB free
- 4GB of RAM
My best guess is that my battery runs out before OS X has a chance to finish saving the full memory image to disk. I often run lots of memory intensive programs and use all of the system memory (4GB) plus ~8GB of swap. How can I tell if this is the problem? And if it is, what can I change so that OS X has enough time to save a full memory image before the battery runs out?
Any thoughts on how to enable a robust sleep when the battery runs out?