Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fancyzones locks up every morning #2070

Closed
bigjohn99999 opened this issue Apr 10, 2020 · 28 comments
Closed

Fancyzones locks up every morning #2070

bigjohn99999 opened this issue Apr 10, 2020 · 28 comments
Labels
Issue-Bug Something isn't working Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Community Feedback We need additional help with how something should act / look Product-FancyZones Refers to the FancyZones PowerToy Status-No recent activity no activity in the past 5 days when follow up's are needed

Comments

@bigjohn99999
Copy link

every morning since I upgraded to v0.16.0 and even on v0.16.1, when I unlock my PC and then go to move any window that is not where it was when I locked my PC the fancyzone grid shows then freezes the screen with gris overlay on top of everything for about 60 seconds or more and I can't do any thing

@crutkas crutkas added the Product-FancyZones Refers to the FancyZones PowerToy label Apr 10, 2020
@crutkas
Copy link
Member

crutkas commented Apr 10, 2020

@enricogior could the elevated detect code maybe do this?

@crutkas crutkas added the Issue-Bug Something isn't working label Apr 10, 2020
@enricogior
Copy link
Contributor

@crutkas that code is pretty simple. We need more detailed steps.

@bigjohn99999
Do you put your PC to sleep, right?

go to move any window that is not where it was when I locked my PC

Application windows are not supposed to move if you put the PC to sleep and then wake it up.
Which windows are moving? Does it happen even if PowerToys is not running?
When you snap the windows again, does it lock right away as soon as you start dragging the first window?

@bigjohn99999
Copy link
Author

bigjohn99999 commented Apr 10, 2020 via email

@enricogior
Copy link
Contributor

OK, so to make sure I have the full picture:

  • you move a new Edge window to a zone
  • you lock your computer
  • the next day you unlock the computer
  • the Edge window is not anymore in the zone
  • you move the Edge window to the zone
  • when the zone color changes to active everything freezes for 1 min

correct?

  • does it also happen if you lock/unlock the computer in a span of few minutes, or only when you leave it lock for several hours?

@bigjohn99999
Copy link
Author

bigjohn99999 commented Apr 10, 2020 via email

@crutkas
Copy link
Member

crutkas commented Apr 10, 2020

maybe sleep? hybrid?

@enricogior
Copy link
Contributor

@bigjohn99999
I tried to reproduce the problem letting two PCs run overnight without success.
Can you upload a screenshot of the FancyZones settings? I'm interested in these values:

image

Beside PowerToys, do you have other utilities running?
Do you have one or multiple monitors?
Are you using Virtual Desktops?

Next time can you take a screenshot of the desktop before locking the PC and the next date take another screenshot right after unlocking the PR and before using FZ?
Thanks.

@bigjohn99999
Copy link
Author

bigjohn99999 commented Apr 13, 2020 via email

@enricogior
Copy link
Contributor

@bigjohn99999
unfortunately Github doesn't support attached images when replying by email.

@dacowan
Copy link

dacowan commented Jun 5, 2020

I will guarantee that the problem is DisplayPort. When a DP device goes to sleep, it appears to Windows as if the device were physically removed. This causes Windows to rebuild the desktop (window positions, are all restored to the default 'virtual display device' that exists when no real device is connected) when Windows awakens and the devices reappear as new.

@enricogior
Copy link
Contributor

Hi @dacowan
are you also experiencing the same problem?

@dacowan
Copy link

dacowan commented Jun 5, 2020

