MBP dumping ram when lid closed.

Discussion in 'MacBook Pro' started by jjtownsend, Jan 14, 2011.

  1. jjtownsend macrumors newbie

    Joined:
    Jan 14, 2011
    #1
    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?
     
  2. SandboxGeneral Moderator

    SandboxGeneral

    Staff Member

    Joined:
    Sep 8, 2010
    Location:
    Orbiting a G-type Main Sequence Star
    #2
    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.
     
  3. tjb1 macrumors 68000

    Joined:
    Aug 26, 2010
    Location:
    Pennsylvania, USA
    #3
    If you do this in terminal

    pmset -g

    what does

    hibernatemode

    read?
     
  4. snberk103 macrumors 603

    Joined:
    Oct 22, 2007
    Location:
    An Island in the Salish Sea
  5. millerb7 macrumors 6502a

    Joined:
    Jun 9, 2010
    #5
    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.
     
  6. tjb1 macrumors 68000

    Joined:
    Aug 26, 2010
    Location:
    Pennsylvania, USA
    #6
    sudo rm /var/vm/sleepimage
     
  7. jjtownsend, Jan 14, 2011
    Last edited by a moderator: Jan 15, 2011

    jjtownsend thread starter macrumors newbie

    Joined:
    Jan 14, 2011
    #7
    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.

    I put that in and I assume it deleted something (?) What did I just do?
     
  8. snberk103 macrumors 603

    Joined:
    Oct 22, 2007
    Location:
    An Island in the Salish Sea
    #8
    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.
     
  9. Eddyisgreat macrumors 601

    Joined:
    Oct 24, 2007
    #9
    We typically don't take that long to oust someone. I give it 30 minutes tops.

    But I do agree with your advise.
     
  10. jjtownsend thread starter macrumors newbie

    Joined:
    Jan 14, 2011
    #10
    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?
     
  11. jjtownsend thread starter macrumors newbie

    Joined:
    Jan 14, 2011
  12. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #12
    I use SmartSleep to set the appropriate sleep mode, though it does the same as the Terminal commands do: www.jinx.de
     
  13. tjb1 macrumors 68000

    Joined:
    Aug 26, 2010
    Location:
    Pennsylvania, USA
    #13
    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.
     
  14. NickZac macrumors 68000

    NickZac

    Joined:
    Dec 11, 2010
    #14
    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.
     
  15. jjtownsend thread starter macrumors newbie

    Joined:
    Jan 14, 2011
    #15
    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...
     
  16. tjb1 macrumors 68000

    Joined:
    Aug 26, 2010
    Location:
    Pennsylvania, USA
    #16
    Does the sleep light flash when you close the lid? and is this an Apple battery?
     
  17. jjtownsend thread starter macrumors newbie

    Joined:
    Jan 14, 2011
    #17
    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...
     
  18. tjb1 macrumors 68000

    Joined:
    Aug 26, 2010
    Location:
    Pennsylvania, USA
    #18
    Thats the problem...
     

Share This Page