The monitor on your hub blinks off for a second and every window lands on the laptop screen. Here is why, what to try for free, and how to get the layout back automatically.
Mac windows often rearrange when a monitor on a USB-C hub or dock flickers, sleeps, or reconnects, because for that moment macOS sees the monitor as unplugged and moves its windows to a display that is still there. When the monitor comes back, the windows usually stay where macOS put them. Free fixes can make the connection steadier. If they do not, SnapState can restore a saved layout automatically when the monitor reconnects.
Recommended fix: SnapState. Save your layout once and SnapState puts windows, apps and browser tabs back whenever the hub monitor returns. $9.99 one-time, up to three Macs. See the guide to windows rearranging when you connect a dock.
Short version: a hub that drops the video signal for even a second looks like a cable being pulled, so macOS moves the windows and leaves them there. Try the free fixes below first. If the flicker keeps happening, let SnapState put the layout back each time.
Why do Mac windows move when a USB-C hub monitor reconnects?
A USB-C hub or dock carries the video signal to your monitor alongside power, USB devices, and networking. A loose connector, a cable near its limit, a hub that runs short on power, or a monitor that drops into deep sleep can all make the signal cut out briefly. Each time it does, the monitor can disappear from macOS for a moment, which looks the same as unplugging it.
macOS generally responds by moving the windows from the missing display onto one that is still connected, often the built-in laptop screen. When the hub brings the monitor back, macOS re-detects it but does not reliably send each window back to its earlier display and position. It is the same behavior as windows moving after you unplug a monitor, just triggered by the hub instead of your hand. If your dock uses DisplayLink, see DisplayLink windows moving after sleep, and if the pile-up only happens after the Mac sleeps, see windows moving to one screen after sleep.
What free fixes should you try first?
These are worth trying before you pay for anything. Results vary by Mac, hub, cable, and monitor.
- Reseat and swap the cables. Make sure the USB-C plug is fully seated, and try a shorter or higher-rated USB-C, HDMI, or DisplayPort cable between the hub and the monitor.
- Try another port or go direct. Plug the hub into a different port on the Mac, or connect the monitor straight to the Mac to see whether the hub is the cause.
- Give the hub enough power. If your hub or dock has its own power supply, use it, and avoid running many power-hungry devices from a bus-powered hub.
- Update the hub and check the monitor. Install firmware updates if the hub or dock maker offers them, and look in the monitor on-screen menu for options related to deep sleep, power saving, or automatic input detection. Names vary by model.
- Try Stay. Stay by Cordless Dog has been free since version 1.5.1. It stores window positions for each display combination you use and can restore them as displays connect and disconnect. See SnapState vs Stay for how the two differ.
How does SnapState put windows back after a hub reconnect?
- Arrange your windows with the hub monitor connected. While the monitor on the USB-C hub or dock is on and detected, put each window on the screen and in the position you want to come back to.
- Save the arrangement as a named workspace. Capture the setup from the SnapState menu bar app and give it a clear name such as Hub desk. It records window positions and sizes, the apps to relaunch, the browser tabs in supported browsers, and the display layout.
- Arm the monitor connect trigger. Turn on the monitor connect or matching display layout trigger for that workspace, so the restore runs once the hub has brought the monitor back instead of while it is still missing.
- Add the wake trigger if the hub drops during sleep. If the monitor also disappears while the Mac sleeps, arm the wake from sleep trigger too, so the layout comes back after wake as well as after a flicker.
- Restore by hand if you ever need to. If something still lands in the wrong place, pick the workspace from the menu bar or press its Control-Command-1 to 6 shortcut.
SnapState is a native macOS menu bar app. A workspace captures the windows on every Space with their position and size, the apps needed to relaunch them, the monitor and display layout, and all open tabs of each window in Safari, Chrome, Edge, Brave, Arc, and Chromium once Automation permission is granted. If the hub monitor is still missing when a restore runs, saved window frames are remapped onto the displays you have now, and the monitor connect trigger puts things right once it returns.
The same approach helps if your windows rearrange when you switch your monitor input or an iPad Sidecar display connects or drops.
What are the practical details?
SnapState costs $9.99 as a one-time purchase, with a lifetime license for up to three Macs. Version 2.7.2 requires macOS 15.7 or later on Apple Silicon and Intel Macs and ships as a signed, notarized DMG rather than through the Mac App Store. It needs Accessibility permission to move windows, and workspace data stays local on your Mac as JSON in ~/Library/Application Support/SnapState/.
What are the honest limits?
SnapState cannot repair a faulty hub, cable, or monitor, so it does not stop the flicker; it restores the layout after it. It restores layouts across multiple Spaces (apps go back to the Space they were saved on, full-screen windows return to full screen, and windows on other Spaces are placed when you switch to them). Firefox is not supported, and tabs are restored only from supported browsers. It is not a tiling or snapping window manager, and it requires macOS 15.7 or later.
What else should you know?
Why do my Mac windows move when the monitor on my USB-C hub flickers?
A flicker is often a short disconnect. When a USB-C hub or dock briefly loses the video signal, renegotiates it, or resets, the monitor can vanish from macOS for a moment. macOS treats that as a disconnected display and moves its windows onto a screen that is still there, then usually leaves them there when the monitor returns a second later.
Why does it happen after the monitor sleeps or the Mac wakes?
Many monitors power down deeply when they sleep, and a hub may stop reporting the display until it wakes. When the monitor comes back through the hub, macOS sees a new connection and does not reliably send each window back to its earlier display and position.
Is there a free way to stop a USB-C hub monitor from disconnecting?
Try a different port on the Mac, a shorter or higher-rated USB-C or HDMI or DisplayPort cable, connecting the monitor directly instead of through the hub, giving a powered hub its own power supply, and updating the hub or dock firmware if the maker offers it. In the monitor on-screen menu, options for deep sleep or automatic input detection can also matter. Results vary by hub and monitor.
How does SnapState fix windows that rearrange after a hub reconnect?
Save a workspace while the hub monitor is connected and every window is where you want it, then arm the monitor connect or matching display layout trigger, and wake from sleep if needed. When the monitor reappears, SnapState moves the saved windows back, relaunches missing apps, and remaps saved frames onto the current displays if the setup differs.
How much does SnapState cost?
SnapState is $9.99 as a one-time purchase, with a lifetime license for up to three Macs. There is no subscription.
What does SnapState not do here?
SnapState cannot fix a faulty hub, cable, or monitor, so it does not stop the flicker itself; it puts the layout back after it. Firefox is not supported, tabs are restored only from supported browsers, it is not a tiling or snapping window manager, and it requires macOS 15.7 or later.