Mac Unavailable on VNC After 24 Hours: What to Check
Mac stops answering VNC or ConnectWise after about a day? Find out whether it slept, restarted or logged out, then hold it awake with caffeinate or Glowmoth.
GuideUpdated 9 min read
On this page
You have a plugged-in Mac with display sleep allowed and "prevent automatic sleeping" turned on in System Settings. Remote access works for about the first day, then the Mac is simply unavailable. The original public thread (2023, over 100 comments) never settled on a cause. Replies split between "use Amphetamine", "caffeinate is built in" and a hot corner. This page gives you a way to tell the causes apart instead of guessing.
Why the Mac goes unreachable
We could not confirm one root cause for this pattern, so these are the candidates, roughly most common first.
- The Mac slept anyway. The System Settings toggle only covers one situation. Apple's own wording for it is "prevent automatic sleeping on power adapter when the display is off", and it does not stop every route to sleep (a closed lid, a scheduled sleep, a policy). A keep-awake session holds a separate assertion and does not depend on that toggle.
- The Mac restarted. A restarted Mac is unreachable until it is back up. With FileVault on, it can wait at the unlock screen for a password. On a work Mac, an update or a management policy can restart it on a schedule, which looks just like "unavailable after a day".
- You were logged out. A Mac can log out after inactivity. Logging out ends your user session, and a remote session goes with it.
- A schedule. A
pmsetschedule can sleep, shut down or restart the Mac at a set time. - The network or the remote tool. The Mac is awake, but its IP address changed, its network dropped, or the ConnectWise agent or Screen Sharing service stopped. We have no evidence this explains a 24-hour pattern, but it takes a minute to rule out.
- Wake settings. Apple says "Wake for network access" lets the Mac wake briefly for shared services. It is not a guarantee that a sleeping Mac will answer every remote tool, so don't rely on it.
Find out what happened
Do this right after the Mac drops off, from the Mac itself or with someone sitting at it. These commands only read information.
Open Terminal and check how long the Mac has been running:
bash uptimeIf the uptime is minutes or hours when it should be days, the Mac restarted.
List recent sleep and wake events:
bash pmset -g log | grep -E "Sleep|Wake" | tail -40This prints the last 40 sleep and wake lines from the power log. A sleep line near the time you lost access means the Mac slept. The reason is usually shown, such as
Idle SleeporClamshell Sleep.Check for a scheduled sleep, shutdown or restart:
bash pmset -g schedSee what is holding the Mac awake right now:
bash pmset -g assertionsRun it again after you set up a fix to confirm the fix is active.
| What you find | Likely cause | What to do |
|---|---|---|
| Short uptime | The Mac restarted (update, crash, schedule) | Ask who manages updates and restarts |
Idle Sleep near the drop | Nothing held the Mac awake | Use a keep-awake session |
Clamshell Sleep | The lid was closed | See the lid note below |
An entry in pmset -g sched | A scheduled sleep, shutdown or restart | Remove or change the schedule |
| Long uptime, no sleep, tools still fail | Logged out, network or remote-tool problem | Check log-out, IP address, Sharing |
Fix 1: check the built-in settings
Apple's help pages describe the relevant switches. Open System Settings and look for these:
- On a laptop, open Battery, then Options. Check Prevent automatic sleeping on power adapter when the display is off. On a desktop, the label is "Prevent automatic sleeping when the display is off" under Energy Saver or Energy, depending on the macOS version. Apple's page on setting sleep and wake settings lists these options.
- In the same place, review Wake for network access. Apple's page on unexpected sleep and wake says other users can wake the Mac through this, and that shared services can keep a Mac from sleeping.
- Open General > Sharing and confirm Screen Sharing is on. If you use VNC viewers with a password, Apple's page on turning screen sharing on or off explains the options, and notes that Screen Sharing and Remote Management can't both be on.
- Search System Settings for "Log out automatically" and make sure auto log-out is not set. A management profile can enforce it on a work Mac.
If all of this is already right, as in the original report, settings are not the answer. Go to a keep-awake session.
Fix 2: caffeinate (built in, free)
caffeinate ships with macOS and holds the Mac awake for as long as it runs.
caffeinate -iThis blocks idle system sleep until you press Control-C. The display can still sleep. Add -d to keep the display on too. To stop automatically, add -t with seconds: caffeinate -i -t 604800 holds the Mac for 7 days.
Limits: it ends when you close the Terminal window, quit Terminal or log out, and it does not come back after a restart. It has no on-screen indicator. pmset -g assertions shows it while it runs. Our caffeinate guide covers the other flags.
Fix 3: Amphetamine (free, Mac App Store)
Amphetamine is a free menu bar app with many triggers for starting sessions (15 trigger types, per our notes). As of November 2026 it is listed as free with no in-app purchases. Its last update was in November 2023, so check that it supports your macOS version. Its closed-display mode relies on a separate add-on, Amphetamine Enhancer. We compare the two apps in Amphetamine vs Glowmoth.
Fix 4: a Glowmoth session
Glowmoth is our menu bar app. It holds at most one sleep-blocking assertion at a time. An Indefinitely session blocks idle system sleep. With Keep the display on turned off, the display can still sleep, which matches the setup in the original report. It needs macOS 14 or later.
- Download Glowmoth from its page, drag it to Applications and open it. There is no Dock icon, only a moth icon in the menu bar.
- Right-click the icon and choose Settings…, then open the Sessions tab. Under Display, turn Keep the display on off. Leave Default duration on "Indefinitely", its default.
- Right-click the menu bar icon and, under Keep This Mac Awake, choose Indefinitely. The icon changes to its Awake state and the panel header reads "Awake".
- Open the General tab. Under Startup, turn on Launch at login and Keep awake when Glowmoth opens. Open-ended sessions are not restored after a relaunch, so the second switch is what restarts the session when Glowmoth opens.
- In Terminal, run
pmset -g assertions. You should see an entry named likeGlowmoth: Session until you stop it.
Other things to know:
- Login. Launch at login starts Glowmoth when your account logs in. A restart that stops at the login screen won't bring the session back until someone logs in. If macOS asks for approval, Glowmoth shows "Allow Glowmoth in Login Items."
- Safety pauses. By default Glowmoth pauses everything when macOS reports serious thermal pressure for 60 seconds, and when on battery below 20%. A paused icon has a slash. See battery and heat limits.
- Other holders and traps. In the panel, Show More opens "Also Keeping This Mac Awake". It lists other apps holding the Mac awake, plus traps: a one-off scheduled sleep, shutdown or restart within 24 hours, a repeating sleep schedule, and automatic log-out after inactivity. See what is keeping your Mac awake.
- Manual sleep. Glowmoth blocks idle sleep, not sleep you ask for (Apple menu > Sleep, the power button).
- Lid closed. A normal session does not stop a closed lid from sleeping a MacBook. Glowmoth has a separate closed-lid mode (laptops only, Settings > Safety) that installs a helper you approve in Login Items. Hardware verification of that mode is still pending on our side. See closed-lid mode and our clamshell guide.
Glowmoth does not provide remote access. It only keeps the Mac awake so VNC, ConnectWise or whatever you use can reach it. Glowmoth is part of MacSuite; you can try it free for 7 days.
Which option to pick
| caffeinate | Amphetamine | Glowmoth | |
|---|---|---|---|
| Price (as of November 2026) | Free, built into macOS | Free, no in-app purchases | Part of MacSuite ($349 one-time), 7-day trial |
| Form | Terminal command | Mac App Store menu bar app | Menu bar app, direct download |
| Limit to know | Ends when its Terminal window closes or you log out | Last update November 2023 | Needs a license after the trial |
We make Glowmoth, so weigh our view accordingly. Pick caffeinate for a free test right now if you can leave a Terminal window open. Pick Amphetamine if you want a free app with many triggers and it runs on your macOS version. Pick Glowmoth if the Mac runs unattended and you want it to start at login and show what is holding it awake.
Checklist before you try again
uptimeshows days, not hours (no restart).pmset -g schedshows no sleep, shutdown or restart entry.pmset -g assertionslists your keep-awake entry.- The Glowmoth icon is not showing Paused, and the trial has not ended.
- End the session when the screen locks and Stop the session when switching to battery are off (both are off by default, and either ends your session).
- Screen Sharing or your remote agent is still running, and the Mac's IP address matches the one you connect to.
If nothing works
If the Mac is up, awake and still unreachable, the cause is probably the network, a log-out or the remote tool. On a work Mac, ask whoever manages it whether a policy enforces sleep, restart or log-out timing. For ConnectWise, contact your ConnectWise admin or their support. For Glowmoth, see troubleshooting Glowmoth or MacSuite support. Include the output of uptime and pmset -g log, the time of the drop, and what you tried.
My Mac becomes unreachable by VNC/ConnectWise about 24 hours after I last
connected. It is plugged in, display sleep is allowed, and "prevent automatic
sleeping" is on in System Settings.
Time of the last successful connection:
Time I noticed it was unreachable:
Output of uptime:
Output of pmset -g sched:
Sleep/Wake lines from pmset -g log near the drop:
Already tried: caffeinate -i / a keep-awake session, checked auto log-out.Common questions
Does the display have to stay on for VNC to work?
In the original report the display was allowed to sleep and access worked for about a day, so blocking system sleep is the part that matters. If your remote tool needs the display on, turn Keep the display on back on in Glowmoth.
Does this work with the lid closed?
Not with a normal keep-awake session. A closed lid sleeps a MacBook unless it has power and an external display, or unless you use Glowmoth's closed-lid mode.
What if the Mac restarts overnight?
A restart ends any session. With Launch at login and Keep awake when Glowmoth opens on, Glowmoth starts a session again once your account logs in. Until then the Mac may be unreachable.
Why not just rely on Wake for network access?
Apple describes it as letting the Mac wake briefly for shared services, and it needs supported Apple wireless hardware. A session that blocks sleep is simpler to reason about than waking on demand.