Why some window restore apps save the mess instead of your layout

12 November 2026 · Martín Acuña Lledó · Applies to macOS 13 Ventura through macOS 27

You installed an app to put your windows back after sleep. It works when you unplug a monitor and plug it back in a minute later. But after a night's sleep, or a long lunch with the Mac locked, everything is still piled on one screen, or the app proudly puts every window back exactly where macOS dumped them. The app is not broken in an obvious way: it is restoring what it saved. It just saved at the wrong moment. This page explains why that happens, what one open source tool found when its developer looked into it, how to test the tool you use, and what helps without any app.

Why the timing matters

A window restore app does two things: it saves where your windows are, and later it moves them back. The second part only works if the first one happened while the layout was still right.

So two questions decide whether a tool can work after sleep: does it stop saving before macOS moves anything, and does it keep the last layout from before the disconnect instead of the newest one?

What Memmon's developer found

Memmon is a small free, open source app that describes itself as a simple daemon that restores your window positions on external monitors. Its GitHub issue 11, "Does not restore windows after sleep mode", opened in January 2023, is a clear public record of this problem. The reporter found that unplugging and replugging a monitor worked, but after closing the lid or letting the MacBook sleep, the windows stayed on the laptop screen. Others reported the same on macOS 12 and 13.

After testing, the developer wrote that the app only gets screen change events after a display was attached or detached, when it is already too late to store the window positions. It had worked only because macOS was sometimes slow to update the windows, so the app could read the old positions in the meantime. Closing the lid moves them almost instantly. The developer concluded that the only fix would be to store positions ahead of time, every second, and chose not to, because it would use CPU all the time for nothing. The issue is still open.

That is not a criticism of Memmon, which says plainly what it does. It is the clearest explanation I have found of why "restore on reconnect" is the easy half, and "save before the disconnect" is the hard one.

How to test your app

You do not need to read any code. Check the app's own site or settings for when it saves, then try this at your desk:

  1. Arrange a few windows on each monitor and leave them for a minute, so the app has had time to save the good layout.
  2. Lock the Mac and stay away. Wait until the monitors have been off for several minutes, and longer than any save interval the app mentions.
  3. Unlock and wait a few seconds. If the windows come back, it handled the lock. If they stay piled up, or the app moves them back into the pile, it saved after the disconnect.
  4. Repeat with real sleep and, on a MacBook, with the dock. Close the lid or choose Sleep, wait, then wake. Unplug the dock for a few minutes, then plug it back in. Each one disconnects the monitors in a different way.

If it only fails after long waits, the app probably saves on a timer. If it fails even after a short sleep or a lid close, it probably saves when it hears about the change, which is too late.

Fixes without an app

The surest way to avoid saving the mess is to avoid the mess. These keep the monitors connected, so there is nothing wrong to record:

None of these helps with real sleep, closing the lid or unplugging a dock: those are real disconnects, and something has to put the windows back. The full list is in every fix for windows moving after sleep.

How Many Displays handles it

Many Displays was built around this exact problem. It saves as you work, within about 1.5 seconds of a window moving, plus a light check every 20 seconds. The moment the Mac locks, starts to sleep, the displays sleep, or a display configuration change begins, it freezes saving and drops any save that was about to happen, so the layout macOS makes during the disconnect is never recorded. On lock and sleep it also writes the last good layout to disk.

When you come back and the displays have been stable for a few seconds, it puts back the arrangement, resolution and every window from that last good layout. For three minutes after a restore, changes nobody asked for, such as macOS nudging a window back, are undone instead of saved.

Where it does not help:

If you use another window tool too, turn off its automatic restore while you try this one, so two apps are not moving the same windows. The free trial lasts 14 days, with no account and no card.

Download the free trial How it works

Questions

Why does my window app restore the wrong layout after sleep?

macOS moves the windows of a disconnected monitor almost as soon as it disappears. If the app saves positions after that moment, because it saves on a timer or when it hears about the change, it stores the pile macOS made. When the monitor comes back, it faithfully restores the pile.

Why does it work when I unplug the monitor but not after sleep?

Timing. In the Memmon issue about this, its developer explains that the app only hears about a display change after it happens, and it worked only because macOS was sometimes slow to move the windows. Closing the lid or sleeping moves them too fast for that to work.

How can I test my window app?

Arrange your windows, lock the Mac and wait until the monitors have been off for several minutes, longer than any save interval the app mentions. Then unlock. If the windows stay piled up, or the app restores them piled up, it saved after the disconnect.

Can I avoid the problem without an app?

Partly. If the monitors never disconnect, there is no pile to save: keep the displays awake with a screen saver while locked and turn off deep sleep in the monitor's menu. That covers locks and idle time at the desk, not real sleep, closing the lid or unplugging a dock.