Think Different. Eject Different.
Knock three times on your MacBook and every external drive and SD card ejects, unless it's in use. A chord means it's safe to unplug. Sosumi means a disk is still in use, so it stays put.
- Move Eject Different to your Applications folder and open it.
- Click Turn On.
- Click Open System Settings and allow Eject Different under General › Login Items & Extensions.
macOS asks for approval because the listener runs as root. Root is the only way macOS lets an app read this sensor. Close the window whenever you like: the listener keeps running and starts again with your Mac.
To build it yourself, open EjectDifferent.xcodeproj in Xcode 27 or later, choose your team under Signing & Capabilities, then choose Product › Archive.
- Ejects USB and Thunderbolt drives, and SD cards in the built-in reader.
- Never touches the internal disk, disk images (including Xcode's simulator runtimes), or network shares.
- Skips any disk that's in use and plays Sosumi, so you know to wait. The exception is Time Machine. If a backup is holding the drive, Eject Different stops the backup and ejects the drive anyway. Time Machine discards the unfinished backup and starts fresh next time.
- Plays loud enough to hear. While the chime plays, your Mac is unmuted and the built-in speakers go to full volume. Then your volume and mute go back exactly as they were. Headphones and AirPods play the chime at your current volume.
While plugged in, your Mac stays awake so it can hear you, even with the lid closed. On battery it sleeps as it always has. When it ejects, it briefly wakes the Mac — and the screen, if the lid is open — so you can hear the chime even through a closed lid, then it goes back to sleep on its own. Your Energy settings are never changed.
- A MacBook with Apple silicon. Mac mini and Mac Studio have no motion sensor, and the app says so.
- macOS 15 or later.
Watch it listen and eject:
log stream --predicate 'subsystem == "com.nsd97.EjectDifferent"'Every knock appears with its number and how hard it landed, such as Knock 2: peak 0.072 g. An impact that didn't count says why.
See what a knock would eject, without ejecting anything:
"/Applications/Eject Different.app/Contents/MacOS/Eject Different" --listOpen Eject Different, click Turn Off, and drag it to the Trash.
Before the app, Eject Different was a command-line daemon installed with sudo Scripts/install.sh. Remove that version first:
sudo launchctl bootout system/com.nsd97.eject-different
sudo rm -rf /Library/LaunchDaemons/com.nsd97.eject-different.plist /usr/local/libexec/eject-different
sudo pmset -a disablesleep 0The old installer also set display sleep to 10 minutes. If you want your old setting back, change it in System Settings › Lock Screen.
Inside every Apple silicon MacBook is a Bosch motion sensor behind Apple's Sensor Processing Unit. There's no public API for it. macOS exposes its accelerometer as a vendor HID device, and the listener wakes it and reads 800 reports a second.
A Mac on a lap is never still, but that motion is slow. A knuckle on aluminum is fast: its energy sits between about 15 and 80 Hz. So the listener ignores everything below 40 Hz and listens for impacts above it. Typing, trackpad clicks, and moving the lid all stay well under the weakest knock. Three knocks about a third of a second apart make a triple, and the Mac answers the instant the third lands. One or two knocks do nothing, and neither does shifting in your seat, even when it lands harder than a knock.
The thresholds were measured with the Mac on a lap. That recording and every labeled one since live in Evaluation/, and the tests score the detector against all of them: each triple heard exactly once, and nothing else ever. Debug builds add a live chart of what the detector hears, and a recorder for new sessions on a lap, on a desk, on the move, or through a day of ordinary use. AGENTS.md explains how the recordings are used.
Ejecting uses the same calls Finder does. Each disk is asked to eject. If it refuses, macOS names the process holding it, and that is how Time Machine is told apart from everything else.
The chord is original, generated by Scripts/generate-success-chord.py. No Apple startup sound is redistributed.
Eject Different stands on MIT-licensed reverse engineering:
shaircast/nocnoc: Swift access to the SPU sensor and knock filtering.olvvier/apple-silicon-accelerometer: the sensor's report layout, usages, scaling, and wake properties.taigrr/spank: proof that a root daemon can listen to this sensor and answer with sound.
MIT. See LICENSE and THIRD_PARTY_NOTICES.md.