Keep in mind that caffeinate only works when running on AC power. For best results you’d probably want to install the screen saver file called KPSaver and then set an appropriate time for the screen saver to activate, or just enable the screen saver as usual and let it activate the fake kernel message in time.
Here's how to fix MacBook Pro going back to login screen randomly. You MUST run sudo pmset -a disablesleep 0 if you want to restore normal sleep.įor more usage info use man pmset and man caffeinate in your terminal. MacBook Pro users reported that their computer randomly goes back to the login screen. ❗️❗️❗️ WARNING: After you disable sleep with sudo pmset -a disablesleep 1 your mac will stop sleeping and the Sleep option under the apple menu will stay greyed out even after a reboot and even on battery power.
Pmset -a disablesleep 1 & sleep 3600 & pmset -a disablesleep 0 Then opening the screensaver control and see what happens. I think the path is /System/Library/Screen Savers/ If you know which one it is, you can try moving it into the trash (temporarily, dont empty it). Since freezing is a performance issue, optimizing overall performance could help. One thing you can try is to move the screen saver module that is currently set out of the System folder. then last night, after having it on for about 1 day, or a little less, it froze again. the first crash happened after installing the ram, updating the firmware, and leaving it on for over 1 day, i hit the expose button, and it froze in expose. With macOS Big Sur in particular, some users report the freezing is followed by an unexpected system restart. i added 4 gb of ram, so now i have 6gb of ram. Sometimes, new macOS versions tend to cause freezing. # prevent sleep for 1 hour while on battery (this must be run under a root session with `sudo -i`) With macOS 11 up and running, it’s important it runs smoothly. # after running this command you'll notice that the Sleep option # disable sleep (while plugged in or on battery)
# by typing `sudo -i` followed by your password) # (prefix the command with `sudo` or get a root session There is no need for external utilities - you can do it using the ootb Apple command line utilities: # prevent idle sleep while plugged in