195

I put my multi-monitor system to sleep when it's not in use. After I wake it up, all windows are repositioned to a different screen. The closest pattern I can think of is that the windows there were on the main screen switch to a the second screen. It looks like it disconnects the main screen before it goes to sleep which in turn switches all the windows to the 2nd or 3rd screen.

Edit: Here's the video card I'm using --> SAPPHIRE FleX 100322FLEX Radeon HD 6450

Kingamoon
  • 2,193

16 Answers16

76

This is an old question, but if anyone arrives here with the same issue, I suggest trying the solution posted here:

http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/windows-7-movesresizes-windows-on-monitor-power/1653aafb-848b-464a-8c69-1a68fbd106aa

I'm running Windows 8.1 with two 2560x1440 displays on DisplayPort. When waking from sleep, all my windows had been pushed to one display, and some of them resized. This fixes the issue for me; now all my window positions and sizes are preserved. Here is the relevant link content:

I have found a work-around. Using Sysinternals ProcessMonitor I found that Windows was accessing the following Registry path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration

My system had three entries:

  • DELF003YY7707BR0MUL_30_07D7_6A^9A3774EB79DEE3E3E38496CC7DF4D936
  • QHD32000001_31_07D6_D5^63E1ABDD175E7871DCAEB710418A0F75
  • SIMULATED_8086_2A42_00000000_00020000_1010100^CDE365D1B3F0942F0CF38BFB8E127AB4

Under each is a tree called 00. Two of the keys are:

  • PrimSurfSize.cx
  • PrimSurfSize.cy

Under 00 was another branch also called 00. Two of the keys are:

  • ActiveSize.cx
  • ActiveSize.cy

In the first two configs (i.e. DELF00... & QHD3...), the above keys were 1440x900, so they were not involved.

The third (SIMULATED...) were set to 1024x768.

I changed these to 1600x900 and the problem was solved.

Further I changed resolution (via control panel) to 1920x1080, the moving/resize issue returned, but the lower right corner was set to 1600x900, ie the SIMULATED... settings.

So for some reason one of the configs does not get set correctly.

I don't know why there are three configs, I have only ever used one monitor.

John Freeman
  • 1,086
37

The issue is most likely with the graphics driver. Whenever a single monitor is disconnected from a multimonitor setup in Windows, Windows will attempt to move everything from that screen onto the remaining screen(s). Usually, this will not occur when suspending/hibernating/shutting down the computer. Thus, it is probably because of the graphics driver doing one of the following:

  • 'Disconnecting' the monitors when you put the computer to sleep, so when Windows awakens, it must re-determine where to place everything.
  • Recognizing the monitors in a different order each time you bring the computer out of sleep, forcing Windows to rearrange your application windows.

Check to see if there is an update to your graphics driver by going to the chipset manufacturer's website.

Tanaki
  • 1,487
21

If your computer has Intel HD Graphics you have to set Extend Display options (and resolution settings) from the Intel Graphics Control Panel. If you do it from the Windows Display settings it will reset after you wake it from sleep mode.

Here's a screenshot.

enter image description here

Varaquilex
  • 3,846
bytestorm
  • 331
12

Not all NVidia cards support the ability to fake the EDID, and it isn't just Sleep that causes this problem. If a monitor is turned off or disconnects briefly, it can wreak havoc on a carefully configured screen layout. As none of the solutions here worked out for me, I wrote a utility to restore the window positions when the number of monitors change. It is available with source code here.

Geoduck
  • 604
12

There may be an offical solution for this on the horizon:

https://devblogs.microsoft.com/directx/avoid-unexpected-app-rearrangement/

Please note: this is currently only available on Windows 10 insider build 21287 and above.

I will edit this answer to reflect changes and inclusion in future Windows builds; additional post because it's an entirely different solution.

deucalion
  • 665
10

I think I found a workaround for this issue by combining the ideas from these posts.

(my PC is Windows 10 TH2, Intel HD4600 with HDMI port, Changhong 4k monitor)

Here is the procedure.

  1. Delete all extra registry entries under ...GraphicDrivers\Configuration and GraphicDrivers\Connectivity, leaving only the entry corresponding to my monitor (MST00301...)

  2. Before putting monitor to sleep, just type "WIN" + "D" combo key to minimize all desktop windows.

  3. After turning on monitor, type "WIN" + "D" again to restore all windows.

Hewbot
  • 2,099
Kang
  • 101
6

I solved with this little application:
https://github.com/hunkydoryrepair/MonitorKeeper/releases

Just run it, and it will be maintain windows in same posizion.
Thank you very much @hunkydoryrepair.

riofly
  • 331
5

In case none of the solutions above work for you, have a look at

works for me

deucalion
  • 665
4

I "solved" this problem with DisplayFusion.

It can run triggers on various Windows 10 events, so I told it to save the window positions when the desktop is locked, and restore them when it's unlocked. See the settings dialog below.

This isn't perfect: When I unlock, I have to wait a few seconds while it moves each window back to its previous position. But it's a lot better than everything getting stuck on one monitor every time I lock my machine (a dozen times a day or more).

DisplayFusion Settings Dialog - Triggers

3

