Applications like iTerm often prevent this and it tends to look like the machine is constantly restarting. Once you know the problem, googling the answer is easy and it quickly becomes clear that you are not the first to have this issue.īut to summarise, macOS added a setting which logs you out even when the screen is locked as it is still counting this as inactivity. How to fix macOS automatically logging out This also now totally smells like macOS itself not an application doing this, it seems far less likely an application would attempt to log out the user than restart it, so it’s looking more like there is something in macOS forcing a log out.
Now that is the right timestamp, so the machine isn’t doing a full reboot, rather it’s logging my user out. log show -predicate 'eventMessage contains "sessionlogoutd"' -last 6h
Working out how to identify in the logs when a Log Out occurred was a little bit of trial and error, but eventually settled on searching for sessionlogoutd within messages. I had made the assumption the machine was trying to shutdown and restart what if it was just logging out? Yet the timestamp is bothering me what if it’s not trying to shut down at all?īoth Sleep and Lock screen leave the user’s apps and space intact while Log Out and shutdown close apps. So something is sending /sbin/shutdown command. We shall skip over states 1, 2 & 4 and simply take the good news the machine is not crashing, it’s doing this on purpose. The second that the shutdown cause was 5… Which is, it was correctly shutdown. log show -predicate 'eventMessage contains "Previous shutdown cause"' -last 24hĪ few interesting things to note from the image, number 1 the timestamps are off by a couple of hours.
While restarting, it’s not shown the typical Kernel panic style messages, and the reboot has been quick, but after some googling found George Garside blog which has a handy one-liner for looking at your logs for what the last shutdown cause was and more importantly what the error code are. Maybe the issue, therefore, is an issue with the machine. So it seems my settings are correct and nothing obvious looks like it will cause a power-off or restart while locked. I was sort-of expecting autopoweroff to be set to 1 but nope, in this case that doesn’t seem to be the case. Lock a Mac Screen Jan 17, - 47 Comments.This lists the system-wide power settings if ran in a terminal as an administrator (it doesn’t need root privileges). Reproduction without explicit permission is prohibited.
What did that sign mean? I only have one password on it. Hot corners allow you to drag to the mouse pointer to one of the four corners of the screen to initiate an action - you can use one as a sleep shortcut on your Mac.
The Fastest Way to Lock or Sleep Your Screen in Mac OS X?.How to lock your Mac or put your screen to sleep in macOS.Lock your computer screen instantly in OSX El Capitan.This works in a similar way to the previous one, but rather than just lock your Mac it powers down the hard drive, puts the CPU into low power mode and stops background tasks in order to save energy. You can also use a keyboard shortcut to put your Mac to sleep. This will lock your Mac and return you to the Login screen. February 7, at 6: In order to lock your screen, you need to set up the password in System Preferences. Enter your email address below: Posted by: February 7, at 5: Young Jessie M. When the screen is unlocked by entering a password, the 10 min. If you set sleep to never, then using screensaver lock ensures it never goes to sleep, keeping it available for remote access. Is there any way I can keep my Mac on while locked and also avoid the screen from turning off? Lock a Mac Screen That part is really annoying if you want to lock the Mac, but keep it running e. As far as I know, my Mac goes to sleep after a while when the screensaver is enabled using hot corners at least the screen turns off after a while - even with Caffeine app activated. Who the hell would chose to do more work to do the exact same thing!!!! Not to mention if you forget to lock the screen, you can set an idle time that will do it for you!! One thing that remains unanswered is if this new lock screen will actually keep the Mac awake indefinitely.