I do need to power down and unplug my Mac mini from tyhe powre socket quite often due to living in an area prone to storm with lightning and loud thunder. While I have power surge and lightning arrestor, I feel safer to unplug as I don’t want to gamble an expensive machine and display to chance.
In Windows, I would usually do a Hibernation and then unplug the PC. What this does is that it writes the contents of the memory into the harddisk and when I power on Windows again, it will read from hard disk and restore the state i.e. preserving all the windows arrangement, my Excel/Word which may/may not be saved, etc. Basically it restore the system as per how it was before hibernation.
Apple seems to have similar featured called Safe Sleep but it is only available on laptops. That’s why if your MacBooks ran out of battery during sleep and you plug it back in, you can see that the start up takes longer.
How about the Mac mini? Does it have such capability and if so, how can I trigger it manually? Perhaps some command line magic? I still want the usual sleep which lets me wake up every morning but in cases where a storm is coming, I don’t want to shut down the machine. I’d rather hibernate it.
This was a pair of features, Autosave and Resume, that were introduced in Mac OS X Lion in 2011. It was supposed to allow shutting down the Mac and then having it restart in the same state, apps and windows. However it never really was 100% functional because 3rd parfty apps didn’t have to implement and as it turns out even Apple didn’t implement it consistently!
I am using Stage Manager and I grouped many apps together - work, social, browsing, programming, etc. In each Stage, I also arrange the windows in their places. I also have multi monitor setup, so each display has its own apps and windows position. Rebooting and restarting the apps does not keep the apps in the same position, monitor and stages.
It’s amazing how macOS is so outdated when it comes to basic stuff like hibernation, windows positioning in multi monitor. It’s like the Apple of old, when they are developing the OS, was sleeping instead of getting these basics right.
This morning, when I wake the Mac from sleep, my widgets are all over the place… they don’t stay in their places. How infuriating!
So I think, if you are adventurous, you could try setting ‘hibernatemode’ to 25 and see what happens. Also, the settings for “standby” seem relevant, as you can configure after how many seconds of sleep the system goes to hibernation.
Thanks! I will research more on this although there are many warnings from internet/reddit (even the man pages) of not messing with it. However, I did issue this command pmset -g | grep hibernatemode which is to show what is the current hibernatemode for my Mac. It returned blank, which made me suspect that the Mac mini does not have this function. On the contrary, running that command in my M1 MacBook Air returned hibernatemode 3
Macs with Apple Silicon have become quite a bit more like iPads and iPhones these days. Sleep and hibernation is no longer what it was but “old hands” with long experience of Intel processors find it hard to “relax.”
If worried about lightning, investigate a whole house solution and turn off your Mac and disconnect temporarily from the electrical grid (unplug or turn off the switch at your local surge suppressor).
I have two screens but do not use Spaces or Stage Manager, as they always worked best for me only on one screen. I do use Moom for window arrangement and other users with more complicated setups recommend Brett Terpstra’s Bunch system.
I have four displays and ten spaces, perhaps a “more complicated setup”.
I use the following to arrange my windows:
I set up ‘anchor apps’ which always open in the same space. To set this right click on the app’s icon in the dock and then from the flout menu select Options > This Desktop. Thus for example I have Mail always open in space 5 and Music in space 6.
I use Moom to arrange the windows. Continuing the example, I have presets in Moom to move and size the windows for Mail and Music.
I use Keyboard Maestro to watch for when Mail and Music are are launched, and call the Moom presets for each.
Thus with a bit of setup up front, whenever I open one of these apps, It automagically arranges the windows as I want them.
I further combine this with Bunch to launch a predefined set of apps based on ‘context’. My morning bunch launches ten apps, across the ten spaces, opens specific websites, and via AppleScript and Shortcuts turns on outlets for my stereo receiver, speakers, and depending on the day of the week my work laptop.
My setup has evolved over time, but I’ve used easily available tools to make it work for me.
Would I rather spaces remained consistent and that windows remembered size and position? Of course. But a little upfront setup takes much of the annoyance away. Fell free to ask questions, and there are examples of how I do this elsewhere on this forum.