In my case, with three 1920x1080 monitors arranged horizontally, it seems to have been fixed by going to the registry key mentioned in other answers (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration), finding the key starting with SIMULATED, then changing all the values of 1920 under that key to 5760 (1920 times three, for the three monitors).

I'm guessing the SIMULATED key is used for when the PC goes to sleep, but Windows still needs to maintain a desktop in the process of going to/resuming from sleep, even when the actual monitor(s) may not report themselves yet.

2

For me, the fix was https://superuser.com/a/908156/238666 . Summary: Windows fails to read the EDID info from the monitor at wakeup, and in the Nvidia control panel you can save the EDID info to a file and set the pc to read it from that file, under the the Task: Workstation, View System Topology, EDID Source.

In my limited view, the root problem could be the Nvidia card, but also Windows, DisplayPort, or the monitor (Lenovo X1 4K)

Roland
  • 427
2

Same problem here with Windows 8.1 and Macbook Air 2013 (Intel HD Graphics 5000). I try everything. Finally I went to Intel updated with the latest drivers for my graphic card and the problem continues. Then I went to the graphics property, with my second display turn on in Multiple Display I choose 'Disconnect this display', then after the second display disconnected I select extend my desktop and the problem dissapear. Hope this works for you.

Andrew
  • 21
1

The solution for me was to simply install drivers for my newest monitor.

I have three monitors and this problem was driving me nuts (actually irking me every time I woke my PC, and then I'd forget about it).

When I went about following the instructions for the (highly voted) comment below, I noticed in Device Manager one of my monitors was "Generic PnP Monitor".

I found the definitive solution to this: do as Stephen, (st99), says here in the ninth answer – Soldeplata Saketos (May 3, 2018 at 8:48 )

I copy-pasted Stephen's solution in the end of this post, since no one seems to have done it yet.

I was deleting old unused monitor devices ("Show hidden devices") when I realized my primary monitor (the newest) was the only one without a proper driver.

Now, I don't remember installing manufacturer drivers for my other monitors, buy maybe I did when I installed them.

Once I went to LG's website, downloaded and installed the drivers, I stopped having the problem (tested with 1-minute sleep).

Or maybe what fixed it for me was deleting the old monitors, as per Stephen's instructions. However, I never rebooted the system. Also, installing the driver seems like a stronger action to me.

Device Manager with monitors OK, with arrow showing the monitor that used to be "Generic PnP Monitor"


STEPHEN'S (st99) SOLUTION

Hello,

I think I may have a solution for this problem. It appears Windows 10 keeps a history of all the monitors it encounters during its life time. This includes the basic monitor support during the OS install. So, if you enable "Show hidden devices" in the Device Manager you will see all the monitors that were connected to your system.

Start the Control Panel as Administrator:

  1. Start Control Panel --> Device Manager
  2. Select View --> Show hidden devices
  3. Expand Computer --> Monitors When you expand the Monitors you will see your current monitor (highlighted) and all the disconnected monitors (greyed out). You may see monitors with "non-PNP" and "PNP" listed as well. I believe these are aliases to your current monitor (at a lower resolution) before Windows installed drivers for it.

I uninstalled ALL the greyed out monitors. Right-click on these monitors and select uninstall. Keep only the highlighted monitor you are currently using.

  1. Uninstall all greyed out monitors (even non-PNP and PNP monitors)
  2. Reboot your system.

After doing this my windows don't resize after my monitor goes to sleep. You can quickly test this by temporarily setting your monitor sleep time to 1 minute.

Settings --> System --> Power & Sleep --> Screen [1 minute] Cheers,

Stephen

1

Usually this will be caused by the graphics driver not properly supporting sleep modes and therefore disabling the ability to detect a connected display when the computer goes to sleep.

Update your graphics drivers from the manufacturer to resolve the issue.

If the issue is still not resolved after updating the drivers, it may be due to an unusually reported display ID (EDID). You can usually force the detection of a monitor within the graphics driver control panel.

However if this is unavailable, you can use the Windows Resolution window to detect devices while the monitor is disconnected, then select the display which will report “Another Display Not Connected”, then under Multiple Displays, you can drop down and select “Try to connect anyway” which will broadcast a signal to the monitor over the port type you have selected (the signal will not be interactive), then connect the display which should interpret the signals sent to it properly.

The forced resolution will override detection of the screen and should persist through sleep.

Gareth
  • 19,080
0

Win Redock has worked best for my use case - which was restoring window positions after a display-change. Redock is automatic - saves and restores windows without any intervention. Its open source too.

So if your issue is that your laptop has a display hiccup when it wakes up, this might help you.

B T
  • 801
-1

Like it or not, but according to Dell's known problem with specific 4k monitors link: http://www.dell.com/support/Article/us/en/19/SLN295708/EN I had to switch from 59/60Hz to 30Hz on my 3 x Dell P2415Q 4K UHD on Intel 4600 connected with display's stock DP/mDP and it helped me - as Dell KB article says. It applies to UP3214Q and P2715Q too.

The issue didn't manifest on lower res QHD Dell U2515H + same video/PC

Registry keys removal and driver updates were not helping.

Upd 2018/08: And upgrading graphics card to NVIDIA Quadro P600 didn't fix the issue, so staying on 30Hz.

kuz8
  • 192