Difficult to troubleshoot.
Can you try closing all your programs (and also the ones on system tray) before shutting down.
Another test, disable avast until next reboot and try to shutdown.