When I wake up my screens after they go to sleep (the computer itself is not sleeping), all of my windows move to a single screen. How can I fix this in Windows 10? This answer [1] doesn't work. There's another answer [2] that applies to pre-Windows 10. I have a new Nvidia GPU. I have 3 monitors, 2x Display Port and 1x HDMI.
3 Answers
I think it may be a bug regarding the use of Display Port in Windows.
When a monitor connected via Display Port goes to sleep, windows treat it almost like it was physically disconnected.
Even if you're only using one monitor that leads to problems: program windows get moved and resized, some get bugged, and such.
You can try a fix in Windows Registry Editor. Open it and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\
On older windows 10 versions, there used to be a 'folder' (key) there starting with the name:
SIMULATED_(...)
On newer versions, it's probably:
NOEDID_(...)
Inside those keys, since you have a three-monitor setup, there should be at least three sub folders: 00, 01 and 02.
What you'll want to do is use the appropriate values on PrimSurfSize and ActiveSize.
For ex, for a 1080p resolution:
00\PrimSurfSize.cx => 1920 decimal
00\PrimSurfSize.cy => 1080 decimal
00\00\PrimSurfSize.cx => 1920 decimal
00\00\PrimSurfSize.cy => 1080 decimal
00\00\ActiveSize.cx => 1920 decimal
00\00\ActiveSize.cy => 1080 decimal
Repeat for the 01 and 02 folders, which corresponds to your other monitors.
Reboot, and hopefully that should help =)
If it doesn't work, you could also try Persistent Windows, which tries to address exactly this problem:
What is PersistentWindows? A poorly named utility that persists window positions and size when the monitor display count/resolution adjusts and restores back to it’s previous settings.
For those of you with multi-monitors running on a mixture of DisplayPort and any other connection, you can run this tool and not have to worry about re-arranging when all is back to normal.
- 2,132
I have 6 monitors and I was having this issue. Based on info about the regkey location Vinícius M, I did some fiddling and I seem to be having luck so far with deleting all the config profiles (I had like 10-15 of them) under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration then restarting my pc. Then I rearranged my screens and it seems to be working. I think what was happening was that the Display port wouldn't register in time for waking up, and it was only detecting 3 of the monitors, and choosing one of the configuration profiles that it thought it matched. Now I only have the one 6 monitor configuration in the reg key so it seems to be behaving.
- 21
This issue was fixed in Windows build 21287. To update your Windows to the build you should upgrade to Windows 11 (this fixed issue for me), or join Windows 10 Insider Program and select "beta channel". Or just wait when Windows 10 release will be upgraded to the build.
https://devblogs.microsoft.com/directx/avoid-unexpected-app-rearrangement/
- 101