I typed in powercfg /lastwake into cmd and it told me an avast sandbox.exe had woken the computer. I've disabled sandbox and it no longer constantly wakes from sleep - within 30 seconds. I scanned it for viruses in linux using clamav and nothing was found.
It’s common for Mac users to be taken unawares by an apparent failure of the sleep-wake functionality of their Macs. As a macOS Mojave user, you may be astounded to find yourself asking what you should do if your mac won’t turn on because you’ve probably presumed that this issue, which has plagued the previous versions, has been addressed in the latest MacOS update. No worries, here will tell you how to fix your Mac not waking from sleep on macOS 10.14 easily and quickly. How to Fix Your Mac Not Waking Up on macOS 10.14 After installing the macOS 10.14 updates, a user can run into issues with the Mac’s sleep and wake functions wherein the Mac refuses to wake when expected or the OS fails to launch after going to sleep, even after the power button or any button on the keyboard is pressed ad nauseam. In another variation of this issue, the Mac might take far too long to wake up. In other cases, it takes multiple clicks of the mouse or keyboard buttons to wake the Mac up.
But in the cases where the system doesn’t respond to the push of any button. The Sleep and Wake activities of Macs are normally regulated by user settings, app activities, connected devices and networks.
That implies that most users encountering this issue might think it’s a technically intricate task to fix a Mac that won’t wake up on macOS 10.14. However, there are several easy ways to fix a Mac that won’t wake up on macOS 10.14. The first thing to do when you notice the sleep and wake functions of your Mac are malfunctioning is to see if there are certain settings that may have triggered this development. Ensure that your Mac’s screen brightness isn’t turned down, your external display isn’t turned off, your Mac isn’t in safe sleep, and that the Mac isn’t turned off. If you’re still short of answers as per how to fix macbook won’t turn on on macOS 10.14, you can get cracking on the following steps to find your way around: 1.
Disable System Hibernation: Note that the hibernation mode is only a preventive measure to prevent the loss of data during a loss of power, you might be able to do without its intervention. To turn off the hibernation mode, run the following commands in the OS X Terminal: sudo pmset standby 0 sudo pmset autopoweroff 0 These two commands disable the settings of the hardware responsible for the hibernation mode.
These include the Apple’s main standby mode option, and a functionality installed in accordance to regulations of European energy. To revert the settings, simply reset your Mac’s system management controller. Another way is to run the commands again, this time replacing the '0' with '1'. Reset FileVault A glitch may impede the storage and retrieval of file contents on the hard disk during hibernation, causing conflicts between full disk encryption protocols like FileVault, which in turn prevent the authentication and loading of hibernation files, leading to a crash as the system wakes up.
To resolve this, disable the full-disk encryption protocols, and re-enable them if the hibernation works fine after the disk is fully decrypted. Clear Out Hibernation Files When the system figures that a hibernation file (files written on the hard disk by the hibernation function) is missing, it recreates the file. But if it does so erroneously, it might damage the file, preventing reading from the system when waking up. To fix, force the system to recreate the files again by the run of the following command: sudo rm /var/vm/sleepimage.