I have run into this issue a couple of days ago and it keeps happening. MacBookPro in question is a 13" 2016 model with Touch Bar running macOS Mojave 10.14.1 (18B75).
If I lock my MacBook with Login window and leave it for some time (it looks like it has to be more than 1 hour but I am not certain) then it shuts down. It doesn't wake up and I have to either reconnect power cable or press power button to turn it on. MacBook is constantly connected to power supply. Energy Saver parameters (for Power Adapter) set do not allow MacBook to sleep:
- Prevent computer from sleeping... - checked
- Turn display off after - Never
I have checked logs and unfortunately I cannot make anything certain out of them. What looks suspicious is this:
Dec 5 09:47:43 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 0 seconds. Pushing respawn out by 30 seconds.
Dec 5 09:48:13 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 0 seconds. Pushing respawn out by 30 seconds.
Dec 5 09:48:43 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 0 seconds. Pushing respawn out by 30 seconds.
Dec 5 09:49:14 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 1 seconds. Pushing respawn out by 29 seconds.
Dec 5 09:49:45 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 2 seconds. Pushing respawn out by 28 seconds.
Dec 5 09:50:14 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 0 seconds. Pushing respawn out by 30 seconds.
Dec 5 09:50:45 mac com.apple.xpc.launchd[1] (com.apple.powerd.swd): Service only ran for 0 seconds. Pushing respawn out by 30 seconds.
Which usually occurs around the time the MacBook "starts sleeping" that leads to shutdown (but also scattered in smaller quantities in logs.)
I have already tried resetting the SMC but to no avail.
Does anyone have any ideas?