FINALLY
Through trial and error I finally managed to get a clean SFC / SCANNOW
and I have not had the sleep issue since doing this and getting a clean system.
Knock on wood.
Here is the summary of what I did, leaving out the parts where I banged my head against a wall.
I started with my Surface Pro4 fully updated. The build number was 10.0.10586.0
I have never done a reset. The Pro4 is pretty new, but I wanted to avoid a full reset.
My problem was I had no image to run the DISM command against because there wasn't one on my machine, and it wasn't able to use Windows Update to get the image. DISM command would always report Error 0x800f081f - no matter what I tried. It could not find
the source for some reason.
So this is what I had to do to clean up my system:
Step 1: Run CMD as Administrator. Click Start, type CMD, right click Command Prompt, and run as Administrator.
Step 2: I ran this command three times in a row as suggested on a technet article: SFC /SCANNOW
This detected corrupted files, and a bunch of issues but it could not fix some of the issues.
Step 3: Ran checks:
This command told me I had corruption:
DISM /Online /Cleanup-Image /ScanHealth
This command reported that the corruption could be repaired:
DISM /Online /Cleanup-Image /CheckHealth
Step 4: Found an image, finally!
I had no image for the DISM command to use! My C:$Windows_BT and C:$Windows_RT folders did not have the image anywhere within.
I tried creating an image with the online Microsoft ISO Tool but that didn't work with DISM.
It would not recognise the install.ESD as a source no matter what I tried.
So I downloaded a tech bench Windows 10 image from Microsoft from this URL:
https://www.microsoft.com/en-us/software-download/techbench
Step 5: Mount the image downloaded
I mounted the image that was downloaded, by right clicking the file, and selecting Mount.
This will assign a drive letter (say D:) to that mounted image, which is used in the command below.
Step 6: This command finally repaired the damage:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:**D:**Sources\Install.WIM:1
This fixed my issue with the opencl.dll
This also resulted in clean scans coming out of SFC /SCANNOW
So far I have allowed the Surface Pro 4 to sleep for various periods of 5 minutes, up to a half hour, and it has been waking up each time. I haven't had to do a forced reboot (Hold power down 30 seconds, let go, and push power button to turn on) yet.
I think this method might just have become a winner for me too.
After completing the steps above exactly (with the exception of step2, 3 times in a row, of which I just did once) and then added a couple more steps in
Step 7: Reset the powercfg.cpl settings back to System defaults, because I had customised Hibernation settings previously.
Step 8: Changed screen setting to turn of after 3min on battery and 10min when plugged. Changed sleep setting to 5mins on battery (to ensure the screen setting doesn't conflict with this one) and 30mins when plugged in.
Step 9 (Maybe Optional): Changed the "When I close the lid" settings to "Do Nothing" on both battery and plugged in. The reason for this was mainly because I use a MS Dock with Mini Port Display to an external monitor which kept becoming
primary when closing the type cover but also, because I wanted to ensure the user sleep was only initiated by one type of action and that would be the power button.
So after testing this for well over 12 hours it no longer seems to be suffering and normally it would fail to wake over 90% of the time with either system or user initiated sleep.
I will ofcourse continue to monitor and report any changes I experience.