Powertoys: Fancy Zone loose settings after restart

Created on 2 Oct 2020  ·  45Comments  ·  Source: microsoft/PowerToys

ℹ Computer information

  • PowerToys version: 0.23
  • PowerToy Utility:
  • Running PowerToys as Admin: yes
  • Windows build number: 19041.508

📝 Provide detailed reproduction steps (if any)

  1. Set zones on multiple windows desktops.
  2. Restart the app/pc

✔️ Expected result

Zones will stay as i set it.

❌ Actual result

Zones on all virtual desktops are set to zones layout on the flirt one,

📷 Screenshots

_Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form_

Issue-Bug Product-FancyZones Resolution-Duplicate

Most helpful comment

@enricogior

Unfortunately, this bug appears to have come back for me with v.0.25.0.

All 45 comments

@ukidabek
can you please upload %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json? (you will have to change the .json extension to .txt otherwise GitHub will not allow to upload the file)
Then restart the machine and upload again the %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json file so we can see what is happening.

Same problem with 0.23, coming from 0.21

@taspeotis
can you please upload %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json?

Same problem, here is my zone-settings.json:

{
  "devices":[
    {
      "device-id":"FancyZones#MultiMonitorDevice_3840_3240_{54A260E1-A096-435D-81D0-304CBAC29A4A}",
      "active-zoneset":{
        "uuid":"{F20BB078-39A1-4164-A6C1-9600730E6446}",
        "type":"custom"
      },
      "editor-show-spacing":true,
      "editor-spacing":16,
      "editor-zone-count":3,
      "editor-sensitivity-radius":20
    },
    {
      "device-id":"FancyZones#MultiMonitorDevice_3840_3240_{00000000-0000-0000-0000-000000000000}",
      "active-zoneset":{
      "uuid":"{F20BB078-39A1-4164-A6C1-9600730E6446}",
      "type":"custom"
    },
    "editor-show-spacing":true,
    "editor-spacing":16,
    "editor-zone-count":1,
    "editor-sensitivity-radius":20},
    {
      "device-id":"FancyZones#MultiMonitorDevice_3840_3240_{99C96022-D50B-4E55-8C94-DA76F10DCE4F}",
      "active-zoneset":{
        "uuid":"{4FC1535B-D997-4944-B35C-F914C0001170}",
        "type":"custom"
      },
      "editor-show-spacing":true,
      "editor-spacing":16,
      "editor-zone-count":3,
      "editor-sensitivity-radius":20
    },
    {
      "device-id":"FancyZones#MultiMonitorDevice_3840_3240_{D412CF2C-8424-4F57-AA76-39749849D2F5}",
      "active-zoneset":{
        "uuid":"{F20BB078-39A1-4164-A6C1-9600730E6446}",
        "type":"custom"
      },
      "editor-show-spacing":true,
      "editor-spacing":16,
      "editor-zone-count":3,
      "editor-sensitivity-radius":20
    }
  ],
  "custom-zone-sets":[
    {
      "uuid":"{4FC1535B-D997-4944-B35C-F914C0001170}",
      "name":"TV 5",
      "type":"canvas",
      "info":{
        "ref-width":3840,
        "ref-height":3200,
        "zones":[
          { "X":0, "Y":764, "width":2262, "height":1356 },
          { "X":2262, "Y":764, "width":1578, "height":1356 },
          { "X":1135, "Y":0, "width":1127, "height":764 },
          { "X":0, "Y":0, "width":1135, "height":764 },
          { "X":2262, "Y":0, "width":1578, "height":764 }
        ]
      }
    },
    {
      "uuid":"{F20BB078-39A1-4164-A6C1-9600730E6446}",
      "name":"UW Dev",
      "type":"canvas",
      "info":{
        "ref-width":3840,
        "ref-height":3200,
        "zones":[
          { "X":653, "Y":2160, "width":1791, "height":1040 },
          { "X":2444, "Y":2160, "width":769, "height":1040 }
        ]
      }
    }
  ]
}

@taspeotis
how many monitors do you have?

If your were to ask me, 2 ;)

@vitormd
yes, sorry wrong alias.
Are you using the "Allow zones to span across monitors" option?

I have one screen, and use multiple windows wirtual desktops.

@vitormd
yes, sorry wrong alias.
Are you using the "Allow zones to span across monitors" option?

Yeah, with the same scalling... Just to be clear. The problem is the custom layout not being saved for the next reboot and having to re-apply everytime.

