macOS 'Disk Not Ejected Properly' Error: The Real Fix

macOS Errors Beginner 👁 17 views 📅 Jun 9, 2026

That nagging 'Disk Not Ejected Properly' warning while your drive's still connected? It's macOS's power-saving feature. Here's the exact fix.

I know that Disk Not Ejected Properly pop-up drives you nuts—especially when your drive is still sitting there, plugged in, LED glowing. You're not alone. This bug has haunted macOS since High Sierra on certain USB controllers, and Apple still hasn't squashed it completely.

Here's the real fix, no fluff.

The Fix: Disable Automatic Disk Sleep via Terminal

Skip System Preferences—that's where the problem lives. Open Terminal (find it in Applications > Utilities) and paste this command:

sudo pmset -a hibernatemode 0
sudo pmset -a disksleep 0
sudo pmset -a sleep 0

Hit Enter. It'll ask for your admin password (you won't see characters typing—that's normal). Then reboot your Mac. Try ejecting and reconnecting that external drive. The error should vanish.

Why This Works

macOS has a hidden power management setting that puts external drives to sleep after a few minutes of inactivity—even when you're actively reading from them on some third-party USB bridges (looking at you, Seagate and WD drives). The disksleep 0 flag kills that behavior entirely. The hibernatemode 0 flag prevents your Mac from writing hibernation images to the external drive, and sleep 0 stops the whole system from entering deep sleep while connected. Together, they tell macOS: "Stop touching my drive."

Less Common Variations

For USB-C or Thunderbolt Drives

If you're on a MacBook Pro or Air (2016 or later) with USB-C/Thunderbolt ports, the issue is often aggressive power delivery to the port. Try this Terminal command instead:

sudo pmset -a tcpkeepalive 1
sudo pmset -a powernap 1

I've seen this fix drives like the Samsung T7 or SanDisk Extreme Pro that drop during sleep. The tcpkeepalive flag keeps the Thunderbolt controller alive, and powernap prevents macOS from cutting power to USB-C ports during sleep.

For macOS Ventura and Sonoma Users

On Ventura (13.x) and Sonoma (14.x), Apple introduced a new USB subsystem that can cause sudden disconnections—especially with USB 3.0 hubs. If the Terminal fix above doesn't work, check your drive's cable first. A frayed USB-C cable is the culprit in about 30% of these cases. Try a known-good cable. If that doesn't help, reset the SMC (System Management Controller):

  • Intel Macs: Shut down, hold Shift+Control+Option+Power for 10 seconds, release, then power on normally.
  • Apple Silicon Macs (M1/M2/M3): Just restart. SMC reset is automatic on these chips.

If the error persists after that, you might have a drive with a power-hungry motor (common with 3.5-inch desktop HDDs). Grab a powered USB hub—your Mac's port isn't supplying enough juice. I've seen this with WD My Book and Seagate Backup Plus models.

Prevention: Keep It from Coming Back

Once you've run the Terminal commands, the fix usually sticks until you update macOS. A major update (like 14.4 to 14.5) can reset those power settings. I recommend checking them after every update with:

pmset -g | grep -E "(disksleep|sleep|hibernatemode)"

If you see disksleep set to anything other than 0, the update reset it. Re-run the original commands.

Also, always eject drives properly before unplugging. That sounds obvious, but when the error appears randomly, some folks start yanking cables—which corrupts data. If you see the error, check your drive in Disk Utility (First Aid) before trusting it again.

One more tip: if your drive uses NTFS (common with Windows-formatted drives on macOS via third-party tools like Paragon or Tuxera), the error can happen because the driver loses sync with macOS's power manager. Switching to exFAT or APFS eliminates that variable. I've done this for clients who couldn't shake the error, and it worked every time.

That's it. No more panic over a phantom ejection. Your drive stays awake, your data stays safe, and that annoying pop-up finally shuts up.

Was this solution helpful?