Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Is there a way to prevent auto-shutdown at login screen?

This "feature" seems to have been introduced in OS X Yosemite and has continued through at least OS X El Capitan—and most likely MacOS Sierra. If a Mac is started, and there is no login within a couple minutes, it will shut down.


This is really bad from a remote perspective. Let's say I reboot the machine using ssh—if I don't reconnect and log in within this short timeframe, the computer will shut down, and then I have no way to connect to it. The only way to start the machine at that point is to have someone at the physical location. I've completely lost remote access to my machine for weeks because of this. This is not something that should happen without an option to disable it.


My only known workaround is to log in before it shuts down and then keep that user logged in. Unfortunately, this opportunity may be lost if restarting and connecting remotely with slow internet speeds. This functionality makes it so I cannot depend on an ssh connection to my machine.


Is there a way to prevent a Mac from shutting down automatically at the login screen?

Posted on Feb 26, 2017 5:23 PM

Reply
Question marked as Best reply

Posted on Feb 26, 2017 11:01 PM

System sleep is normal after a period of inactivity. Shutdown is not.


Reset the SMC: Reset the System Management Controller (SMC) on your Mac - Apple Support.


Excerpted from the above:


After you perform normal troubleshooting, these symptoms might mean that an SMC reset could be necessary:


  • ...
  • The computer sleeps or shuts down unexpectedly.
22 replies
Question marked as Best reply

Feb 26, 2017 11:01 PM in response to charlesl80

System sleep is normal after a period of inactivity. Shutdown is not.


Reset the SMC: Reset the System Management Controller (SMC) on your Mac - Apple Support.


Excerpted from the above:


After you perform normal troubleshooting, these symptoms might mean that an SMC reset could be necessary:


  • ...
  • The computer sleeps or shuts down unexpectedly.

Feb 28, 2017 5:41 AM in response to dwb

There is no administrator logged in to these machines? I ask because it does not happen as long as someone has ogged in.


Yesterday morning, I have tested this again on all three of my Machines. 2 are personal and one is for work which has never had any account transfers or even so much as a remote connection to any of my other machines. It is consistently reproducible on these three entirely different machines and OS versions. They each have shut down from the log in screen exactly 5 minutes after boot. Again, only after no activity or log-in. That is, completely shut down—not in sleep mode. It would be very far fetched to think this is a bug. If so, it seems to so prevalent that I would expect it to be reproducible on at least some, if not all of the machines of the users in this thread.


This is consistently reproducible on all three of the Macs in my possession. I have tested it again this morning.

  • Mac Pro (Late 2013) - 10.11.6 El Capitan
  • MacBook Pro (17-inch, Early 2011) - 10.10.5 Yosemite
  • MacBook Pro (Retina, 15-inch, Late 2013) - 10.9.5 Mavericks


There are no log messages for the time the auto shut down happens, but here are the times of restart, reboot and the corresponding logs from one of the machines:


  1. Reboot initiated at 9:02:30 AM
  2. Mac had rebooted to login screen at 9:03
  3. Auto shutdown at 9:08 (5 minutes after log in screen visible)
  4. Mac was manually started again at 9:10:41AM


Logs during that time:

{code}

2/27/17 9:02:31.291 AM shutdown[1528]: reboot by [username]:

2/27/17 9:02:31.000 AM kernel[0]: Kext loading now disabled.

2/27/17 9:02:31.000 AM kernel[0]: Kext unloading now disabled.

2/27/17 9:02:31.000 AM kernel[0]: Kext autounloading now disabled.

2/27/17 9:02:31.000 AM kernel[0]: Kernel requests now disabled.

2/27/17 9:02:31.291 AM shutdown[1528]: SHUTDOWN_TIME: 1488204151 290568

2/27/17 9:02:31.291 AM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) System shutdown initiated by: shutdown.1528<-sessionlogoutd.1527<-launchd.1

2/27/17 9:02:31.000 AM kernel[0]: Process launchd [1] disabling system-wide I/O Throttling

2/27/17 9:02:31.000 AM kernel[0]: Process launchd [1] disabling system-wide CPU Throttling

2/27/17 9:10:41.000 AM bootlog[0]: BOOT_TIME 1488204641 0

{code}


