Ok............. (here we go - sorry, but despite all of the data I would like to present I still have not solved this problem)
I have been having this problem for years with MacBook Pro. Right now I'm using a late-2015 i7 MBP with the new SSD (500GB), 16GB RAM (factory max), & no video card, all stock. However, this issue actually started on my last MBP - a mid-2010 i7, otherwise base model / 512GB (I think actually 500GB) HDD / 4GB RAM stock that I upgraded to 8GB pretty quick - amidst a slew of insanity that ultimately lead to that computer becoming all but inoperable. It should be shamelessly noted that I have always kept my hard drives pretty full, as well as the fact that I am a music producer and this is my main production computer, so I have lots of technical software installed like plugin license management software, DAWs with license software that's always running, lots of big audio files / project files (though I try to keep those on an external or cloud drive), Adobe Creative Cloud (but not near everything installed on this machine - I have an iMac with a graphics card for graphics), etc. I can't remember the timeline exactly, but all of this occurred between mid-2013 and late-2015:
• things got UNBEARABLY slow, and I had already maxed the recommended RAM at 8GB with chips from Newegg;
• I got a 512GB Samsung 850 Pro SSD, which SUBSTANTIALLY sped things up - I used the OSX transfer software with the new SSD plugged in via USB in an enclosure;
• Mavericks was going pretty well, and that's when I got the SSD, but then Yosemite happened and I started having issues with the software for my audio hardware and other core functions / software (including, ironically, Logic Pro X, and I realize now that I should have read the forums before upgrading), until eventually the shut down problem started - I definitely can't remember at what point the computer stopped shutting down, but it started on the old machine and this post perfectly describes what happens, and I believe it started on a restart-required software update gone wrong;
• I also remember a full download of the El Capitan installer being stuck hidden somewhere on my hard drive, and I don't remember how I managed to get rid of it but I read the instructions here for certain;
• the display started glitching in the craziest ways - flickering green streaks would show up on black spaces at first, sometimes going away when I pressed down on specific places on the RAM bus and occasionally on the display connector, but eventually red and yellow colors started showing up until finally the whole screen became mostly flickering green pixels and I couldn't do much with it;
• I got the new 2015 MBP with all the bells and whistles minus the video card, still 500GB, still mostly full until literally the other day when I discovered my iTunes library could sync with a Google Drive folder and freed up 120GB - I put my Samsung drive in the enclosure again and this time I installed my profile & files from Time Machine running on an external Western Digital HDD;
• while things were still fresh on the new machine and my backups were current, I wiped and reinstalled the OS several times, both from Time Machine and from scratch (I can't say how grateful I am for this computer's immense speed in troubleshooting this mess);
• oh, and I've taken this to the Apple Store... I took it with two other malfunctioning machines and the kids there were completely bewildered by all of my non-iPhone-related issues;
• the new machine still does not shut down, and on rare occasion the display has shown me tiny little green dots on black, or one or two flashing streaks of white light...
I have Apple Care, but considering the Apple Store couldn't help and I have already gotten a new machine, I'm hesitant to go weeks without a laptop I have read several discussions here and on other forums over the years. I will probably do it in the third year to make sure I'm moving into the future on the best foot I can manage. The only two things in this thread I hadn't tried yet were creating a new admin user to test its situation, and deleting the dock preferences. I first created the new admin user, but decided to run the preferences test before shutting down. I moved the dock plist file to the trash but did not empty it - that file is still sitting there alone (the com.apple.dock.extra.plist was not present, and I do not know if this is weird or not) and there is not a com.apple.dock.plist file in my preferences folder currently after the many boot sequences I am about to describe - and ran the killall Dock command. Still had to manually shut down. When I booted, instead of logging into either user I decided to go ahead and try the login-screen-reboot-fix again, which I've both read about and tried several times. This is where my world changed:
• The screen went black and a software update window appeared, following through with the update sequence I suspected never happened before I started seeing so many people saying their computers worked again after achieving the update in various ways, each of which I tried when I saw them to no avail. I suspect this matter is extremely complicated by now, because I've updated many times over the last two years via safe mode, which always shuts down properly. I might have just reinstalled ancient software on top of my current OS, which I just updated in safe mode yesterday. Needless to say, I was immediately filled with a naive yet detached sense of hope, that was only met with disappointment, but not at first. To my glee, after the update installed my computer shut down for the first time I have seen an MBP I own perform a simple shut down in two years.
• Of course I turned it right back on so I could log into my profile and shut it down, but alas, it would not. Same story as this post. Again. Wah wah.
• Try again... It shuts down!
• One more time... It does not shut down...
• So over the next several shut down attempts I tested different things that I would do. I tried quitting f.lux before shutting down and it shut down, not quitting f.lux and it did not shut down, repeating those two tests a few times, but then I reversed it and tried not quitting f.lux first and it did shut down. I did quit f.lux the next run and it did not shut down.
• This meant one of two things to me. The less likely unlikely scenario was that I incidentally initiated the dock before every other shut down attempt, so I essentially ran the f.lux test again but with engaging or not engaging the dock before shut down. That test was inconsistent in the exact same pattern, but it occurred to me that since I repeated the same test exactly both times the computer may very well be successfully shutting down every second attempt. The more likely unlikely scenario, then, was that the computer followed through with shut down every other boot, or perhaps only after logging in after logging in after an unsafe shutdown. Fortunately, for time's sake, that test started with the computer not shutting itself down twice in a row. Everything so far is inconclusive.
• Over these tests, I noticed that the dock would not show up the first time I put the mouse at the bottom of the screen, but the second - every time. I also believe that since the restart-required update processed I have had to enter my password twice every time I've logged in, but I keep habitually rushing through the login process so that's a hard variable to confirm.
• I finally logged into the new user I created. I only did this once because it was kind of intense. It told me the library was corrupted and I needed to type in admin credentials to reset it in order to use applications. I tried the new user's credentials several times but it kept saying I got the password wrong every try, though I am certain I did not. I tried my account's credentials and it just reset the fields (which doesn't happen in the incorrect password dialogue) and relocated the window if I had moved it. The cancel button wouldn't work in intermittent attempts, but I finally clicked it five times in a row quickly and it cancelled. I tried to shut down from that user, but same old problem. I haven't logged back into that user since, because I have run out of time to deal with this tonight.
I deeply regret putting you through a book of observations and still not coming to a viable solution. I am glad that my computer seems to be shutting down properly about 50% of the time; that's 50% more than I've had for quite a while. At the end of the day, pushing the power button isn't any real strain, this computer still operates like a champ, and it boots in less than 10 seconds every time except safe boot. How unsafe is the manual shut down?