You can install blueutil and SleepWatcher via homebrew and set a .sleep code to do a script that do shell script "/usr/local/bin/blueutil -p 0" in order to disconnect Bluetooth when going to sleep mode.
To use SleepWatcher, make a shell script in your home directory named .sleep and give it permission with the chmod command.
The .sleep script could be :
So lets see if I have this right... if you shut it down it turns back on no problem. If it goes to sleep it takes 5 days to turn back on.
Just a suggestion... what if you turn off sleep in System Preferences -> Energy Saver? I'm interested if it does the same thing if it stays on but just goes dead.
I would also try a fresh OS install either from a ...
I have found that Google Play Music playing music audio can do that. When it's playing music (even in the background), Chrome Preventing Sleep shows "Yes". When music playing is paused, after a few seconds, it's changed to "No". Start playing again and wait a few seconds, it changes to "Yes" again.
You’ve done a pretty good job so far of troubleshooting this yourself and there are many things that prevent sleep out of the box and by design.
What I would do next is exactly what you’re asking about - a targeted check to see if an application is what’s stopping your Mac from going to sleep.
To do this, follow these steps:
The next time your Mac isn’t ...
There were two different settings I had to fiddle with to get the computer to go into standby mode when I wanted it to, without periodic wakeups. This doesn't mean the battery drain issue was solved, though; I suggest reading the "Ongoing battery drain issues" section near the end of the answer for an explanation.
For those interested only in this partial ...
So the closest answer I could get was this console command:
log show -v | grep "Entering Sleep state due to 'Clamshell Sleep'"
It's not perfect as it only goes back 6 weeks or so, and it shows more sleep messages than I need. But from the results set, its easy to pick out the last 'System Sleep' of the day.
To answer my own question:
Most likely the issue was caused by the WD Driver Utility app, as reported by many in the WD forums.
If not that, it was caused by an unpowered 7x USB-A to USB-C hub that the HDD was connected to earlier.
Either way the problem is now gone.