Prevent Macbook from sleeping while syncing

What I’m trying to do

I start making significant changes to my vault folder structure about 20 hours ago, and I made sure Obsidian sync was syncing changes and left my Macbook alone to do its work. When I checked on the sync 18 hours later, it was still syncing!

I suspect that my Macbook went to sleep sometime during those 20 hours, and it paused until I woke up my laptop.

What I’d like is for Obsidian sync to prevent my Macbook from sleeping.

Things I have tried

I searched the docs and on the Web for a way for Obsidian sync to prevent the device from sleeping during sync, and I only found a setting for the mobile app, not the desktop app.

Am I missing something, or is there a way from inside Obsidian to prevent device sleep during sync? I’m aware of 3rd party tools like the caffeinate command or the amphetamine mac applications, but I’d prefer to have feature parity between desktop app and mobile app by having the “prevent sleep” setting available to both.

Environment
System: M1 Macbook Pro
macOS 15.3.2
Obsidian for Mac: v1.8.9
Vault File Count: 38700 files
Vault File Size: 4.6 GB

How big is your vault?

I added that info to my original post.

Such a slow sync should be a one-time occurence after making those massive changes, so I’d rather setup my mac to not power off when you’re aware it’s going to do that.

If my memory serves me well, you can add a behavior like not sleeping to one of the corners of the desktop, so that if you move your mouse into that corner (of your choice) it automatically never sleeps (until you move the mouse away from the corner and resume normal activity).

What about the size in GB? That’s more relevant than the number of files.

Settings to not sleep should be in Battery. Maybe this:

Otherwise I think “caffeinate” is now a built-in terminal command that you can run to keep the Mac awake. I agree with holroy that it would be better for you to manage this for the first time you need to sync. Subsequent syncs should be much shorter.

1 Like

Sounds good. I was doing a lot of syncing. 1st with moving thousands of file, and then I was troubleshooting the Consistent attachment and files plugin that was locking up Obsidian. That issue turned out to be report (.md file) file generated by the plugin was too big for Obsidian to open at 2.9 MB in size. While troubleshooting, I was creating and testing multiple vaults, and keeping the computer awake was important.

1 Like