My iMac won't shutdown, Happened since maverick.

Hi everyone, I'm Chin.
My iMac won't shutdown after I commanded it. The top bar and desktop icons were disappeared, but the Dock still show.
This happened since Marverick at that time I solved problem with used shutdown shortcut to commanded it again, so it worked.
But in Yosimite my shutdown shortcut wasn't solved, and it happen often. I closed every application before shutdown sometime worked sometime this happened.
I use iMac27" Mid 2011 i7 4Gb of Ram HD6070M 2048Mb. OSX 10.10
Thank you for your help.
Please I very excite every time that I shutting down my iMac. I feel like Oh My God Again! let her shut down.


First please never try to solve a problem by installing a new version of OS X, it just makes the problem more difficult to solve. Because you have done so I would recommend doing an erase and re-install of OS X. Of course have a backup in hand so when you get  the machine running correctly you can restore your documents. You will need to manually re-install any applications. Use the Snow Leopard DVDs that originally came with the machine to do the erase and install, re-install SL, update it to 10.6.8 and then test shutting it down. Once it is operating normally then you can upgrade to Yosemite and restore your data and apps.
Good luck.