Experiencing a MacBook Pro external hard drive that keeps ejecting itself randomly or unmounting after sleep is a common data safety risk. In 2026, with the high-speed data requirements of Apple Silicon (M1, M2, M3, M4) Macs, the operating system uses an aggressive power management profile that often kills the connection to external disks to save battery.
🔬 macOS Storage Diagnostic Hub
| 🔴 Identify Ejection Type | 🔵 Hub Solution Path |
|---|---|
|
Ejects on Sleep
Drive unmounts when lid is closed.
|
Terminal Logic Reset |
|
Random Disconnects
Drive vanishes while in active use.
|
USB Power Diagnostic |
At asavvyweb, our technical team led by Vangari Divya (M.Tech) has verified that this issue is rarely caused by a broken drive. Instead, it is typically a Logic Board handshake failure or a disksleep timer conflict in the macOS kernel. Follow our verified laboratory fixes to stop your drive from disconnecting automatically.
If you are facing an issue with MacBook pro external hard drive keeps ejecting itself randomly gets unmounted after some time automatically there is a simple fix and this happens for few reasons with the settings in MacBook pro and there is no issue with MacBook pro or something wrong with the external hard drive. Its frustrating when your external hard drive/disk keeps ejecting or keeps disconnecting automatically after sometime.
Method 1: The Terminal Power Override (disksleep Logic)
This is the most powerful permanent fix for M-Series and Intel Macs. It forces macOS to stop putting the external disk to sleep, which is the #1 cause of “Disk Not Ejected Properly” warnings.
- Press Command + Space, type Terminal, and hit Enter.
- Type the following command: sudo pmset -g
- Enter your admin password.
- Look for the value next to disksleep. If it is 1 or 5, the Mac is killing the drive connection after a few minutes of inactivity.
- To fix this, type: sudo pmset -a disksleep 0
- Why this works: Setting disksleep to 0 tells the macOS Power Management Unit to keep the data lane open indefinitely, preventing random ejections.
Method 2: Troubleshooting USB Hub Power Surges
If your drive ejects specifically when you plug in a second device (like a mouse or phone), your USB-C hub is failing to manage voltage.
- Disconnect all accessories from your hub.
- Connect your external hard drive directly to the MacBook Pro port without using an adapter if possible.
- If the ejection stops, your hub does not have a high enough Power Delivery (PD) rating.
- Lab Tip: Always use a hub with an external power input for high-capacity 4TB+ mechanical hard drives.
Method 3: Disable “Put Hard Disks to Sleep” in System Settings
macOS has a visual toggle that acts as a basic version of the Terminal fix.
- Go to the Apple Menu and select System Settings.
- Navigate to Displays, then click on the Advanced button.
- Toggle the switch ON for Put hard disks to sleep when possible to OFF.
- On newer macOS builds, this setting is also found under Battery or Energy Saver.
Method 4: Resetting the DiskArbitrationd Daemon
Sometimes the background service that manages mounting (diskarbitrationd) hangs, causing the OS to “forget” the drive is there.
- Open Terminal.
- Type: sudo killall diskarbitrationd
- The service will automatically restart. Re-plug your drive to establish a fresh logic handshake.
Method 5: Checking for Malware and Background Indexing
In some cases, Spotlight indexing or a malicious background app can try to scan the drive incorrectly, causing a logic board “Panic” that ejects the disk for safety.
- Go to System Settings > Siri & Search > Spotlight Privacy.
- Drag your external drive into the list to stop the Mac from indexing it.
Expert Diagnostic Summary
Primary Cause: Power Management (disksleep) timer.
Success Rate: 85% via the Terminal override.
Hardware Check: If the drive still ejects after Method 1, your cable likely has a micro-fracture. Replace the cable with a certified 40Gbps Thunderbolt 4 cable for 2026 systems.
Your external hard drive keeps unmounting from mac laptop is due to the power issues only.
If in your mackbook pro settings are set to sleep mode after 10 mins then hard drive goes to sleep mode and gets unmounted.
Yes, external hard drive keeps ejecting automatically unmounted when it gets into sleep mode.
