Wednesday, December 3, 2014

Windows changing size & position after monitor sleep

I recently updated my old 24" Dell monitor to a 32" Acer B326HUL, love it! But I found that when the monitor went to sleep, the windows got resized to a smaller res, as well as all the desktop icons got rearranged. Digging around on the internet found that Windows somehow remembered 1920x1200 as the res, and resizes all windows to fit that when coming out of sleep.

So the fix is registry magic!
In this register tree:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\

there is at least an entry per monitor; I had a DELxxxxxxxxxx and an ACRxxxxxxxxxx one, and under the 00 node, there are two parameters to check out there:
PrimSurfSize.cxPrimSurfSize.cy and Stride.

These should match your current monitor.

A little below you should see these entries:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\SIMULATED_xxxxxxxx

inside, you will also find under the 00 node, and those parameters pointing to the old sizes. Use the values from above, and also change under the remaining 00 node the ActiveSize.cx & ActiveSize.cy entries to match. Log off or restart and voila!



References:
https://social.technet.microsoft.com/Forums/en-US/4d8f3aef-8c04-481b-a69a-ec0fbf3669c2/turning-off-display-resizes-open-windows?forum=w7itproperf
http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/windows-7-movesresizes-windows-on-monitor-power/1653aafb-848b-464a-8c69-1a68fbd106aa?page=2

17 comments:

Chip Malee said...

I believe this is the video version.
https://youtu.be/bh-qFXOWoyo

Grim Bonkers said...

Did the exact thing. Problem not solved. When I turn of the monitor and turn it back on, all windows get squeezed in the upper left corner and are very small.

(windows 7, monitor conencted with DisplayPort)

Basic said...

Note that by default the values are entered in HEX not DECIMAL. Make sure you select decimal before typing any numbers.

Thaty said, I don't have a SIMULATED_ node at all. I do have a MSNILNOEDID_ which doesn't seem to relate to any valid display but changing the settings under there doesn't seem to have any noticeable effect.

ChangeTheFuture said...

Unfortunately not. There’s no SIMULATED key inside “Configuration” for me.

Windows 10.

Chris said...

Thanks for this as the problem has been driving me up the wall... I'm on Win 10, NEC EA275UHD 3840x2160 monitor, Nvidia Quadro K5000 with displayport... I found the SIMULATED registry entries and changed all 3 of them...

Crispian Longlife said...

I have windows 10 and was having this problem on my 3440 x 1440 (native) Asus ultra wide screen monitor (Display Port connection) and 27" DELL 2407 monitor 1920 x 1200 (native) DVI connection. Using NVIDIA GeForce GTX 980 Ti graphics card.
I have no simulated registry entries. I decided not to try to fiddle with the registry even though some entries were not set to the above resolutions. I have about 6-7 entries under the configuration directory. After reading through several comments. I saw the scaling comment.
In my NVIDIA Control panel I disable scaling for both monitors. So far this worked!
The windows remained in place once the computer woke from sleep mode. YAY!

lifesgood said...

Disabling scaling in the NVIDIA Control panel worked for me. Thank you Crispian Longlife!

I have a Samsung UHD4K 3840 x 2160 40 inch TV connected with HDMI as my primary monitor and a old 1680 x 1050 monitor on DVI as a secondary with a NVIDIA GeForce GTX 970 graphics card.

silt sunrise said...

I didn't have the simulated entries, but one of the 4 I did have, showed a lower res than my monitor uses. I changed those values and wahla, they stuck. No more shrinking windows after sleeping!

Ian Grainger said...

How do I apply this if I have multiple monitors? The numbers I see in there match my old monitor connection, but also my current laptop monitor...

Is there no way to reset this? I don't suppose deleting them will cause Windows to recreate them with correct values, for e.g.? Or even better a nice way to get Windows to forget this monitor's properties so it can re-learn them correctly!

R Caloca said...

If I got frustrated enough, maybe I would just delete the full Configuration folder :)
In theory you can backup those registry keys/tree, so it shouldn't be that bad... But that's just in one of those throw the PC against the wall moments!

Ian Grainger said...

OK - so no idea how to deal with multiple monitors? I've given up and gone for it - changed all 3 to match my larger external monitor. Will just see if it works! :-S

Ian Grainger said...

OK - so no idea how to deal with multiple monitors? I've given up and gone for it - changed all 3 to match my larger external monitor. Will just see if it works! :-S

R Caloca said...

Nope, hasn't been at issue at work (where I have dual monitors); at home I only have one :|

Fred Larsen said...

I worked for a full day to solve this. Tried all software solutions. The only things that works for me is to adjust the behavior in each monitor's on-screen menu.

For my Philips 4k monitors BDM4350UC and BDM4065UC: Must enable the factory on-screen menu by keeping the menu button pushed away from the power switch when turning the power on. Then in the on-screen menu there is a new choice "Factory". Within this hidden menu disable "EDID WP" and "AutoSource". Then turn everything off. This solved the issue for me. Every window remains where I leave it :-)

From some other forum: Some brands have "Always On" that must be turned on, or "Deep Sleep" that must be turned off, within the on-screen menu.

Hope someone find this helpful and saves a day of work :-)

R Caloca said...

Thanks Fred!

Tony Cole said...

Yes, you have saved me a lot of time (I've only spent 1/2 a day on it) - thanks!

On my Philips BDM4350UC/00 "Brilliance 4K Ultra HD LCD display" I just switched the factory menu AUTO SEARCH to NO and it has fixed it. (There is no EDID WP option).

Although, with this monitor it seems that if there is no display input then I can't get the OSD to appear (except for language selection) and so can't change input source!!!

Chris Sherwood said...

I tried everything from previous searches and everything on this blog, from registry hacks to the adapters own settings menu (looking for 'always on' or similar).

What seems to have worked for me was turning the Asus monitors' Adaptive-sync off for both monitors. Do read up on what that setting is for to be sure you won't miss it.

Microsoft should still fix this -- it is mind boggling insane that a normal computer user would have to go anywhere near this level of troubleshooting to get what is really quite normal expectations of how monitors should work with Windows and its sleep mode. I'm annoyed that I had to go to the trouble I did, all the reading, all the testing. Those SDET employees at Microsoft make a lot of money. So do the PMs that have triaged this bug to "won't fix" or "doesn't meet the bar" from one Windows version to the next.