Yes, or at least something very similar.
I have 2 x 32" 4K QNIX displays attached to an NVidia RTX 2080 video card, via DisplayPort.
If I lock the computer and allow the displays to sleep (or power them down using the remote control) - then FZ can get into a bit of a state; Windows from extended displays will move to the primary display (across all virtual desktops), and I've also seen FZ become very slow or unresponsive when trying to manually realign the windows after one of these events.
In later versions (0.18.x) I also appear to have identical overlapping zones appear (e.g. if I have a desktop split into 2 zones (1 & 2) - after a sleep event, when I move a Window with SHIFT held down - I will see 4 zones (1 & 2) and offset down and to the right, zones 1 & 2 again (with the transparency effect making the zone indicator whiter/more opaque)

@enricogior
Copy link
Contributor

@dacowan
if you power down the displays, without locking the computer, does it still happen?

@dacowan
Copy link

dacowan commented Jun 5, 2020

Gimme a second and I'll try it.

@enricogior enricogior changed the title Fancyzones loks up every morning Fancyzones locks up every morning Jun 5, 2020
@dacowan
Copy link

dacowan commented Jun 5, 2020

@enricogior - Yes, confirmed. You can hear Windows doing the device disconnect/reconnect noise and when I move a window around with SHIFT held down, it takes maybe 2 seconds to show the zone helpers on screen, and they're duplicated (as described above) on the primary display.

I also just noticed - the zones defined for the Virtual Desktop 1 and displayed on top of the zones for Virtual Desktop 2
e.g.
On VD1, I have 4 zones vertically split across 2 monitors (1,2,3 & 4)
On VD2, I have 1 zone on the primary display, and 4 zones on the secondary display.

After the sleep event, I switch to VD2 and move a window -- the 4 zones from VD1 appear overlaid over the VD2 zones.

It's all very odd.

This is on 0.18.2 now

@enricogior
Copy link
Contributor

@dacowan
OK thanks for testing it.
Would you be able to run an unsigned debug build or is it a corporate PC with restricted policies?

@dacowan
Copy link

dacowan commented Jun 5, 2020

It's a corporate PC, but we're not as restricted as far as I'm aware, compared to other teams (I'm in the games studios group, so we run a lot of unsigned stuff).

I can certainly give it a go if you want

@enricogior
Copy link
Contributor

@dacowan
"games studio group" sounds like a lot of fun!
Next week we may reach out and provide a debug build.
Thanks!

@Blueric
Copy link

Blueric commented Jul 1, 2020

Just wanted to confirm that this is still an issue with v0.19.0.
I have a dual monitor setup on an Intel 10th gen NUC. Primary display is a Samsung CJ89 connected via thunderbolt port and secondary display is a Dell U2412M connected via HDMI.

Anything that causes the displays to disconnect/reconnect followed by an attempt to zone a window puts PowerToys into a semi-hung state. Sometimes I can kill the process, but other times it gets hung so hard that I can't even use a mouse or CNTRL-ALT-DEL and I have to resort to a hard power off.

Because of how Windows handles thunderbolt/display port on wake, this means PowerToys is hosed every single time my PC wakes from sleep. Plus my open windows always end up being pushed to the primary display rather than staying where they were prior to sleep.

I can also confirm that the actual process of sleeping doesn't seem to be the issue - I suspect it's the display connect/reconfiguration process. Both of my monitors have a switch built into them to allow PIP, PBP, and source input swapping. If I switch modes, it disconnects/reconnects the displays and I get the same hung-state issues.

The workaround I've been using is to shut down and restart PowerToys first-thing after a wake. My PC sleeps after 10 minutes, so this is getting old, but FancyZones is the primary reason I use PowerToys and so I stick with it.

@bigjohn99999
Copy link
Author

bigjohn99999 commented Jul 1, 2020 via email

@Blueric
Copy link

Blueric commented Jul 1, 2020

@bigjohn99999 I think this is the same/related issue as #2377. I see that one has been slotted for v0.20, so hopefully it will be addressed soon. In the mean time, I may try v15 and see how it works, since I pretty much only use FancyZones. I've tried some of the others out of curiosity, but don't use them much IRL.

@dacowan
Copy link

dacowan commented Jul 1, 2020

