I have a main monitor on a KVM switch, so I can use it on the workstation and gaming PC. My gaming PC also has a secondary monitor. If I switch away from the gaming PC, sometimes Windows moves all the windows back to the second monitor (because it no longer senses the main monitor is connected), and then when the main display is switched back, all the windows get moved back to the main monitor in random locations, and I have to put them back where they all belong. Annoying.
This is more of an issue with DisplayPort, as most (but not all) HDMI KVMs will send a fake "I'm still connected" signal to the computer when you switch away the monitor (for technical reasons this is harder to implement in DP). This is also a common problem if you use the monitor's internal input switch to switch between computers.
Found a recommendation for a simple little background app called PersistentWindows that fixes this:
https://github.com/kangyu-california/PersistentWindows
No installer. Read the instructions. You have to put it in a folder (I strongly recommend the C root because I had issues putting in in the Program Files folder), and you have to execute a batch file to setup a task scheduler entry for it, and then you need to manually open the executable the first time (after that it auto launches on Windows start).
Nothing else you have to do. It just sits in the task bar notification area. It does have the additional feature of allowing you to save and restore snapshots of your windows locations manually, but in the background it just restores your Windows positions automatically if it sees a monitor is disconnected.
PersistentWindows: Prevent your Windows from moving around when you switch monitors
- FlyingPenguin
- Flightless Bird
- Posts: 32679
- Joined: Wed Nov 22, 2000 11:13 am
- Location: Central Florida
- Contact:
PersistentWindows: Prevent your Windows from moving around when you switch monitors
"Until a drag queen walks into a school and beats eight kids to death with a copy of ‘To Kill A Mockingbird’, I think you’re focusing on the wrong shit.” - Wanda Sykes


- Executioner
- Life Member
- Posts: 10095
- Joined: Wed Nov 22, 2000 11:34 am
- Location: Woodland, CA USA
Re: PersistentWindows: Prevent your Windows from moving around when you switch monitors
If this is an issue with the display port, do you think they will have a software or hardware patch to fix it?
- FlyingPenguin
- Flightless Bird
- Posts: 32679
- Joined: Wed Nov 22, 2000 11:13 am
- Location: Central Florida
- Contact:
Re: PersistentWindows: Prevent your Windows from moving around when you switch monitors
It's not an issue with DP itself, so no. HDMI and DP (even later versions of DVI) use a protocol called EDID to talk to the PC to tell it things like "I am a monitor of such and such resolution, supporting such and such refresh, and I am connected". Unlike the VGA era, when you could unplug the monitor, and Windows would just continue to assume that monitor was still connected, unplugging an HDMI or DP monitor tells the PC that no monitor is connected anymore. If you have a second monitor, then Windows moves all the open windows and desktop icons to that monitor.
So in order to avoid this, a KVM (or even a switched monitor input) with EDID basically needs to simulate a monitor and send the proper EDID data back to the PC.
DisplayPort KVMs are VERY expensive (like starting around $150) and adding EDID to it would add even more cost, and I am told it's a quite bit more complicated to emulate EDID in DP versus HDMI. So there are very few KVMs or monitors that support simulating EDID when the monitor is not connected to the PC.
So in order to avoid this, a KVM (or even a switched monitor input) with EDID basically needs to simulate a monitor and send the proper EDID data back to the PC.
DisplayPort KVMs are VERY expensive (like starting around $150) and adding EDID to it would add even more cost, and I am told it's a quite bit more complicated to emulate EDID in DP versus HDMI. So there are very few KVMs or monitors that support simulating EDID when the monitor is not connected to the PC.
"Until a drag queen walks into a school and beats eight kids to death with a copy of ‘To Kill A Mockingbird’, I think you’re focusing on the wrong shit.” - Wanda Sykes


Re: PersistentWindows: Prevent your Windows from moving around when you switch monitors
Good find!
------------------------------------------

