MacBook Pro takes 10 minutes to shutdown 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.

My problem:

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.
The first thing I would do is reset the System Management Controller. Do this as follows:


Shut down your MBP
Keep the power cable plugged in.
Press at the same time shiftoptioncontrol (on the left side of the keyboard) and the power button
Let go
Turn your computer back on with the power button.


Once you've done that, test for any differences and report back.

Resetting NVRAM

You mentioned that you reset the NVRAM. Just in case you weren't aware, resetting this on the late-2016 MacBook Pros is different to all other Macs. The correct process is:


Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then immediately press the commandoptionpr keys. 
Keep these keys pressed down for at least 20 seconds!
Let go of the keys and let your Mac reboot normally.


Note 1: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

Note 2: These steps will also work to reset the NVRAM (or PRAM) for all Macs. However, the late-2016 MBP models actually required the commandoptionpr keys to be held down for 20 seconds, while earlier Macs did not require this, but doing so did not cause any problems either.