Monterey seems to not remember which display should show which windows after sleep wakeup

I have a 2 display setup. I move some Safari windows to one screen. After waking up from sleep, all windows are on one screen and the second is empty. This is on an M1 mini.

Posted on Oct 30, 2021 4:50 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 25, 2022 11:01 AM

New Mac Studio (currently 12.3.1), with 2 Dell P2715Q screens, both attached with USB-C -> mDP cables. Had a session with Apple Support, they ran through every debugging thing they could think of, no fix. Apple Support said it is a bug and they are working on it. So... one day we will see it fixed I guess. Until then, there is Moom to the rescue. If you want to try, I got Apples attention by tweeting to their Twitter AppleSupport channel.


A couple of things to note. Moom does work for me! But, I needed to do an extra to get it to work. After installing Moom, and setting up my application windows they way I want, I created a snapshot in Moom. Then, I updated the snapshot while holding the option key down. After doing this, I can now quickly reset the position of my apps to the secondary screen with my shortcut. Hope this helps someone else.

135 replies
Question marked as Top-ranking reply

Apr 25, 2022 11:01 AM in response to pommarg

New Mac Studio (currently 12.3.1), with 2 Dell P2715Q screens, both attached with USB-C -> mDP cables. Had a session with Apple Support, they ran through every debugging thing they could think of, no fix. Apple Support said it is a bug and they are working on it. So... one day we will see it fixed I guess. Until then, there is Moom to the rescue. If you want to try, I got Apples attention by tweeting to their Twitter AppleSupport channel.


A couple of things to note. Moom does work for me! But, I needed to do an extra to get it to work. After installing Moom, and setting up my application windows they way I want, I created a snapshot in Moom. Then, I updated the snapshot while holding the option key down. After doing this, I can now quickly reset the position of my apps to the secondary screen with my shortcut. Hope this helps someone else.

Jun 9, 2022 4:20 AM in response to rvgeerligs

I think I know why Monterey does not position windows on the correct display after sleep.


Many others have reported the bug in Monterey that causes windows to   be displayed on only one display after sleep. The below example is not specific to any particular brand of display.


I have 3 Eizo  4K EV3285 displays on a Mac Studio M1 Max running Monterey 12.4.


I believe the core problem is that the OS does not allow enough time to check for available displays, rather than “forgetting” the window-positions on the various displays. My experiment shows that Monterey does remember the window positions, however it only detects one of the displays.


I verified this by disabling  the  setting “Power Saving” on each display, this an internal setting made on the physical display, not on the Mac. The setting causes the Eizo display to go to sleep until an incoming signal is detected on the specified active input port.


On wakeup with Power Saving ON, all the windows end up on the same display, because the OS does not allow enough time for all displays to wake up. 


On wakeup with Power Saving OFF the windows all appear in the correct  pre-sleep  positions on all displays, because all displays react immediately to the incoming signal from the Mac.


This works both when the Mac is put to sleep and with the Mac setting Active Screen Corners “Put display to sleep” 


It also works from a cold start, provided the displays are still running with “power Saving” OFF.


However, it is still a bug that should be fixed.

Jun 23, 2022 6:05 PM in response to pommarg

After weeks of experimenting I finally figured out how to stop my macbook pro M1 (2021) from moving all the windows on the external displays to the one particular external display that is the “main” display when restoring from Sleep. All I had to do was “check” the box for “Displays have Separate Spaces.” This is a setting under “Mission Control”(System Preferences)(Note: the other three checkboxes are all unchecked).


I cannot believe that is all I had to do. When I first got my macbook a couple of months ago the check box was checked by default but I unchecked it so that when I used the three finger gesture to switch between spaces/desktops on one of the screens it would now apply to both screens. Little did I know that there is an OS bug (external display window consolidation bug), which is likely a regression in Monterey.


