How to persist open windows during external display disconnect-reconnect cycle?

1

I'm using an external display (a projector) in extended mode. After disconnecting and reconnecting all windows end up on the main display and the extended display is empty. I'd like to keep all windows on the external display during a disconnect-reconnect cycle.

Background: I'm delivering a presentation and the projector input is coming through an HDMI switch so I can show another feed on the projector. When I switch away from my PC, Windows treats it as a display disconnect and rearranges my windows. When I switch back to it my presentation is gone and I need to move windows about to get back to where I was. Sounds like a common problem but so far I haven't seen any solutions that works for me.

I reviewed various related questions, mostly to do with windows rearranged after monitor goes to sleep (different problem, same root cause) but I can't make the solutions work for me. Below are all the options that I'm considering, ideally somebody will share a solution that definitely works but absent that - ruling out some options from the ones below would still be helpful.

1) Disable automatic display detection in windows.

a) One way to do this that I read about is to set UselViewHelper to 0 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TMM This was suggested here: https://www.reddit.com/r/Amd/comments/5jlk82/how_to_prevent_windows_from_rearranging_when/ I didn't work for me though. I tried it, restarted, the PC behaves the same way as before.

b) I read somewhere that Windows doesn't autodetect a monitor unplugged from a VGA port as long as the cable is still plugged in. This doesn't sound convincing as there would be no point in having VGA dummy sticks but I'll try it. I've ordered a VGA to HDMI converter as I don't have a VGA port.

2) Simulate an external display

If I can add a virtual external display I could potentially have a setup with an extended desktop mirrored on two external displays (the projector and the virtual display). Then, disconnecting and reconnecting one of the two mirrorred displays shouldn't rearrange the windows. The first problem here is that I don't even know if it's possible to duplicate the extended desktop.

The 2nd problem is adding the virtual display, for which I went down a rabbit hole of options:

a) HDMI to VGA, then VGA splitter, then VGA dummy stick This should be relatively foolproof as it avoids the first problem - windows won't need to mirror the 2nd and 3rd displays

b) USB to VGA, potentially with a dummy stick in case Windows can't be told that there IS a display connected to the VGA port (I've ordered the adapter so I'll be able to test this)

c) Using a mobile app to extend the display to a phone, e.g. this one: https://play.google.com/store/apps/details?id=com.devguru.eltwomonusb&hl=es So in this case it won't be a ghost display but an actual device - but the resolutions probably won't match and due to the unorthodox approach there will probably be other issues.

d) Using software to send the display to another PC or some other device. Purportedly this can be done by Windows Connect, iDisplay, Airscreen, Splashtop Extended Desktop or maybe some other tool. This will also result in an actual additional display, not virtual - it just won't be connected by a cable.

3) Fidget with the settings under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration

As suggested here, among other places: How can I stop windows re-positioning after waking from sleep?

I didn't have the SIMULATED entry as described online but I did have a MSNILNOEDID... which might serve a similar function. I have one entry for my laptop's screen (HHT00301...) and about a dozen for the projector (BOE06F90...). They all seem to be configured as other answers say they should be: 3840x2160 for the laptop screen, 1920x1080 for the projector entries and the (supposedly) simulated one.

4) Use an HDMI switch that will trick the PC into thinking that the display is still connected.

I don't know if such a device exists and if it does exist I don't now how to find it.

5) Use a custom software solution to simulate and external display while the projector is disconnected.

I found one such solution here: https://archive.codeplex.com/?p=persistentwindows The project is discontinued but I managed to download the code. Fortunately, it's a .NET app and I'm a .NET developer but it seems like a lot of work - it won't even build out of the box, seems complex and I don't have any validation whatsoever that it would actually work.

Vroomfundel

Posted 2019-03-22T10:49:18.240

Reputation: 121

Answers

1

The answer would be option 1. b) Use VGA output

When inserting an HDMI-to-VGA adapter Windows picks it up as an external monitor and is happy to extend the desktop to it. Then you can connect-disconnect your external monitor to your heart's content and the open windows will remain where they are (or in my case, you can switch away from this video feed with the HDMI switch and come back to it).

So, instead of connecting directly to the HDMI switch from my HDMI output I use an HDMI-to-VGA adapter connected to a VGA-to-HDMI cable; sounds quire ridiculous and low-tech but it works and seems like it's going to stay like that until Microsoft add a reliable way to disable this display autodetect feature.

Vroomfundel

Posted 2019-03-22T10:49:18.240

Reputation: 121

1

Please try latest enhancement of PersistentWindows

Disclaim: I am the contributor of the enhancements

Kang Yu

Posted 2019-03-22T10:49:18.240

Reputation: 11