lpuerto

Q: Computer do not hibernate when battery drained off

Hi!!

 

The computer do not hibernates when the battery is drained off. I think it is a configuration / software issue, because I recently erase de content of the disk and created a new user. In that configuration the computer performed the hibernation and the end of the battery.

 

These are my pmset configuration.

 

Active Profiles:

Battery Power 1*

AC Power -1

Currently in use:

standbydelay         4200

standby              0

halfdim              1

sms                  1

hibernatefile        /var/vm/sleepimage

gpuswitch            2

disksleep            10

sleep                10 (sleep prevented by Google Chrome)

hibernatemode        3

ttyskeepawake        1

displaysleep         2

acwake               0

lidwake              1

 

 

Active Profiles:

Battery Power 1

AC Power -1*

Currently in use:

standbydelay         4200

standby              0

womp                 1

halfdim              1

hibernatefile        /var/vm/sleepimage

gpuswitch            2

sms                  1

networkoversleep     0

disksleep            10

sleep                0 (sleep prevented by Google Chrome)

hibernatemode        3

ttyskeepawake        1

displaysleep         10

acwake               0

lidwake              1

 

I also have setup a fusion drive, replacing the superdrive for a SSD.

 

Does someone know what is going on?

 

Thanks!

MacBook Pro (15-inch Late 2011), OS X Mavericks (10.9.2), 2.5 GHz i7, 16GB, 700GB

Posted on Nov 13, 2014 8:44 AM

Close

Q: Computer do not hibernate when battery drained off

  • All replies
  • Helpful answers

