5

when I am not using it, at some point, every day, my MBP tries to log out on its own. When I 'wake it up' I can see message windows about "applications aborting logout", obviously because some applications that needed to save data aren't allowing OSX to close them.

This is extremely irritating, because all applications that have nothing to save, will close down on me, sometimes in the middle of a long download.

My MBP isn't configured for hibernation, or logging out, or even sleeping. It's always does it on AC power and I simply have no idea why.

The problem started with Snow Leopard, and persists with Lion as well.

Output of my pmset utility is:

Active Profiles:
Battery Power       -1
AC Power        -1*
Currently in use:
 standbydelay   4200
 standby    0
 womp       1
 halfdim    1
 panicrestart   157680000
 hibernatefile  /var/vm/sleepimage
 sms        1
 networkoversleep   0
 disksleep  10
 sleep      0
 hibernatemode  3
 ttyskeepawake  1
 displaysleep   60
 acwake     0
 lidwake    1

Does anyone have a clue why my mac tries to shut down all the applications and logout when I don't use it for a few hours? How do I stop this?

2
  • Have you tried creating a new user and seeing if the problem persists there? If the issue is in some obscure setting, it may be easier to delete your user preferences and start again than to try and debug this.
    – dan8394
    Aug 17, 2011 at 3:27
  • Once upon a time, I wrote a Windows application that logs off my computer at a certain time. Then I forgot about it. It ran one night and I couldn't figure it out for the longest time. Perhaps you have something obscure like that in a cron or other scheduler, like a idle-timeout log-off?
    – user479
    Aug 17, 2011 at 5:17

3 Answers 3

9

System Preferences -> Security and Privacy -> Unlock the settings -> click the Advanced button -> Disable the logout option

enter image description here

2
  • Presumably by "this setting" Taylor means the setting described in the answer by ron M.
    – GEdgar
    Jun 8, 2012 at 3:27
  • Whenever I change the default value of "Log out after ... minutes of inactivity" (uncheck, or set anything different/lower/higher than 30), when reopening the System Preferences it will still be checked and set to 30 minutes. It's a damn nightmare! I can't even let Spotify play in the background and the system will close all the applications and logout! 🤬 Oct 31, 2019 at 15:56
6

I believe I discovered the culprit. The "security" settings have a "Log out after "x" hours of inactivity". It was checked on my MBP, but disabled visually due to the settings being locked. This is probably why I wasn't paying attention to it.

Unchecking this option, and letting run overnight, it did not try to log out. Problem resolved.

5
  • Excellent, can I be cheeky and ask you to edit the title of this question to something more descriptive so future users will be able to search more effectively? Cheers,Dan
    – stuffe
    Aug 17, 2011 at 14:52
  • I saw a similar question about this kind of issue here and the same fix was found. :)
    – macaco
    Aug 17, 2011 at 15:37
  • OMG you don't know how long I have tried to find out the cause of this! I've googled multiple times in the past but never found this solution. Thank you!!!! Feb 10, 2015 at 4:15
  • For those confused about where to find this setting (as I was) Head to System Preferences > Security & Privacy > General > Advanced (Down the bottom!) and then un-tick the top option, or turn up the time allowed at idle. Cheers for the answer Ron.
    – KyleM
    Jul 15, 2015 at 23:10
  • To me, the system prevents changing that setting. Even when unlocked, unchecked, changed amount of minutes, it will have everything restored as default, no matter what, when I reopen System Preferences. 😐 Oct 31, 2019 at 15:58
0

okay i have a much better solution for you. Go to mac appstore and download caffeine. It can keep your computer awake and more.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .