SidecarKeeper

Your iPad display, back by itself.

macOS drops Sidecar every time the screen sleeps, locks or the lid closes, and never reconnects it. SidecarKeeper does, within seconds, without a single “Unable to connect” notification.

$ /bin/bash -c "$(curl -fsSL https://github.com/EMOEMOJAI/SidecarKeeper/releases/latest/download/install.sh)"

Paste into Terminal with your iPad unlocked. Free and open source (MIT). macOS 14.2 or newer, Apple silicon and Intel. No Xcode, no sudo, no permissions. Use Homebrew? brew install emoemojai/tap/sidecarkeeper. Other ways are in the README.

~/Library/Logs/sidecar-keeper.log
  1. ok
  2. session locked
  3. locked, idle
  4. session unlocked
  5. reconnected iPad
  6. lid closed, idle
  7. reconnected iPad
A whole day, seven lines. It waits when a connect cannot work, and acts the moment it can.

It only tries when it can succeed

A script that calls “connect” in a loop fails while the Mac is locked, and every failure is a notification. Leave it overnight and you wake up to a hundred. SidecarKeeper checks five things first, and backs off from 30 seconds to 5 minutes after a real failure.

  • You have not paused itDisconnected on purpose? sidecar-keeper pause and it leaves you alone.
  • The screen is awakeFollows macOS display sleep and wake events, no polling guesswork.
  • The session is unlockedNever attempts anything behind the lock screen.
  • The lid is openSidecar cannot start with the lid closed, so it waits.
  • The iPad is reachableAn 8 ms check before any attempt. Optional wired-only mode checks for the USB cable too.

Honest about the limits

Two things are decided by macOS, not by any tool.

Sidecar drops when the display turns off

Display sleep, the lock screen and a closed lid all end the session. That cannot be prevented. SidecarKeeper makes the reconnect automatic and fast, typically 5 to 9 seconds.

No Sidecar with the lid closed

macOS cannot create the virtual display while the built-in one is off. Open the lid and the iPad is back before you have sat down.

Questions

Configuration, wired mode and a troubleshooting table are in the manual.

Sidecar keeps disconnecting when my Mac sleeps or locks. Does this fix it?

macOS always drops Sidecar when the built-in display turns off, and nothing can prevent that. SidecarKeeper reconnects automatically within a few seconds of the display coming back, so you never reconnect by hand.

How do I automatically connect my iPad as a second display at login?

Install SidecarKeeper. Its LaunchAgent starts at login and connects as soon as the iPad is reachable and unlocked.

Can I use Sidecar with the MacBook lid closed?

No. macOS cannot create the Sidecar virtual display while the built-in display is off (error -501). That is an Apple limitation no tool can work around. SidecarKeeper waits quietly and reconnects when you open the lid.

How do I stop the "Unable to connect to iPad" notifications?

Those come from connect attempts that were never going to succeed. SidecarKeeper checks screen, lock, lid and device state first, and backs off from 30 seconds to 5 minutes after a real failure.

Does it need admin rights or special permissions?

No. It is a per-user LaunchAgent and two small binaries in your home folder. It never asks for sudo and needs no privacy permissions.

Does it work over USB or Wi-Fi?

Both. By default macOS picks the transport. An experimental wired mode forces the USB cable.