Thx BTW

@vitormd
if you turn "Allow zones to span across monitors" OFF and apply two layouts to the two monitors, will they survive a reboot?

@ukidabek
can you make sure you don't have "Allow zones to span across monitors" ON?

Also, upload %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json

@vitormd
if you turn "Allow zones to span across monitors" OFF and apply two layouts to the two monitors, will they survive a reboot?

Was about to test that, but will have to wait til i'm done working. Updates later today

I currently have the same issue and I have a single monitor. Settings do not persist between reboots, neither spacing nor layout, aside from the layout type I picked, Priority Grid.

Oh, and I also do not have any experimental options enabled.

@logisj91
please upload %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json

zones-settings.txt

Here's the zones-settings.json after configuration

It would seem that I currently cannot recreate the error. I have rebooted once with "Restart" and once with "Shift+Shutdown" and waiting 10 seconds and starting up, it still retains fancyzones as intended. But when I started it up this morning, it had not retained the configuration.

@logisj91
the problem you experienced might have been caused by a change we made in 0.23 to make sure the DevideID never contains zeroed GUIDs.
Your zones setting file now looks good and you should not experience anymore this problem.

@ukidabek
can you make sure you don't have "Allow zones to span across monitors" ON?

Also, upload %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json

It worked after restarting twice. The one I switched the setting plus 1

I've observed the same issue since the update to v0.23.0, and I've noticed one additional piece of the pattern: My FZ settings revert to default on startup, but if I open FZ settings or the FZ zones editor, my previous settings reapply themselves.

For example, if I start my computer (with FZ autorun) and hold Shift while dragging a window about, I see the default FZ window layout, which are different from mine. If I open FZ settings and then drag a window about, I see the zone layout that I had previously configured. My layout persists after I close the FZ control panel, until I restart my computer again.

(In response to the prior comments: I also have two monitors with different FZ layouts, the "span across monitors" settings is off, and I have no idea what to do with a json file or what a zeroed GUID is.)

I hope that helps. I'm not a technical person so I apologize that I can't provide any further information.

@Jon999999
thanks for the infos.
Can you open Windows Explorer and in the Explorer address bar paste this?

%localappdata%\Microsoft\PowerToys\FancyZones

It will open the folder where the zones-settings.json file is.
Can you uploaded it here after renaming it to zones-settings.txt or zip it, and then drag and drop it when replying in GitHub.
Thanks.

@Jon999999
0.21.1 has other bugs. We only investigate issues in the most recent release.

@Jon999999
the json from the previous version is not useful to investigate this problem.

@enricogior

Ah. In that case, I'll reinstall the current version, reproduce the issue, and upload my json from that version (before re-downgrading pending resolution). I'll get to it tonight.

Thanks.

@Jon999999
thank!
So the steps that would help are:

  • set up the zones and copy the zones-settings.json to before-zones-settings.json
  • reboot the machine, verify the layout has been reset to the default priority grid
  • copy the zones-settings.json to after-zones-settings.json
  • zip the two files and upload the .zip

@enricogior

As requested, created after re-upgrading to v0.23.0.

json.zip

@Jon999999
thank you for sending the config files.
Does the problem happen only if you restart Windows or also if you quit and restart PowerToys?

@enricogior

Does the problem happen only if you restart Windows or also if you quit and restart PowerToys?

  1. If I quit and restart PowerToys (by right-clicking its icon in the system tray and clicking Exit and then restarting it from the Start menu), the zone placements _do not_ reset to default (i.e. my customization _remains_).

  2. If I log off as a Windows user (Start> Shut Down... > Sign out) and log back in again as the same user, the zone placements _reset_ to default (i.e. my customization _is lost_).

  3. If I restart Windows, the zone placements _reset_ to default (i.e. my customization _is lost_).

In cases 2 and 3, once my customization is lost, I need to open the Zones Editor while the Power Toys window is on each of my two monitors, then re-select my custom layout for each monitor in turn.

@Jon999999
thanks.

@ukidabek @taspeotis @vitormd @logisj91
can you confirm that the problem happens for you only when logging off or restarting Windows but doesn't happens when just quitting and restarting PowerToys?

@Jon999999
if you turn off the "Run at startup" option, logoff/on or restart Windows and then manually start PowerToys, does the layout get reset?

