Weird Auto-boot / Startup Issue

Discussion in 'macOS' started by 2Turbo, Sep 22, 2013.

  1. 2Turbo macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #1
    At night I shutdown my Macs, switch my surge protector/power strip off (which fully cuts power to computer). When I switch it back on in the morning my Macs auto-boot without me pressing the power button. This seems to only happen if the power has been off overnight. If I simply cut power and in an hour turn back on, it probably won't auto-boot.

    This is extremely annoying and I can't figure out how to fix it. I'm using latest firmwares and I don't think 10.8.5 is going to fix it.

    This happens with with Mountain Lion on MBA mid-2012 & iMac 2007.

    Any ideas?
     
  2. satcomer macrumors 603

    satcomer

    Joined:
    Feb 19, 2008
    Location:
    The Finger Lakes Region
    #2
    Did you check System Preferences->Energy Saver?
     
  3. 2Turbo thread starter macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #3
    Yep. No schedule settings are checked, and everything else is off. Power nap is disabled but wouldn't matter cause I'm not entering sleepmode, just shutting down.

    What in the world could be causing this on 2 different setups with clean installs of OSX...
     
  4. 2Turbo thread starter macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #4
    It even occurs when my iMac has been unplugged a bit from the wall, then as soon as I plug into wall, it starts booting. :confused: This is really the most retarded feature of a Mac.
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    This sounds like the power-manager feature that automatically restarts after a power failure.

    That feature used to be available as a checkbox under Energy Saver in System Preferences. Or maybe it's still there; the only machine I have running Mtn Lion is a MacBook Pro, and it doesn't have the capability, so I don't see a checkbox.

    See here:
    http://www.virtuallyghetto.com/2013/02/enable-auto-startup-after-power-failure.html

    Look for the checkbox that says "Start up automatically after a power failure". If you see a checkbox, and it's checked, then uncheck it. If you see a checkbox and it's unchecked, then check it and uncheck it. Then test it by shutting down, unplugging the computer, and plugging it back in.

    The feature is also readable and writable using the 'pmset' command in a Terminal window. Copy and paste this into a Terminal window:
    Code:
    pmset -g | grep auto
    
    If you see an autorestart line, copy and paste that into a reply and post it here. If the autorestart value is 1, then the feature is enabled (i.e. checkbox in Energy Saver is checked). If the autorestart value is 0 the feature should be disabled.

    Here's the pmset man page:
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pmset.1.html
     
  6. 2Turbo thread starter macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #6
    Finally! I don't have that check box on my MacBook under 10.8.4 but I ran the terminal command and it gave this return:
    Code:
    autopoweroffdelay  14400
    autopoweroff         1
    Is there a way to turn it off through a terminal command?

    Thanks so much I thought I'd never get to the bottom of this. :D
     
  7. chown33, Oct 3, 2013
    Last edited: Oct 3, 2013

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    There's something I don't understand.

    You say there isn't a checkbox on your MacBook, which makes sense to me.
    I also don't see any autorestart value listed, which also makes sense.

    What doesn't make sense is in your first post said you "switch my surge protector/power strip off". If your MacBook charger is plugged into that power strip, then this will cause the MacBook to switch over to battery power. If the battery runs down overnight, then your MacBook will turn itself off as the battery becomes extremely low. All this makes sense, and is how MacBooks are designed to operate. If you then switch the power-strip back on in the morning, it will start charging the battery. If the MacBook's cover is open, it will then start up as it's designed to. If the cover is closed, it won't startup (again, as it's designed to). So which part of this behavior isn't what you expected to happen?

    If you want to prevent the MacBook from starting up, the simplest action is to leave the charger on. I don't understand why you wouldn't want it to charge overnight.

    If you insist on turning the charger off, then close the screen so the MacBook sleeps overnight. Or press the power-switch, then choose "Sleep" to manually sleep it. Sleep consumes less power, and is less likely to drain the battery down to nothing overnight.


    The values you show for autopoweroff and its associated delay for the MacBook are:
    Code:
    autopoweroffdelay  14400
    autopoweroff         1
    
    This tells me that autopoweroff is enabled, and the delay is 14400 seconds, or 4 hours. This means that after 4 hours of sleeping, the computer will put itself into deep-sleep, which consumes the minimum amount of power, but takes longer to wake up.

    You didn't post any results for the iMac 2007, so I can't tell you anything about that computer. Post results and maybe I can. Without results, no one can.
     
  8. 2Turbo thread starter macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #8
    I fully 'shutdown' at night. I keep the screen open. The battery doesn't 'run down'. I don't use sleep mode at night. As soon as I enable power, both systems startup on their own.

    I take it you don't know a terminal command to disable that?
     
  9. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #9
    Post the complete output of this Terminal command run on the MacBook:
    Code:
    pmset -g
    
    Please describe your shutdown procedure and power-strip turn-on procedure step by step. Example:
    I press the power button, then I choose 'Shutdown'. After shutdown completes, I switch off the power strip. In the morning, I first turn on the power strip. At that time, the MacBook (or iMac, or both) starts up without me doing anything else.


    The exact commands differ for the MacBook and the iMac.

    As I said before, you didn't post any results for the iMac 2007, so I can't tell you anything about that computer. Post results and maybe I can. Without results, no one can.

    By "post results" I mean copy and paste the 'pmset' command I posted into a Terminal window, then copy and post the complete output into a reply here.
     
  10. 2Turbo thread starter macrumors 6502

    2Turbo

    Joined:
    Feb 18, 2011
    #10
    For now lets just focus on the MacBook.

    Code:
    Active Profiles:
    Battery Power		-1
    AC Power		-1*
    Currently in use:
     standbydelay         4200
     standby              1
     womp                 0
     halfdim              1
     hibernatefile        /var/vm/sleepimage
     darkwakes            0
     networkoversleep     0
     disksleep            0
     sleep                0 (sleep prevented by 276)
     autopoweroffdelay    14400
     hibernatemode        3
     autopoweroff         1
     ttyskeepawake        1
     displaysleep         2
     acwake               0
     lidwake              1
    Running on power with full battery (MacBook), I shutdown the computer (leaving the lid open). After shutdown completes, I switch off the power strip. In the morning, I first turn on the power strip. At that time, the MacBook (and iMac) startup without me doing anything else. (I didn't press power button)
     
  11. 53kyle macrumors 65816

    53kyle

    Joined:
    Mar 27, 2012
    Location:
    Sebastopol, CA
    #11
    Try entering this command into terminal:
    Code:
    pmset autorestart 0
     
  12. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #12
    Too bad; the iMac might be simpler. It has no battery, and it's older, so has fewer power-management capabilities.


    First, thanks for posting that. I don't see anything specific that looks liike it would wake it when the charger is applied. The battery profile might show something different, so please copy & paste this command into a Terminal window, then copy and paste complete output into a reply:
    Code:
    pmset -g custom
    

    Second, although I see nothing specific, you could try a "shotgun" approach. This will turn off several power-management parameters and see if it makes a difference when you leave it overnite. If it doesn't, you can revert to the originals. If there is a difference, we can turn them back on one by one until the culprit is found.

    To do this, you must first be logged in using an admin account. If not, do that first. Then launch Terminal.

    Next, copy & paste this command into a Terminal window:
    Code:
    sudo pmset -a standby 0 acwake 0 autopoweroff 0 lidwake 0
    
    It will ask you for a password. (If you've never used 'sudo' before, you'll also see a warning followed by the request for password.) Enter your admin password. Nothing appears in Terminal while entering the password (no echo). When password entry is done, press the RETURN key.

    You can confirm that the new settings were stored with this command:
    Code:
    pmset -g custom
    
    It should show the names with new values.


    Finally, please do an experiment:
    1. Shutdown the MacBook as usually done.
    2. Turn off the power-strip as usually done.
    3. In the morning, leave the power-strip off, and press the power-button on the MacBook.
    4. After it starts, and is showing a battery reading, what is the battery percent-charged number?
    5. You can turn on the power-strip after getting the battery reading.


    ----------

    From 'man pmset':
    pmset must be run as root in order to modify any settings.
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pmset.1.html
     

Share This Page