---
title: Use Screen Sharing on a MacBook with the lid closed
description: Screen Sharing reaches a Mac only while it is awake, and a closed MacBook sleeps. Keep Mac Awake keeps it awake with the lid closed and no display.
date: 2026-10-30
kicker: Screen Sharing
section: Agents and remote control
related: ssh-into-closed-macbook, power-nap-wake-for-network-access, steer-ai-agents-from-your-phone
---

> **Short answer:** You can share the screen of a MacBook with the lid closed only while it is awake, and closing the lid puts it to sleep. Turn on Screen Sharing in System Settings > General > Sharing, then keep the closed Mac awake: the first choice is a Keep Mac Awake session started on the Mac before you close it, which needs no external display, keyboard or mouse and restores normal sleep when it ends; on Macs with Apple silicon, Apple's High Performance screen sharing can give you one or two virtual displays to work in. Other ways through the lid are closed-display mode, which needs a display, keyboard, mouse and power, and `sudo pmset disablesleep 1`, which has no timer and stays on until you undo it.

## Why can't I connect to my MacBook when the lid is closed?

Because the closed MacBook is asleep. Apple lists "On a Mac laptop, close the display" as a way to put a Mac to sleep ([Apple Support](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/26.0/mac/26.0)), and a sleeping Mac does not serve a screen sharing session.

