Sometimes I have the same problem but I believe it to be caused by a program that won't allow me to shut down until it closes but I don't know what program it is. Here's what I do
Ctrl+Alt+Del
Select "Shut Down" Then select "Turn Off". For some reason, this method seems to force it to shut down immediately for me. Give it a try. It's a temporary band-aid.