A lightweight macOS menu bar app that prevents dangerous volume spikes when Bluetooth audio devices connect.
⚠️ Development Status: This project is in active development. It works and has been verified on macOS 26.2 (Tahoe), but has not been tested on other macOS versions. Use at your own discretion.
macOS has a long-standing bug (documented since 2009, still present in macOS Sequoia) where Bluetooth headphones sometimes connect at maximum volume, causing painful audio blasts. This has been reported across:
- AirPods (all generations)
- AirPods Pro
- AirPods Max
- Sony WH-1000XM series
- Bose headphones
- Various other Bluetooth audio devices
Users have reported volume spikes reaching 122 decibels — well above safe listening levels.
Apple Community Forums:
- Volume on Bluetooth goes to max upon connection — Users report "blasting" at 100% volume
- [DANGEROUS BUG] Bluetooth volume goes up — Described as causing users to become "almost deaf"
- AirPod Volume Bug on Reconnect to Mac — Volume jumping from 15% to 50% on reconnection
- AirPods Max's volume goes to max by itself — Users receiving "unhealthy sound level notifications"
- macOS volume limiter/warning — References to this bug dating back to 2009
MacRumors Forums:
Other Resources:
- Limiting your Mac's volume in 2019 — Medium article on workarounds
- r/MacOS discussion — Reddit thread on the issue
VolumeGuard monitors your audio devices using Apple's official CoreAudio APIs and instantly enforces volume limits:
- ~15-30ms response time — Volume is capped before you hear the full blast
- Per-device limits — Different limits for different headphones
- Persistent settings — Remembers your limits across restarts
- Zero friction — Menu bar app, launches at login, just works
- 🎧 Per-device volume limits — Set different max volumes for each audio device
- ⚡ Instant enforcement — Limits applied within milliseconds of any volume change
- 🔊 Real-time monitoring — See current volume and limit in the menu bar popover
- 💾 Persistent configuration — Settings saved automatically
- 🚀 Launch at login — Start automatically with your Mac
- 🎯 Bluetooth-focused — Auto-enables limiting for Bluetooth devices
Click the menu bar icon to see your devices and adjust limits:
| Menu Bar Popover | Settings Window |
|---|---|
| Current device with volume bar and limit slider | General, Devices, and About tabs |
This project uses xcodegen to generate the Xcode project file.
Prerequisites:
- macOS 13.0 (Ventura) or later
- Xcode 15.0+
- xcodegen (
brew install xcodegen)
Steps:
-
Clone this repository:
git clone https://github.com/yourusername/VolumeGuard.git cd VolumeGuard -
Generate the Xcode project:
xcodegen generate
-
Open and run in Xcode:
open VolumeGuard.xcodeproj
Then press ⌘R to build and run.
Or build entirely from the command line:
xcodegen generate
xcodebuild -scheme VolumeGuard -configuration Release build
open ~/Library/Developer/Xcode/DerivedData/VolumeGuard-*/Build/Products/Release/VolumeGuard.appTo install permanently, copy the built app to your Applications folder.
Note: Since the app is not signed with an Apple Developer ID, macOS Gatekeeper will block it on first launch. To open:
- Right-click the app → Open → click Open in the dialog, OR
- Go to System Settings → Privacy & Security and click Open Anyway
This only needs to be done once. The app does not expire.
- Launch VolumeGuard — A speaker icon appears in your menu bar
- Click the icon — See your current audio device and volume
- Adjust the limit slider — Set your maximum volume (default: 70%)
- Enable "Launch at login" — In Settings, enable auto-start
When volume exceeds your limit, VolumeGuard instantly resets it. You might hear a brief blip of loud audio (~15-30ms) before it's corrected.
VolumeGuard uses Apple's CoreAudio Hardware Abstraction Layer (HAL) APIs to:
- Monitor device changes — Detects when Bluetooth headphones connect
- Monitor volume changes — Receives instant callbacks when volume changes
- Enforce limits — Programmatically resets volume when it exceeds your limit
All using official, documented Apple APIs — no hacks, no kernel extensions, no admin privileges required.
Other projects addressing this issue:
- save-my-ears — Launch agent to reset volume on headphone connection
- PurrfectVolume — AppleScript-based volume limiter
- Bluesnooze — Prevents Mac from connecting to Bluetooth while sleeping
Commercial alternatives:
- SoundSource ($49) — Full-featured audio control
- Sound Control ($30) — Per-app volume control
Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License — See LICENSE for details.
- Built with guidance from Apple's Core Audio Documentation
- Inspired by the long-suffering macOS users who have dealt with this bug for 15+ years