@Blueric - while that issue #2377 is certainly ONE aspect of the sleep issue -- I am in total agreement with you that this is absolutely down to the way in which Windows handles displayport/thunderbolt device disconnection (i.e. DP/TB signals a device disconnection when the monitor goes into power saving mode or is physically turned off with the power switch). Windows removes the display device, and resizes the desktop to a default "virtual" one.

This is a very well known issue, and has been prevalent since the advent of DisplayPort. A quick Google shows a number of threads on both NVidia and AMD forums with discussions and workarounds:

  • Use a dummy HDMI / Displayport dongle that does EDID emulation and fools Windows into thinking a monitor is still connected
  • Older NVidia drivers used to allow the user to set up EDID emulation in the driver, but this has since been removed

One fix that I'm currently sporting is to use "NVidia Surround" mode -- i.e. span both monitors as a single display device (7680x2160) (i,e 2 x 4K displays side by side). This appears to prevent the desktop from resizing, and since enabling it - I haven't seen any issues with either device disconnections or FancyZones hangs/overlapping zones.

The downside is that it's one big display - so hitting "fullscreen" on apps like Youtube, etc - maximizes across both monitors, which sucks when you're trying to watch video.

@Blueric
Copy link

Blueric commented Jul 1, 2020

@dacowan One big display is no good for me (even if I did have NVidia graphics). In addition to the issues you described, I do software dev on an app that makes use of full screen mode all the time. I put the app on my secondary display so it can be fullscreen while I have my dev environment in multiple zones on the primary display.

@dacowan
Copy link

dacowan commented Jul 1, 2020

Fair enough -- I have the opposite problem. I use Visual Studio, so the advantage for me during development is that I can finally maximize VS to a single, multi-display zone and have lots of code windows open.
I hate the fact that MDI windows (like Output/Watch/Locals, etc) aren't real windows, and can't be SHIFT-Dragged into a zone, so I have the windows laid out inside the Visual Studio "container" and just have that maximized.
My target app is on a 3rd monitor I have off to the side, on a separate card (using DVI) - so I don't have the disconnect problems with that one.

@Blueric
Copy link

Blueric commented Jul 1, 2020

@dacowan I agree RE the VS tool window issue. I frequently have multiple instances of VS open, SSMS, virtual machines, and a bunch of other stuff. I've been playing with using VS window configurations that span my primary 43" monitor vs. using zones with specific code windows pulled out - it's 32:10 and the equivalent of 2 1920x1200 monitors side-by-side. I'd love to be able to put the test runner, output window, source tree, git tree, etc into zones. What works best seems to be dependent on what I'm doing at the moment.

I also have a second pc connected to the Samsung via HDMI and sometimes use the PBP feature to reconfigure the display into what functions as two separate monitors. The TB port reconfigures from 3840x1200 to 1920x1200 and then the other half of the monitor becomes available on a second input (HDMI) as another 1920x1200 display. The USB ports for mouse and keyboard are also switched by the monitor, which lets me select which computer I'm controlling, effectively, on a 3-monitor setup.

It's this PBP reconfiguration that also breaks PowerToys, just like when waking from sleep.

@enricogior
Copy link
Contributor

@enricogior enricogior added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Community Feedback We need additional help with how something should act / look labels Oct 2, 2020
@dacowan
Copy link

dacowan commented Oct 2, 2020

It appears to be working. I only installed 0.23 yesterday, but for the most part - it appears to be working across multiple discrete displays (docking areas spread across displays too), supporting Microsoft Virtual Desktop and not losing window positions when switching off Display Port monitors or sleeping.

By Jove, I think they've got it!

@ghost ghost added the Status-No recent activity no activity in the past 5 days when follow up's are needed label Oct 7, 2020
@ghost
Copy link

ghost commented Oct 7, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

@ghost ghost closed this as completed Oct 13, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Community Feedback We need additional help with how something should act / look Product-FancyZones Refers to the FancyZones PowerToy Status-No recent activity no activity in the past 5 days when follow up's are needed
Projects
None yet
Development

No branches or pull requests

5 participants