Hi @enricogior I will investigate that for you, in the meantime I would like to report I have reformatted my computer (unrelated to PowerToys) but it is basically a clean installation of Win10 Pro 2004 + PowerToys and I lose my settings after a restart.

Also I am running PowerToys as Administrator. If it helps, the monitor is a single Dell U4919DW.

@taspeotis
are you using virtual desktops? We don't know if that is a factor yet, just collecting information since we haven't been able to reproduce the issue yet.

@taspeotis
are you using virtual desktops? We don't know if that is a factor yet, just collecting information since we haven't been able to reproduce the issue yet.

I have this problem with virtual desktops.

@ukidabek
I guess this issue has been "de-railed" in the sense that your report is same as https://github.com/microsoft/PowerToys/issues/6967 and we have a fix ready.
Most of other people on this thread have a slightly different problem, they get the primary monitor layout reset.

@enricogior

if you turn off the "Run at startup" option, logoff/on or restart Windows and then manually start PowerToys, does the layout get reset?

No, it does not. My custom zones remain active if I turn off Run at startup and launch PowerToys manually after re-login.

Strangely, I also tried turning off "Run at startup" and adding the PowerToys shortcut to the Startup folder, then logging off and back on. I expected this would work properly, with the same behavior as launching PowerToys manually after re-login, but that wasn't the case. With the PowerToys shortcut in the Startup folder and the Run at startup option turned off, my FancyZones configuration was reset to the default, just as it was with the Run at startup option turned on. (Strange that autostarting PowerToys from the Startup folder would behave differently from starting it by manually clicking the shortcut, but so it is.)

I tried both of these scenarios with Always run as Administrator on and off, and they behaved as described above, regardless.

I do not use Virtual Desktops, but I do have dual monitors (connected by a single DisplayPort cable from the computer to monitor A with MST from monitor A to monitor B, if that makes a difference).

@Jon999999

My custom zones remain active if I turn off Run at startup and launch PowerToys manually after re-login.

That is a useful information. Thanks.

@ukidabek @taspeotis @vitormd @logisj91 @Jon999999

if for you it's acceptable to install a private unsigned build, I've attached a build that should fix the problem with Virtual Desktops resetting the primary desktop layout after switching desktops.
It also contains a fix that may resolve the problem of resetting the primary desktop layout after a Windows restart (regardless if you use virtual desktops or not)

We understand if you prefer to not install an unsigned build.

PowerToysSetup-0.23.1-x64.zip

@enricogior Hey, thanks for the build. I'm installing it now.

FYI I do not use Virtual Desktops. Once I get a chance I'll reboot my PC a bit and let you know how things go.

@enricogior

We understand if you prefer to not install an unsigned build.

Thanks, Enrico, but I can't install an unsigned build. I'll have to wait for the next release.

Meantime, here's my simple, two-click, three-second temporary workaround that might help other folks who don't want to install the patch:

1) PowerToys Settings > General > Appearance & behavior > Run at startup = OFF.

2) For easy access, copy the PowerToys (Preview) shortcut from your Start menu to your desktop.

3) Each time you start (or log in to) Windows, simply double-click the new desktop icon to activate PowerToys. Your FancyZones settings will be just as they were the last time your shut down (or logged off from) Windows.

Note: Don't try putting the PowerToys (Preview) icon into your Start > Programs > Startup folder. You might think that would work, but it doesn't (for reasons I can't fathom).

Once this issue is repaired and PowerToys is updated, you can turn Run at startup back on and delete the new desktop shortcut.

Isn't this #6967?

@crutkas
the original post is the same as #6967 (virtual desktop issue), but then there are other reports that turn out to be same as https://github.com/microsoft/PowerToys/issues/7003 (Windows restart issue)

We can close this in favor of the two other.

@enricogior Just to follow up. Using your unsigned 0.23.1 build my PC has been rebooted a few times and the FancyZone settings have persisted. This is without virtual desktops (which I do not use).

I will await the next version of PowerToys. Thank you!

Resolved for me with general release v0.23.2. Thank you.

@enricogior

Unfortunately, this bug appears to have come back for me with v.0.25.0.

It happens on 0.25 for me as well. I've also noticed that the "Always run as administrator" setting doesn't stick after a reboot. So maybe the settings are stored for the administrator user, and after a reboot, PowerToys restarts under the regular user account, and does not use the administrator settings.

Are you also running PowerToys as administrator?

Was this page helpful?
0 / 5 - 0 ratings