Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 Best reply

Posted on Dec 15, 2021 1:20 AM

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.

135 replies
Question marked as Best reply

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.

Dec 20, 2021 9:02 AM in response to pommarg

Same thing too, using 2 external LG 4K monitors via USB-C on a 2019 16" MacBook Pro. When using Big Sur all was fine. Was hoping that 12.1 would fix it but that was false hope :-(

After upgrading same issue as others are mentioning here: windows are re-appearing randomly on the three screens after returning from sleep (which is several times a day). Not only that, every now and then MacOS also "forgets" that those 2 external monitors do not support the HDR setting (different story) and the setting is turned back on.

Thinking about downgrading to Big Sur since this is really annoying

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.)

Nov 1, 2021 7:03 AM in response to pommarg

Hey there pommarg,


Thanks for using Apple Support Communities. We understand you're having issue with using multiple displays on your Mac mini with macOS Monterey. We'd be happy to help.


Let's be sure you're on the updated version of macOS Monterey 12.0.1 Here's how you can update if you're not: Keep your Mac up to date


Make sure to check this as well: Connect a display to Mac mini


If you're still having an issue after checking those links, contact our Apple Support team here: Contact Apple Support


All the best.

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!

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.


Dec 16, 2021 12:52 AM in response to c2Fq

Here is a dopey workaround:


caffeinate -s -w 1


This will forbid the Mac from going to sleep while it is connected to an A/C supply.


Displays will sleep and wake as usual, which helps conserve a little energy when the machine is left idle. It seems the display sleep/wake events are not the problem.


In theory, a MacBook should sleep if disconnected from an A/C supply, though I have not tested this case. Be careful when packing a MacBook in a bag or backpack. If left to run, without sleeping, the machine may generate too much heat. If in doubt, terminate that process before you take the Mac off a well ventilated desk. This is obviously not a concern if you are using a Mac Mini.


My MacBook seldom leaves my desk -- and is almost always on an A/C supply -- so I just leave that running permanently. This bug was driving me nuts.

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!

Jan 14, 2022 4:28 PM in response to pommarg

Same issue here for weeks. None of the updates have worked. Falls asleep for a minute and disaster of windows on all random spaces. Using a DELL P2715Q Display direct into the USB C port, no hub.


MacOC 12.1 (21C52)

MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports), Intel Iris Plus Graphics 655 1536 MB

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 ID.