Macbook Wont Sleep when closing Lid

Posted:
in Genius Bar edited January 2014
I just got a macbook from a friend.



He had already gotten the logic board and the heatsink replaced by apple



i noticed that ever since i got it that it wont go to sleep when i close the lid



it jsut stays on



now this is PRIOR to all the updates, this is a fresh install of the cds that came with the laptop..



could that be it?



also, when i do a manual sleep... any sudden movement i make to the laptop, causes it to wake up...



can this be fixed?

Comments

  • Reply 1 of 17
    lundylundy Posts: 4,466member
    Moving to Da Genius Bar.
  • Reply 2 of 17
    mgkwhomgkwho Posts: 167member
    same thing happened for me...i got a logic board replaced and heat sink (i think heat sink, at least) and now my lid closing does not turn on sleep.



    I'm not sure if that directly affected it, though, because i have only noticed it for a few days and the logic board was replaced and delivered almost two weeks ago, Monday.



    it seems to vary now if it decides to sleep or not...
  • Reply 3 of 17
    I see similar erratic behaviour on my MBP after updating to 10.4.8 through SU. Which OS version are you running?
  • Reply 4 of 17
    mr. hmr. h Posts: 4,740member
    Have the people who are having problems tried re-setting their PMU?
  • Reply 5 of 17
    im running the lastest version of osx and i did every update apple gave me......
  • Reply 6 of 17
    mr. hmr. h Posts: 4,740member
    Quote:
    Originally Posted by socosurf4


    im running the lastest version of osx and i did every update apple gave me......



    Great. That doesn't answer my question though.
  • Reply 7 of 17
    Quote:
    Originally Posted by Mr. H


    Great. That doesn't answer my question though.



    yes i reset the PMU
  • Reply 8 of 17
    Well, yes, I did reset the PMU (though I have no idea how that was supposed to help, this seems the same kind of voodoo as the permission repair thing) and the problem still persists. It's not immediate though, it takes a couple of days of uptime for it to reappear. A reboot fixes it for a while.
  • Reply 9 of 17
    mr. hmr. h Posts: 4,740member
    Quote:
    Originally Posted by sziwan


    Well, yes, I did reset the PMU (though I have no idea how that was supposed to help, this seems the same kind of voodoo as the permission repair thing)



    Resetting the PMU is not at all as voodoish as repairing permissions. The PMU is the Power Management Unit, so problems with sleep are often to do with the PMU.



    If you launch terminal and type "pmset -g" without the quotes, what do you see?
  • Reply 10 of 17
    Well, I didnt start this thread but I have a similar problem, here's what mine says:



    Active Profiles:

    Battery Power 1

    AC Power 2*

    Currently in use:

    womp 1

    sms 1

    hibernatefile /var/vm/sleepimage

    acwake 0

    sleep 10

    autorestart 0

    halfdim 1

    hibernatemode 3

    disksleep 10

    displaysleep 10

    lidwake 1
  • Reply 11 of 17
    mr. hmr. h Posts: 4,740member
    How much RAM do people have? The MacBooks use a feature called "safe sleep", whereby all the contents of RAM are copied to the HDD before the machine goes to sleep*. It could be that the machine is copying the data and that if you leave it for longer, it will sleep.



    How long are you waiting before concluding that the laptop isn't sleeping?



    You could try disabling safesleep if you wish (I can tell you how).



    * Once RAM is copied to HDD, the laptop enters "normal" sleep. If the laptop is running on battery and it depletes completely, the contents of RAM are lost. Without "safesleep" there would be no way to recover from this situation and any unsaved work when the laptop was put to sleep would be lost, and powering up the machine would result in a normal boot-up. With "safesleep" when the machine is powered back up, the contents of RAM are copied back from the HDD image, returning the user to where they left off. It is the same principal as Windows and Linux Hibernate/Suspend modes.



    If safesleep isn't the issue I can only recommend the following:



    1.) Anything attached to USB, Firewire etc? If so, disconnect.



    2.) Try quitting all apps before sleeping. If problem goes away, then one of the apps you normally run was preventing sleep. Run apps one at a time to try and figure out which it is.



    3.) Any "haxies" (anything that alters system behaviour) installed? If so, uninstall them.



    4.) Any third-party drivers installed (e.g. trackpad driver) that uses a kernel extension? If so, uninstall them.



    5.) Create a new user and log in as said user. If laptop will sleep, then there may be a login item or some such under your normal account which is preventing sleep.



    6.) Any third-party RAM? Take it out and see if problem persists.



    7.) If none of those are the culprit, and you've re-set PMU and PRAM, re-install the OS.



    8.) If that still doesn't solve the problem, there's something wrong with your laptop and you should get Apple to repair it.
  • Reply 12 of 17
    Excellent troubleshooting checklist Mr H!



    I saw directions on how to disable "safe-sleep" on another site, but I am concerned since anything that can only be done from the terminal seems kinda risky. Can you think of any reasons why turning off safe-sleep might cause problems?



    Also, could you please confirm that this is the proper method to turn it off?



    sudo pmset -a hibernatemode 0

    delete /var/vm/sleepimage



    Thanks a million,

    Jebudas
  • Reply 13 of 17
    mr. hmr. h Posts: 4,740member
    Quote:
    Originally Posted by jebudas


    Can you think of any reasons why turning off safe-sleep might cause problems?



    You misunderstood. I was saying that maybe having safesleep on was causing a problem. Turning it off is only a problem if you put the computer to sleep and then let the battery deplete completely.



    Quote:
    Originally Posted by jebudas


    Also, could you please confirm that this is the proper method to turn it off?



    sudo pmset -a hibernatemode 0

    delete /var/vm/sleepimage



    Yes, that it the correct way to turn it off. You don't have to delete the sleepimage file, but if you've turned safesleep off, then the sleepimage file is using up space (equal to the amount of RAM you have + a little bit) on your HDD unnecessarily. Personally, I've turned safesleep off to free up HDD space and to make my laptop go to sleep quicker.
  • Reply 14 of 17
    We misunderstood! I was asking if you thought there were any potential dangers in turning off safe-sleep, not whether safe-sleep was causing the problem.



    Thanks for the confirmation.



    I also found a very good article on this:

    http://www.macworld.com/weblogs/maco...mode/index.php



    Also shows how to remove the sleepimage...



    cd /var/vm

    sudo rm sleepimage



    (or sudo rm -rf /var/vm/sleepimage)



    I picked up 2GB+ of hard drive space immediately!
  • Reply 15 of 17
    Quote:
    Originally Posted by Mr. H


    Resetting the PMU is not at all as voodoish as repairing permissions. The PMU is the Power Management Unit, so problems with sleep are often to do with the PMU.



    Hey, I'm a PM developer, you don't have to tell me that



    I'm still backing my claim that PMU has nothing to do with this specific issue. The lid switch is usually connected to the Embedded Controller (or PMU if you wish), which has some bits exposed to the chipset in the PM register area. You can mask those bits in software, causing the system to ignore certain events (e.g. a wake-up event from opening the lid), but this is purely OS-dependent and this information is not stored in the NVRAM (which means it gets reset over a reboot, which seems consistent with what people report). Generally, there's very few things stored there and that's why I described PMU resetting as voodoish. Bear in mind I speak of x86 only, I know next to nothing about PPC.



    I rather suspect some b0rkage in the kIOMessageCanSystemSleep handling in the OS (a runaway process?), but the problem manifests itself usually when I don't have the time to debug it.
  • Reply 16 of 17

    Currently in use:


     womp                 0


     halfdim              1


     sms                  1


     hibernatefile        /var/vm/sleepimage


     networkoversleep     0


     disksleep            10


     sleep                0 (sleep prevented by 651)


     hibernatemode        0


     ttyskeepawake        1


     displaysleep         10


     acwake               0


     lidwake              1


    Alex-Johnsons-MacBook-Pro:~ a1ex1990$ delete/var/vm/sleep


    -bash: delete/var/vm/sleep: No such file or directory


    Alex-Johnsons-MacBook-Pro:~ a1ex1990$ 


     


     


    Does "sleep prevented by 651" have anything to do with it? If so, how do I go about getting rid of it?
  • Reply 17 of 17

    Quote:

    Originally Posted by socosurf4 View Post



    im running the lastest version of osx and i did every update apple gave me......


     


    Too bad! I don't get the logic of your comment to the problem! peace!

Sign In or Register to comment.