This question already has an answer here:
I have a 2016 MacBook Pro 15", running macOS Sierra, which fails to shutdown properly. Originally when I closed all applications and then went to shutdown, it would take less than 10 seconds to completely power down.
Now, when shutting down, applications will close properly, the Desktop turns to a black screen (all normal so far) but then the display will not power down, as the backlight remains on. This lasts for anywhere from 9 minutes up to nearly 20.
What I have tried:
- I have removed all login items from my user.
- I have done a boot into safe mode.
- I have reset the NVRAM (PRAM).
- I have live-chatted with Apple support and went through clearing the User and System Library/Cache directories.
Nothing seems to resolve the issue.
One point to note is that when I reach the login screen, and choose "Shut Down" instead of entering my user password, it will shut-down quickly. I suspect that an application is preventing the normal shutdown, but don't know how to go about finding it.
I have attempted to look through the console for errors but nothing seems to leap out at me.
Can someone please suggest a solution, or a means to identify what is causing this issue?
UPDATE: I am just performing the latest macOS 10.12 update to see if that helps at all.
SECOND UPDATE: After using live chat with an Apple engineer, we have narrowed it down to the Launch Agents / Daemons. We moved most of them to the trash, and I have tried to add a few back in (shutdown, reboot and then attempt a clean shutdown). It could be the MySQL agent. I don't have many others apart from Adobe / Creative Cloud, Google's Keystone and Oracle MySQL.
Not sure if I should add this as an answer?
Note: This is not a duplicate as my Mac didn't hang permanently, and the solutions in that question didn't help me in this case.