Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jjtownsend

macrumors newbie
Original poster
Jan 14, 2011
6
0
I just got a new aftermarket battery for my 15" UB MBP that holds charge great, the only problems is that now when I close the lid and the computer isn't plugged in, it seems to dump the ram to the HDD and make for a very long wake up time. This is even the case when the battery is fully charged. I zapped the PRAM and tried changing the sleep preferences in my terminal. Nothing.
What's going on?
 
Sounds like it is hibernating rather than sleeping. You said it's an aftermarket battery and perhaps this battery doesn't communicate with the laptop the way an Apple approved battery would. The laptop probably thinks the battery is almost dead and thus dumps the RAM to HDD and hibernates to save your OS state.
 
I would do...

sudo pmset -a hibernatemode 0

Into terminal, that'll prevent hibernating... then go and delete your sleepimage file to free up however much space your RAM equals.
 
When I put in "pmset -g" to the terminal it says "hibernate mode: 3". It also says my battery power is -1 (this mean anything?)
I have conditioned the battery and if I am using the laptop normally, the battery lasts fine and the meter seems accurate.

sudo rm /var/vm/sleepimage

I put that in and I assume it deleted something (?) What did I just do?
 
Last edited by a moderator:
I put that in and I assume it deleted something (?) What did I just do?

ReMove files. You deleted the file that held the contents of RAM, after it was written to the HD.

Just as a word of warning. Don't blindly execute Terminal Commands if you aren't sure what they are going to do. A malicious poster can have you type in something that would delete your entire HD. Even someone who means well may mistype, and suggest something that would be harmful instead of helpful. After someone has posted a Terminal Command, you could also wait a couple of days for the other posters to proof read the suggested command, if you are paranoid.

I found a link here of useful commands. I don't do Terminal Commands, so can't vouch for their accuracy.
 
After someone has posted a Terminal Command, you could also wait a couple of days for the other posters to proof read the suggested command, if you are paranoid.

We typically don't take that long to oust someone. I give it 30 minutes tops.

But I do agree with your advise.
 
All right guys, thanks for your help so far. I've now deleted my dumped ram file and set my hibernate mode to "0". Now when I close the lid and walk away for half an hour running on just the battery, my computer totally shuts down.
What does this tell me?
 
Is the light flashing when you close the lid?

In hibernatemode 0, it stops the computer from writing the RAM to HDD. The only purpose this has is when the computer loses power in which it will not be able to recover everything you had open when you power it back up because the memory was held in the RAM only. The "sudo rm /var/vm/sleepimage" removed the sleepimage(equivalent to ram GB) from the HDD which was created by hibernatemode 3 or 25.

Hibernatemode 0 = Save to RAM only, non recoverable after powerloss.

Hibernatemode 3 = Save to RAM and HDD, loads from RAM unless powerloss then it recovers from HDD.

Hibernatemode 25 = Save to HDD only, loads from HDD all the time. Slow boot/unsleep times but saves power.
 
Is your RAM going inactive by chance? I had the same issue myself and just figured that time between restarts usually meant progressive wiring of RAM. This is an interesting topic.
 
Not sure how to tell if my ram is going inactive... But this problem only arose once I switched batteries, so I have a hard time believing its a ram problem...
 
Yeah the sleep light flashes initially, but if I leave it for an hour or two, it completely shuts off even with full battery. If I close the lid and walk away for 20min and open it back up though, everything is fine. Its just the longer periods of time I leave it sitting that seem to kill it.
Not an apple battery...
 
Yeah the sleep light flashes initially, but if I leave it for an hour or two, it completely shuts off even with full battery. If I close the lid and walk away for 20min and open it back up though, everything is fine. Its just the longer periods of time I leave it sitting that seem to kill it.
Not an apple battery...

Thats the problem...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.