16

I'm using latest Windows 10. I have dual monitors and am working on software development. I move Visual Studio to second monitor to work on it.

When I lock wndows and leave computer and go somewhere and come back after 20-30 min both laptop and second external monitor is black and I need to enter my password. When I unlock the computer Visual Studio 2017 moves to the primary (laptop) diplay.

Everytime I have to move Visual Studio again to second monitor. Is there a way to solve this problem?

10

A similar case on Microsoft Community mentioned a workaround, have a try.

Start Control Panel --> Device Manager Select View --> Show hidden devices 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.
Uninstall all greyed out monitors (even non-PNP and PNP monitors) 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]

https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware-winpc/windows-10-multiple-display-windows-are-moved-and/2b9d5a18-45cc-4c50-b16e-fd95dbf27ff3

  • This workaround has no effect whatsoever on my system. – queezz Mar 22 at 6:43
4

TL;DR - if the windows are moving to a VGA connected monitor, it looks like there are three options, in order of "fixed" to "workaround": * Change the connection to that monitor to something other that VGA (changing to DisplayPort connection fixed it for me) * Make the VGA monitor the Primary Monitor. * Unplug the VGA monitor, then plug it back on each resume.

I had this problem - all the windows shifted to one monitor on resume from sleep / hibernate. The LCD monitor the windows shifted to was connected by VGA cable - my primary monitor is connected by DisplayPort, plus the laptop display.

Turning off the VGA monitor didn't force the windows to shift back to the primary monitor, but unplugging the VGA monitor did force the windows back.

I guess that the VGA connection does not report that the monitor is actually off, just that there is a monitor present, and Windows detects it before the DisplayPort connected monitor or even the internal laptop display, so moves the Windows to the VGA monitor.

Fortunately, the VGA connected monitor also has DisplayPort connection, so I changed the monitor to DisplayPort, and the problem was resolved.

  • I can´t believe it was so simple to solve this. Had an HDMI cable forgotten into a drawer for almost 1 year of dragging 3+ screens back to the second monitor after unlocking the screen. Thnak you very much, sir. – Mudo Jan 22 at 16:18
  • 1
    Now having this problem with to identical monitors connected to two DisplayPorts. – queezz Mar 22 at 6:46
  • I too am now suddenly having this issue after switching from 2 old hdmi to new 2 displayport monitors! – John Gardner May 4 at 0:02
0

I had a similar issue, but only on wake-up after hibernate. Sometimes after connecting to second monitor in "extended desktop" configuration, I could only interact with windows on the first display (laptop). Rebooting of course was fixing the issue, but the point of hibernate is not being forced to start work from scratch every time I wake up the system.

Today I've finally found that "dwm.exe" process (Desktop Windows Manager) was duplicated for some reason. And apparently some configuration was not restored properly for my user session. After restarting the right process as Administrator, all went back to normal.

What I did was to:

  1. open command prompt as administrator (open Start, type "cmd.exe", right-click and select "Run as Administrator")
  2. run "taskmgr.exe" in this command prompt window (with elevated privileges)
  3. switch to the "Details" tab
  4. search for "dwm.exe" process(es) and use "End Task" button or from context menu
  5. necessary DWM process should restart itself for your user session, while the "wrong" processes should just end without notice

Warning: I immediately noticed that Chrome browser did not respond well to the restart of dwm.exe process; all Chrome windows were black. Firefox did not have such issue. Luckily, just trying to open a new Chrome window by pressing Ctrl+N shortcut helped with this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.