I would be very interested to see what your results are. Can you restart your mac and wait for 6 minutes at the log in screen without taking any action?

Feb 26, 2017 11:56 PM in response to charlesl80

charlesl80 wrote:


An Apple advisor told me this was a "security feature", and it happens on both my Mac Pro running El Capitan and Macbook Pro running Yosemite. I know it is intended behavior as per Apple, but as I'm sure we all know, they do not always make the best decisions. If anyone has a solution to disable it, please let me know.

FWIW, whoever you spoke with was mistaken. As a rule first level Apple advisors are well trained but sometimes they are new or have misinterpreted something. It is certainly not a "security feature". As John said, it is not normal for a Mac to shutdown on the log in screen.


Personally I don't access my Macs remotely but the only thing I can even imagine is having trouble waking the remote Mac after it goes to sleep. I imagine you may have to have "Wake for network access" enabled in the Energy Saver preferences of the remote Macs..

Feb 27, 2017 5:07 AM in response to charlesl80

I am the administrator of several Mac labs. All my computers start themselves at 7 am and put themselves to sleep at 10 pm. I manually restart them once a week using Remote Desktop. During the day they remain at the login window until someone sits down and logs in. They do go to sleep after 15 minutes of no activity but they do not shut themselves down after a period of inactivity at the login window.


I cannot think of any setting that would cause this so I have to agree that it sounds like the computer is crashing when some one tries to wake it up. I'd make a note of the time when you attempt to use the computer and then check the console logs after the computer reboots. I suspect you'll find something that gives you a hint either at that time or in the entries just prior to it.

Feb 28, 2017 5:27 AM in response to charlesl80

FWIW, I have six Macs and I can't reproduce it at all. And as has been mentioned, Macs are not set to shutdown when the login screen is up after so many minutes.


I'm not sure how you can tell the difference between a screen that's asleep from a screen that is shutdown on a security camera but I'll take your word for it.


Did you try the "Wake for network access" setting?

Feb 28, 2017 7:26 AM in response to charlesl80

FWIW, I have good news and bad news. 😎


The good news: If you have FileVault enabled a Mac will indeed shutdown after a certain length of time of no activity.

The Bad news: You may be able to disable autopoweroff in the Terminal using the pmset command which may prevent that. However, I don't know what the exact command would be or if it applies to FileVault.


Maybe someone here knows.

Feb 28, 2017 8:01 AM in response to dialabrain

This is fascinating because I have FV enabled on my computers at work and at home and I've not seen this behavior however searching the internet I did find several references includingthis articleI've linked to. In it the author describes his experience with the mysterious shutdowns and what he did to stop them. Perhaps this will help...but it doesn't explain why I don't see this behavior because my circumstances are similar to his.

Feb 28, 2017 8:23 PM in response to dialabrain

Thanks for validating, dialabrain. I have thoroughly looked through all

pmset
settings and tried restarting with
autopoweroff
set to
false
. Unfortunately, the behavior is the same.
Autopoweroff
relates to the even lower power sleep mode available in some systems after sleeping for 4 hours. This delay is configurable with the
autopoweroffdelay
setting. Unfortunately, I don't see anything in the
pmset
man page that applies to this 5 minute shutdown.

Feb 28, 2017 10:32 PM in response to charlesl80

I have not found a way to disable filevault auto-shutdown, but I have found a way to restart while bypassing the filevault pre-boot login screen (where the auto-shutdown happens). This will allow a remote restart without the risk of a shutdown:


sudo fdesetup authrestart


After entering the command and a password for

sudo
, you will need to enter either the filevault recovery key or a user password for a filevault-enabled user. This password will then be stored in memory and used automatically upon boot to satisfy the filevault authentication requirement. After the disk is decrypted, you will then be taken to post-filevault login screen which doesn't trigger shutdown after 5 minutes.


Additionally, the

authrestart
command could be set to load a plist file automatically each time the computer is booted to authenticate filevault automatically, but this partially negates the purpose of filevault, and I don't think it is a great idea to store a password in a plist file.


I found this information here:

https://derflounder.wordpress.com/2014/12/18/ten-things-you-might-not-know-about -filevault-2


I'd still like to find a way to disable auto-shutdown permanently, but at least this is a workaround for the remote restart issues.

Is there a way to prevent auto-shutdown at login screen?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.