Hello:
I have a MS SP4 with 16GB memory and 1TB SSD and a port replicator (actually two, but more about that later).
I take my SP4 back and forth from office to home and back again every day. That's why I have two port replicators. At the office I have two 24" monitors, one newer Samsung and an older one I don't recall at the moment. Anyway, that setup works perfectly. When I leave in the AM I unhook my SP4, without turning it off, putting in sleep more, etc., etc., and take it to the office, plug it back in, wiggle the mouse, and voila! All is right with the world. BTW, the keyboard cover remains on and closed.
At home I bought a brand new pair of Dell P27115Q 27" 4K monitors, and hooked them up to the second port replicator. Took 3 hours to get working, and only when I turned off the DP4 screen, and plugged one of the Dells into the mini DP on the SP4. Tried everything the first time including at least one restart. Still don't know what I did, but eventually the above worked like a charm with both monitors driven at full 4K resolution.
Now the problem. When I do the same thing I do in the AM, and unplug the SP4 without turning it off, sleep mode, etc., and bring it home and hook it up to the Port Replicator (with one monitor to the SP4 mini DP connector), about 10-20% of the time it comes up and all is wonderful, just like always at the office end.
If not, I spend a bunch of time playing around with settings in the display setup you get from right clicking on the desktop. At first I can only get the SP4 display to work. Then I can get one of the Dells working by extending the desktop to it. Then I can turn off the SP4, and now I'm running on one Dell. That is pretty reliably doable. After that is where it gets difficult. I just keep trying extending to the other monitor, restarting, changing settings in both the first screen and the Advanced Settings page. Eventually, between 15 and 45 minutes later, I manage to get both Dells working. By then I've done so many things I can't recall what combination of things did the trick.
As you can imagine, this whole process is getting really old. Sorry for all the detail but I'm hoping that by providing it maybe it will trigger someone else's memory and unlock a solution! Cheers, Mike