Page 1 Next
  • by lpuerto,

    lpuerto lpuerto Nov 13, 2014 10:41 PM in response to lpuerto
    Level 1 (4 points)
    Notebooks
    Nov 13, 2014 10:41 PM in response to lpuerto

    No one? Any insight?

  • by Eric Root,

    Eric Root Eric Root Nov 14, 2014 10:50 AM in response to lpuerto
    Level 9 (69,536 points)
    iTunes
    Nov 14, 2014 10:50 AM in response to lpuerto

    The report says Chrome is preventing it from sleeping. Quit Chrome.

  • by lpuerto,

    lpuerto lpuerto Nov 14, 2014 2:12 PM in response to Eric Root
    Level 1 (4 points)
    Notebooks
    Nov 14, 2014 2:12 PM in response to Eric Root

    Right now i m on battery and with chrome open:

     

    Active Profiles:

    Battery Power -1*

    AC Power -1

    Currently in use:

    standbydelay         4200

    standby              0

    halfdim              1

    sms                  1

    hibernatefile        /var/vm/sleepimage

    gpuswitch            2

    disksleep            10

    sleep                10

    hibernatemode        3

    ttyskeepawake        1

    displaysleep         2

    acwake               0

    lidwake              1

     

    These is weird!!!

     

    Why could chrome prevent the computer from sleep - hibernate?

     

    By the way... hibernate is the same as sleep?

  • by BobHarris,Helpful

    BobHarris BobHarris Nov 14, 2014 4:02 PM in response to lpuerto
    Level 6 (19,257 points)
    Mac OS X
    Nov 14, 2014 4:02 PM in response to lpuerto

    By the way... hibernate is the same as sleep?

    No.

     

    Sleep keeps power to RAM so when you wake, so there is slight power drain while asleep.  But waking up a sleeping Mac is fast.

     

    Hibernate, writes the contents of RAM to /private/var/vm/SleepImage, and then zero power is used.  When the Mac is started backup, you have to wait while RAM is repopulated from the SleepImage.  This is slower than a sleeping Mac (although if you have an SSD, it is not too slow).

     

    A sleeping Mac will eventually drain the battery to zero.  By default, when a Mac goes to sleep, it also writes RAM to SleepImage, so if the battery does die while asleep, the Mac will then use the SleepImage.

     

    A hibernating Mac can keep a charge for a very long time, as it is not using any power at all.  The battery will eventually loose power as any battery will if you leave it uncharged for a long enough period of time (months/years).

  • by lpuerto,

    lpuerto lpuerto Nov 15, 2014 3:17 AM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 15, 2014 3:17 AM in response to BobHarris

    Good... that is what I was thinking.

     

    So, The mac is not hibernating... saving all the information on disk when it runs out of battery. It just turns off. :-/...


    Is there any solution to this? Should I check and change any configuration?

  • by BobHarris,Helpful

    BobHarris BobHarris Nov 15, 2014 8:14 AM in response to lpuerto
    Level 6 (19,257 points)
    Mac OS X
    Nov 15, 2014 8:14 AM in response to lpuerto

    The computer do not hibernates when the battery is drained off. I think it is a configuration / software issue, because I recently erase de content of the disk and created a new user. In that configuration the computer performed the hibernation and the end of the battery.

    Do you have any utilities such as SmartSleep, which will play with the Sleep and Hibernate settings dynamically?


    Do you have system preferences -> energy saver -> battery -> computer sleep -> Never?

     

    If not, then by default, the Mac should go to sleep when the battery gets to a minimum power level.  In going to sleep, it should create a SleepImage, so that if the battery dies when it is asleep it will still preserve the state of the Mac.

     

    However, if the battery is dying suddenly before it reaches the threshold where the Mac would go to sleep, then the Mac will not have a chance to go to sleep and create a SleepImage.

     

    Some batteries fail in such a way that they say they have nn%, then when they hit nn-1%, they die.  It is possible your Mac's battery is not degrading its charge in a predictable way, and the Mac does not know it should go to sleep.

     

    It is also possible that you have an app running that is telling the Mac to not sleep.  This would NOT have anything to do with the pram settings you have been displaying, it would just be telling the operating system that it is busy doing something and thus the OS should not sleep just now.  I do not know if would stop the battery very low forced sleep or not.  I'm speculating on that.

     

    My best guess is that your battery is not correctly reporting when it is about to run out of power.

  • by lpuerto,

    lpuerto lpuerto Nov 16, 2014 11:22 PM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 16, 2014 11:22 PM in response to BobHarris

    Hey!!

     

    Thanks a lot for the reply!


    I have installed right now caffeine and insomniax, but they are not running always, and they are not running when I am trying to see if the computer hibernates or not. I am totally aware that they can stop the sleep if they are running, but can they stop the hibernation if the computer run out of battery?


    My energy settings on battery are these ones:

    Screen Shot 2014-11-17 at 09.12.59.png

    The battery is new. They just install it last monday.

     

    I think there is something in the OS configuration. Before I sent the computer to service to change the battery, I delete everything and install a clean copy of mavericks and I create just a user for the service. With that user the computer hibernated.

     

    When the computer was back, I delete everything again and restored from time machine. No hibernation again. I create a new user, no hibernation either.

     

    Today I am calibrating the battery for the first time... let's see.

     

    PS/ When the computer have just 10 minutes of battery a banner appears warning me... then no more warnings, just switch off.

  • by BobHarris,

    BobHarris BobHarris Nov 17, 2014 5:57 AM in response to lpuerto
    Level 6 (19,257 points)
    Mac OS X
    Nov 17, 2014 5:57 AM in response to lpuerto

    PS/ When the computer have just 10 minutes of battery a banner appears warning me... then no more warnings, just switch off.

    Looking a little more at your pmset values hibernatemode=3 is the standard default for a Mac laptop, so that mostly leaves software "maybe" interfering (and I really do not know that it could really interfere), and the battery and the OS not being clear on just when power is going to stop.

     

    Hopefully battery recalibration will resolve the issue.

     

    From "man pmset"

    ...

    hibernatemode = 3 (binary 0011) by default on supported portables. The
    system will store a copy of memory to persistent storage (the disk), and
    will power memory during sleep. The system will wake from memory, unless
    a power loss forces it to restore from disk image.

    ...

    That last reference to "power loss forces" is talking about when you put your Mac to sleep and leave it sleeping so long that the "power memory during sleep" finally drains the battery to empty.  It does not refer to the situation you are experiencing where you Mac is not going to sleep before loosing power.

     

    You might check the following.  Put your Mac to sleep.  Wake it backup.  Now use the Terminal and see if you have a sleepimage file:

     

    ls -l /var/vm

    -rw-------  1 root wheel   67108864 Nov  6 10:15 swapfile0

    -rw-------  1 root wheel 1073741824 Nov  6 10:15 swapfile1

    -rw------T  1 root wheel 8589934592 Nov 17 08:54 sleepimage

     

    You should see one or more swapfile(s) and sleepimage.  If you do not see sleepimage, that might also indicate a problem creating the sleepimage, and since your battery is already nearly empty when the Mac tries to go to sleep, maybe it is not longer after, that it dies without a sleepimage to restore from.

     

    NOTE: sleepimage is going going to be big.  The one above, from my Macbook Pro, is 8+ gigabytes.  It could be even larger as I have 16GB of RAM in my Macbook Pro.  So you need to have enough free storage on your Mac to create the sleepimage.

  • by lpuerto,

    lpuerto lpuerto Nov 17, 2014 10:38 PM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 17, 2014 10:38 PM in response to BobHarris

    Seems that it is totally able to create the sleep image:

    Last login: Tue Nov 18 08:10:27 on console

    MBP-lpuerto:~ lpuerto$ ls -l /var/vm

    total 4325376

    -rw------T  1 root  wheel  1073741824 18 Nov 00:07 sleepimage

    -rw-------  1 root  wheel    67108864 18 Nov 08:10 swapfile0

    -rw-------  1 root  wheel  1073741824 18 Nov 08:10 swapfile1

    MBP-lpuerto:~ lpuerto$

    It is not the first one I see in that directory. I have deleted some before, just in hope that the problem is that it was not able to create the image.


    Yesterday, I leave it to die and just died at the time 00:07.  I really do not know what it did yesterday. It suddenly like turn off the screen and seems like it was going to sleep. The fans were still working and I was able to heard some sounds in the inside of the computer. It stopped and I tried to turn it on again without plug it in .... just a little bit of more sound, but not screen. Then I plug it in, and in 5 seconds the screen turned on with the same content I was working

     

    The thing is, I do not see in any moment how it creates the image, like this, which I have seem before. And in previous attempts I heard the start sound and it was very crear that it started from scratch. 

     

    PS/ I have turn on the standby mode.

     

    MBP-lpuerto:~ lpuerto$ pmset -g

    Active Profiles:

    Battery Power -1

    AC Power -1*

    Currently in use:

    standbydelay         4200

    standby              1

    womp                 1

    halfdim              1

    hibernatefile        /var/vm/sleepimage

    gpuswitch            2

    sms                  1

    networkoversleep     0

    disksleep            10

    sleep                0 (sleep prevented by apsd, Google Chrome)

    hibernatemode        3

    ttyskeepawake        1

    displaysleep         10

    acwake               0

    lidwake              1

     

    MBP-lpuerto:~ lpuerto$ pmset -g assertions

    18/11/2014 08:37:03 EET 

    Assertion status system-wide:

       BackgroundTask                 0

       PreventDiskIdle                0

       ApplePushServiceTask           0

       UserIsActive                   1

       PreventUserIdleDisplaySleep    0

       InteractivePushServiceTask     0

       PreventSystemSleep             0

       ExternalMedia                  0

       PreventUserIdleSystemSleep     1

       NetworkClientActive            0

    Listed by owning process:

       pid 100(hidd): [0x0000000a0000016f] 00:25:30 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"

      Timeout will fire in 572 secs Action=TimeoutActionRelease

       pid 320(Google Chrome): [0x0000000100000165] 00:25:58 NoIdleSleepAssertion named: "WebRTC has active PeerConnections."

    No kernel assertions.

  • by BobHarris,

    BobHarris BobHarris Nov 18, 2014 5:32 AM in response to lpuerto
    Level 6 (19,257 points)
    Mac OS X
    Nov 18, 2014 5:32 AM in response to lpuerto

       pid 320(Google Chrome): [0x0000000100000165] 00:25:58 NoIdleSleepAssertion named: "WebRTC has active PeerConnections."

     

    You may need to investigate "WebRTC has active PeerConnections" from your assertions report.  I did some Google searching and found several reports about sleep issues caused by some Chrome plug-ins.

     

    Perhaps this is your root cause.

     

    I am mostly just throwing ideas at the wall, and seeing what sticks.  While I was suggesting the battery is at fault, I would be very happy if it turned out to be software, as in my years of playing with computers, most times when you want to blame the hardware it turns out to be software (except for disk drives which always seem to die on me eventually ).

  • by lpuerto,

    lpuerto lpuerto Nov 22, 2014 1:27 AM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 22, 2014 1:27 AM in response to BobHarris

    That was a extension in google chrome. I have fixed it.

     

    Yesterday night I left it to die with a movie running.

    lpuerto$ ls -l /var/vm

    total 4325376

    -rw------T  1 root  wheel  1073741824 22 Nov 00:10 sleepimage

    -rw-------  1 root  wheel    67108864  1 Jan  2001 swapfile0

    -rw-------  1 root  wheel  1073741824  1 Jan  2001 swapfile1

     

    It is able to create the sleepimage... or at least it tried it. However this morning when I plug it in again, it started from scratch. No loading screen with a progress bar and normal sequence. The only difference is, it asked me for my password, when normally it does not because I have the automatic login to my account enable.

     

    I am thinking to delete everything and install mavericks again. Then load everything from my backup except the system preferences.

     

    The energy and hibernation rules come from the system preferences, not from the user preferences, right?

    Other option would be reinstall the system over the one I have here, but I do not really know if it could work. What do you think?

  • by lpuerto,

    lpuerto lpuerto Nov 22, 2014 3:22 AM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 22, 2014 3:22 AM in response to BobHarris

    I have the feeling that the mac is able to create the sleepimage, but if it totally lost power is not able to reload it. It is very weird.

  • by BobHarris,

    BobHarris BobHarris Nov 22, 2014 3:50 AM in response to lpuerto
    Level 6 (19,257 points)
    Mac OS X
    Nov 22, 2014 3:50 AM in response to lpuerto

    The only difference is, it asked me for my password, when normally it does not because I have the automatic login to my account enable.

    If you have whole disk encryption via Mac OS X's FileVault, it will ask for the password in order to unlock the disk before a cold boot.

     

    Or if you have the Mac set to ask for your password after going into the screen saver, it should ask for the password when restoring from a SleepImage (I think, as I rarely get into a situation where I've run my battery all the way down to zero - it has happened, but not enough for me to remember exactly what I saw).

     

     

    Wiping your system is an option, however, I am unsure as to what it will do.  So for what "I think", it might be best to not trust my opinion on something as drastic as wiping and reinstalling

    I am thinking to delete everything and install mavericks again.

    Make sure you have a copy of Mavericks "BECAUSE" it is NO longer available from the App Store.  You can only get Yosemite.

     

    AND NOT MATTER WHAT, make sure you have a backup (I am the paranoid type and make sure I have 2 working backups before I ever attempt wiping my boot disk).  I like SuperDuper and Carbon Copy Cloner for my backups whenever I do a system upgrade or disk replacement.  Wiping the system is like a disk replacement.  And test that the clones boot.

     

    Then load everything from my backup except the system preferences.

    The energy and hibernation rules come from the system preferences, not from the user preferences, right?

    I am unsure where they are set.  And 'pmset' may exist in power management or PRAM

    <OS X Mavericks: Reset your computer’s PRAM>

    <Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support>

     

    But if you do decide to install from scratch, why not run a test without restoring.  Run your test on a clean system, or install just enough to run your test.  Do not pulling any of your other stuff until the test is over. That way you know if it is part of the Mac hardware (PRAM and SMC on-chip settings are part of the hardware), or if it is software or software configuration files that are sitting on your backup.

    Other option would be reinstall the system over the one I have here, but I do not really know if it could work. What do you think?

    Still make sure you have a backup (again I'm paranoid and always have 2).

     

    Installing over the existing system is less drastic than wiping and installing new.   I've heard of installing over the existing system being helpful for some, however, I cannot say from experience exactly what it does.  If you make good backups, it will most likely be the least drastic of the install ideas.

  • by lpuerto,

    lpuerto lpuerto Nov 22, 2014 4:29 AM in response to BobHarris
    Level 1 (4 points)
    Notebooks
    Nov 22, 2014 4:29 AM in response to BobHarris

    I have a homemade fusion drive and trim enabled. Perhaps, is one of those things keeping it from load the sleepimage when I plugin the computer?

     

    I do not think the fusion drive have nothing to do with it... but perhaps the triming. I do not thing the fusion have nothing to do with it because I have clean install mavericks and create a empty user account. Then, I saw the system hibernate. I mean, I saw the progress bar for saving the state on disk. I do not know if then it was able to restore from the sleep image. I sent it to the support to change the battery.

     

    Lately I haven't see the bar for saving the sleepimage when it depletes the battery. It just turn to black screen, and have the same behaviour as when I order it to do a regular sleep... but without the blinking light in the front.

     

Page 1 Next