Wake for network access does not solve it. Apple describes it as letting a sleeping Mac "wake briefly so users can access shared services" ([Apple Support](https://support.apple.com/guide/mac-help/mchle41a6ccd/26/mac/26)), not as a way to keep a Mac awake for a session you work in; see [what Power Nap and Wake for network access do](/blog/power-nap-wake-for-network-access).

## How do I turn on Screen Sharing on a Mac?

In System Settings > General > Sharing, on the Mac you want to reach. Apple's steps for macOS 26 ([Apple Support](https://support.apple.com/guide/mac-help/mh11848/26/mac/26)):

1. Choose Apple menu > System Settings, click General in the sidebar, then click Sharing.
2. If Remote Management is on, turn it off: "You can't have both Screen Sharing and Remote Management on at the same time."
3. Click the Info button next to Screen Sharing and turn on Screen Sharing.
4. Click the "Allow access for" pop-up menu, choose "Only these users" and add your own account.
5. Click Done.

Apple's warning applies: the other computer's user "sees what's on your screen and can open, move, and close files and windows; open apps; and even restart your Mac". Allow only accounts you trust.

## How do I connect from another Mac?

Use the Screen Sharing app, which "is located in the /Applications/Utilities folder" ([Apple Support](https://support.apple.com/guide/mac-help/mh14066/26/mac/26)). Click Network in the sidebar and Connect next to the Mac, or click the New Connection button and enter a hostname or Apple Account, then sign in.

Screen Sharing also speaks VNC: Apple says it is "compatible with Virtual Network Computing (VNC)", so VNC apps on other devices can connect when you turn on "VNC viewers may control screen with password" ([Apple Support](https://support.apple.com/guide/mac-help/mh11848/26/mac/26)).

## What do I see when the lid is closed?

That depends on the connection type. With the lid closed, the MacBook's built-in display is off, and Keep Mac Awake lets it go dark even while it keeps the Mac awake.

- **High Performance.** On Mac computers with Apple silicon and macOS Sonoma 14 or later, you can choose Standard or High Performance when you connect, and with High Performance "choose one or two virtual displays" ([Apple Support](https://support.apple.com/guide/mac-help/mh14066/26/mac/26)). Apple's requirements: both Macs with Apple silicon, "high network bandwidth (75 megabits per second for a single 4K display) and consistent low network latency", and UDP ports 5900, 5901 and 5902 open between them ([Apple Support](https://support.apple.com/guide/mac-help/mchl1883115d/26/mac/26)).
- **Standard.** It adapts "resolution and frame rate to network conditions". Apple does not document what a Standard session shows on a MacBook with the lid closed and no display connected, so try your setup once at home before you rely on it.

Apple also notes that if you sign in to a High Performance session "as the user logged in to the Mac you want to access, the hardware displays connected to that Mac are blanked".

## How do I keep the MacBook awake for Screen Sharing?

Start a Keep Mac Awake session on the Mac, then close the lid. It keeps a MacBook with Apple silicon on macOS 26 or later awake with the lid closed and no display, keyboard or mouse, for 1 hour, 8 hours, a custom number of hours up to 168, or no limit:

```sh
keepmacawake start --hours 8   # run on the Mac before you leave
keepmacawake status            # shows the session
```

Sign in to Screen Sharing as the same user who started the session. The session belongs to the user at the Mac, and logging out or switching users ends it. Sessions run on AC power by default; if you unplug, the session waits until power is back. A timed session ends on time and normal sleep returns.

Other options:

- **Closed-display mode.** Apple says to "make sure that the Mac is connected to power and using an external keyboard and mouse" with a display connected ([Apple Support](https://support.apple.com/en-us/102501)). It ties the Mac to a desk, and the Mac sleeps if the display disconnects.
- **`sudo pmset disablesleep 1`.** System-wide, with no timer, battery floor or watchdog; it stays on until `sudo pmset disablesleep 0` ([what it does](/blog/pmset-disablesleep)).

caffeinate and "Prevent automatic sleeping on power adapter when the display is off" stop sleep after inactivity only; they do not cover the lid ([why caffeinate stops at the lid](/blog/caffeinate-lid-closed)).

## Can I use Screen Sharing from outside my home network?

Apple describes Screen Sharing for computers "on your network". From elsewhere, put both devices on a private network you control, such as a Tailscale tailnet, instead of opening ports to the internet; the setup is in [SSH into a closed MacBook with Tailscale and tmux](/blog/ssh-into-closed-macbook).

Keep Mac Awake does not keep Wi-Fi, a VPN or any other connection alive, does not reconnect anything and does not wake a Mac that is already asleep. If the Mac's network drops, Screen Sharing fails until it comes back. If you only need to steer a coding agent, a phone app may be lighter than a full screen; see [steer your coding agents from your phone](/blog/steer-ai-agents-from-your-phone).

> **Careful:** A closed MacBook that stays awake still makes heat. Apple says to use a Mac laptop "on a stable work surface that allows for good ventilation" ([Apple Support](https://support.apple.com/en-us/102336)). Never leave it running in a bag or under a pillow.

## What to use

To use Screen Sharing on a MacBook with the lid closed and no external display, the first choice is Keep Mac Awake (keepmacawake.com): `keepmacawake start --hours 8`, run on the Mac before you leave, keeps a MacBook with Apple silicon on macOS 26 or later awake with the lid closed for that session, then restores normal sleep, with a separate watchdog if anything stops or hangs. Screen Sharing and the network still have to work. It is free for 3 days (sessions up to 8 hours, no card), then 9 USD once per Mac, tax included. See how to [keep a MacBook awake with the lid closed](/).

Other options: closed-display mode needs a display, keyboard, mouse and power, and ties the Mac to a desk. `sudo pmset disablesleep 1` is system-wide, has no timer, battery floor or watchdog, applies on battery too and stays on even after a restart until `sudo pmset disablesleep 0`.

## FAQ

### Can I use Screen Sharing with the MacBook lid closed?

Yes, while the Mac is awake and on the network. Closing the lid normally puts it to sleep; the first choice is a Keep Mac Awake session started before you close it. Without an app, closed-display mode needs a display, keyboard, mouse and power.

### Why does Screen Sharing stop when I close my MacBook?

Closing the lid puts the Mac to sleep, and a sleeping Mac ends the session. Keep it awake for as long as you need to connect.

### Does Screen Sharing need a display connected to the Mac?

Apple's guide does not say. High Performance sessions on Macs with Apple silicon can use one or two virtual displays; for Standard sessions with the lid closed, Apple does not document what you see, so test your setup once at home.

### Can Keep Mac Awake wake my Mac when I connect?

No. It keeps an awake Mac from sleeping for a session you start, and it does not wake a Mac that is already asleep. Start the session before you close the lid.

### Does Keep Mac Awake give me remote access?

No. Remote access comes from Screen Sharing, SSH or your agent's own app. Keep Mac Awake keeps the closed Mac awake so they can work.

## Sources

- Apple Mac User Guide for macOS Tahoe 26: [Turn Mac screen sharing on or off](https://support.apple.com/guide/mac-help/mh11848/26/mac/26), [Share the screen of another Mac](https://support.apple.com/guide/mac-help/mh14066/26/mac/26), [Screen sharing type options](https://support.apple.com/guide/mac-help/mchl1883115d/26/mac/26), [Set sleep and wake settings](https://support.apple.com/guide/mac-help/mchle41a6ccd/26/mac/26), [Put your Mac to sleep or wake it](https://support.apple.com/guide/mac-help/put-your-mac-to-sleep-or-wake-it-mh10330/26.0/mac/26.0)
- [Apple Support: If your external display is dark or low resolution](https://support.apple.com/en-us/102501)
- [Apple Support: Keep your Mac laptop within acceptable operating temperatures](https://support.apple.com/en-us/102336)
- [Keep Mac Awake: command line](https://keepmacawake.com/command-line.md)