The bug was tricky to reproduce initially but I finally figured out how to reproduce it consistently 100% of the time. The way to do that is to use the Apple menu item for “sleep” because when I use the wireless keyboard’s power button and held it down for 1.5+ sec it would not actually sleep because my apple keyboard has the touch ID which disables the sleep trigger and merely shuts off the display/locks my computer. I’m guessing at some point between 10-30min after hitting keyboard power button it would actually enter “sleep” mode (not sure what sleep level the problem arises in. It was that time window which made the bug seem random before I figured it out.


I hope this helps others.

Jan 21, 2022 8:28 AM in response to pommarg

As posted previously, I also have this problem and would love to see it fixed. As a (hopefully temporary) workaround, I have checked the "Prevent your Mac from automatically sleeping when the display is off"


With this, I am still able to "Put hard disks to sleep when possible" "Turn display off after ..." and lock my computer.


So, although it's not a full and proper sleep, there is at least some power savings for display and HDD - and my windows are staying where I left them. Hope this helps those of you that can leave your machines in a similar state.

Jun 29, 2022 6:14 AM in response to rachelbwang

Monterey does not forget the window positions.


My hypothesis is that Monterey does not “forget” the window positions on different displays. It does, however, start to position windows the moment the first display is available.


I verified this by ensuring all my displays are not in any proprietary deep sleep mode before I wake my Mac from sleep.


If my displays are in deep sleep mode the windows are not distributed correctly, if I first make sure the displays are not in deep sleep mode it all works perfectly both after Mac sleep and after a cold start.


I recommend you check if your displays automatically goes into a special deep sleep when they get no signal from the Mac for a certain period of time. If this is the case then follow the below procedures.


To sleep the Mac:


  1. Use the menu item “sleep”
  2. Turn your displays off.


To Wake the Mac:


  1. Turn your displays on.
  2. Wake your Mac before your displays goes into automatic deep sleep.


Good luck!

Jul 22, 2022 11:01 AM in response to rachelbwang

I was able to solve this issue, on my computer at least. Mac Studio running 4 external displays. 3 of them USB-c and one HDMI.

SOLUTION:

I changed the power saver settings to make sure that the computer itself went to sleep BEFORE my monitors went to sleep. When the computer itself goes to sleep and blacks out the screens, it saves the current window arrangement on all monitors and desktops.


The issue was that my monitors were turning off / sleeping first and the computer lost the monitor output, and therefore pushed all the windows back to the main monitor.


Let me know if this is the case for anyone else and if this helped.


Jul 27, 2022 4:56 PM in response to john at mq

Did you try changing your Mac Studio sleep settings to be shorter than the monitor sleep settings? I set my Mac studio to sleep after 15 minutes (my monitors sleep after 20) and as long as the computer itself goes to sleep before the monitors, that has fixed the issue for me 100% of the time. Even after the computer sleeping overnight.


It seemed that when the monitors went to sleep first, the computer saw the display disappear so it moved the windows from that display to the main screen. Then when I would wake up the computer, everything would be on the main screen since the monitors slept first.



Aug 11, 2022 4:13 AM in response to SamyIshak

@SamyIshak and others


Try this:


To switch off or sleep your Mac:


  1. Leave your monitors on.
  2. Put your Mac to sleep or power it down via the Apple main menu.

3 You can now, optionally, manually switch your monitors off.


If you did not switch your monitors off, they will now (depending on your monitor type and settings) either go into deep sleep or light sleep.


To wake or power up your Mac:


  1. Power up your monitors if you switched them off in step 3 above.
  2. Power up or wake up your Mac (depending on what you did in step 2 above


Depending on the type of sleep your monitors support you will now, after login, either see the windows distributed correctly or they will all be gathered on the first monitor the OS discovers.


In the event the windows are all on the same screen it is likely that your monitors automatically goes into deep sleep when there is no signal from the Mac. In this case find out if your type of monitor has an internal “eco deep sleep” setting that can be disabled. If so disable it and try again.


My hypothesis is that the OS does not wait long enough for monitors in deep sleep to wake up.


The above procedures work for me, see my previous comment.


Aug 19, 2022 9:35 PM in response to Problem Solved Now

Sandman

I made a discovery… that any applications which are hidden do not loose window positions across a 'sleep'. With this in mind I have written an application to fix the sleep/wake window position issue. (It does not target any other issue, it is only for sleep).


You can download the application here. I call the application Sandman because it puts it's children to sleep.


You may download, unzip and run the application. It should put itself into the background and operate quietly. Sandman doesn't modify your system at all — it listens out for wake & sleep notifications from the computer and the screens, and simply hides and shows applications at appropriate times.



It may not work for everyone. To understand more, there are two main scenarios:


  1. Your computer sleeps before your monitors do. This is my setup, so this is the most tested scenario. The program works flawlessly for me.
  2. Your monitors sleep before your computer sleeps. This scenario is less tested.


I have briefly tested Sandman on a computer where the monitors go to sleep first. Sometimes one application remained hidden, or it's windows moved screen, but it was better than nothing. I hope this has been fixed, but can't test it at the moment. I won't hurt to try to see how you get on. You likely won't even know which scenario is yours.


Limitations:

  1. Sandman will not work if System Preferences is the active (front) application when sleeping. This is intentional, and it is to avoid the application triggering when you are rearranging your screens in the Displays preference.
  2. Sandman does not work when you log out or restart. This can be fixed but it's a lot of work. Hopefully Apple will fix the bug first.


Please post your experience in the discussion, but I cannot offer individual support.


Jan 13, 2022 7:43 AM in response to pommarg

This workaround WORKS!!! I have MacOS Monterey 12.1 on a 2019 Intel/8-core MacBook Pro with Touch Bar. I use a large secondary 4K display with 2x spaces on it. Since the upgrade, after display would sleep and at night after closing laptop lid, my secondary display windows on both spaces would collapse to bottom right corner (overlapped) and I had to reposition them every time it re-awakened. I added the app Rectangle (0.5) which adds a lot of window snapping feature and it helped keep the windows from collapsing every time the screen saver (or display sleep) would kick it but didn't help for overnight sleep (lid closed). Then I tried not closing the lid all the way and putting to sleep with button (reddit suggestion - I added a touch bar sleep button, btw) - and now when I re-awaken, all my windows stay in place! I can live with this until the bug gets fixed!

Dec 15, 2021 1:20 AM in response to pommarg

Same problem. This is a regression.


                 ┌────────────────────┐                                
                 │   Thunderbolt ->   │    ┌─────────┐   ┌────────────┐
              ┌─▶│DisplayPort adapter │───▶│DP cable │──▶│Dell P2715Q │
┌───────────┐ │  └────────────────────┘    └─────────┘   └────────────┘
│  MacBook  │─┤                                                        
└───────────┘ │  ┌────────────────────┐                                
              │  │   Thunderbolt ->   │    ┌─────────┐   ┌────────────┐
              └─▶│DisplayPort adapter │───▶│DP cable │──▶│Dell P2715Q │
                 └────────────────────┘    └─────────┘   └────────────┘


I previously used a MacBookPro13,2 and macOS 11.6. The bug was not present on that machine. Application windows would reliably hold their positions across both monitors after wake from sleep.


I recently replaced the MacBookPro13,2 with a MacBookPro18,3 (2021, 14'', M1 Pro) and macOS 12.1 Nothing else was changed. Same monitors. Same cables. Same adapters. The bug is now reliably reproducible.


On wake from sleep, application windows always move to the monitor with the Mac menu bar and dock. Electrical connections between the devices in the diagram above are never disturbed during sleep.

Jan 31, 2022 4:10 PM in response to Caniacal

Hello. For what it's worth, the other workaround noted earlier in this discussion still works on 12.2.


https://discussions.apple.com/thread/253313547?answerId=256496207022#256496207022


Perhaps my earlier post was too terse. Type that into a Terminal window and hit ENTER. The widget will appear to do nothing. Your window should look something like this:



This is fine. caffeinate is running -- but, by design, does not write any output while it executes. The machine will stay awake so long as it is connected to an A/C supply and so long as caffeinate is running. Move this window aside or hide it. You can forget about it while you work.


caffeinate will terminate when the Terminal window is closed. (You may also send it ^C -- hold down the control button, tap c, then release the control button. This will terminate the program and return you to the unix shell.)

Mar 19, 2022 6:59 AM in response to pommarg

Just adding another user with this issue. Brand new 16" MacBook Pro M1Max with 2 external thunderbolt to Display Port connections. As others had noted, this issue seems to happen because the displays wake after the Mac. If I turn on the displays before waking the Mac, I don't have this issue, but this is hardly an acceptable solution. Forgetting to do this and you're spending a minute+ re-organizing your windows. Especially annoying in an application like Adobe Illustrator with a myriad of tool windows that get scattered to the wind. I've submitted a formal bug report. Let's hope this gets a fix soon! Such an annoyance for such an expensive machine.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Monterey seems to not remember which display should show which windows after sleep wakeup

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.