iMac 5K (2016) won't wake at all with external monitor plugged in
I have a brand new 27" 5K iMac. My first Mac from Windows - it's been a world of frustration and while most things I've re-learnt or found work-arounds for, I have a major issue of the iMac not waking up from sleep. It took days of changing things and narrowing it down to discover it was an external monitor causing the issue.
I have an LG 23MP75 IPS monitor plugged in at 90 degrees. It's a debug, bash and chat screen. So I develop sites on the main iMac screen in Sublime editor and also view the sites in the browser on it, then on the external I have chrome inspector, terminal and Skype/chat stuff. When the machine is on, it works well, no issues. If it goes to sleep for a short period of time like 30 mins or less, it wakes. If it goes into a deep sleep (hibernation?) then it will not wake. Sometimes holding down cmd+ctrl+p+r and powering on works but mostly not, typically I have to pull out the power cord ! for a reboot. Heartbreaking. The only solution right now it to unplug the HDMI before I go home every day.
The external monitor is connected via HDMI cable which goes into an 'active' HDMI to Mini-display port adaptor. I was told that the adaptor being active is important after I had a non-active one and bought an active one to try to resolve this. I read deleting the hibernation file might help to allow OSX to replace it but I opened it instead and it's blank so not corrupt (sudo rm /var/vm/sleepimage).
If I shutdown and restart, the login screen is badly laid out, it's mirrored display not extended display which is how it's set-up. See images to compare. This makes me wonder if part of the problem is OSX being unhappy with the monitor config outside of being logged-in?
Here's the monitor set up config so you can see it's nothing out of the ordinary:
There's no odd set-up, the machine was brand new from Apple themselves, default out the box, no restore or anything like that as I'm new to Mac.
Can anyone offer any suggestions to fixing the issue so I don't have to either unplug the cable or shut-down (which leads me to see the horrible mirrored login every morning)? Any help would be greatly appreciated.
iMac with Retina 5K display, iOS 9.3.3