External Drives STILL ejecting during sleep in Ventura

Just updated to Ventura on a Mac Studio and I noticed that I still have the issue of my external HD disconnecting when the computer goes to sleep. I know this because I get the “disk not ejected properly” message when I wake the computer.


I suppose my question is this, are we EVER going to get a fix to this long-standing problem? This has been a bug I have dealt with on multiple macs, multiple external drives, and every version of MacOS for at least the last decade. It seems like something Apple should be able to fix, and yet, every time I upgrade to the latest OS I have the smallest hope that this issue might have finally been resolved. Every time I am disappointed to see that it persists. I’m far from the only person with this issue, and it is not a specific machine or OS causing the issue, it is every mac I’ve ever had and every version of MacOS.


Please, DO NOT suggest an “SMC reset”, “failing HD cables”, “reinstalling MacOS” or any of the other useless recommendations that serve no purpose other than to send people on a quixotic and time-consuming quest. This is a well known, well-documented , longstanding bug. This is clearly a problem that Apple needs to address and I’m finally annoyed enough to post about it after yet another year of the latest OS failing to address it.


The Mac Studio wasn’t cheap, and part of the expectation a person has around what is supposed to be a powerful, desktop workstation would obviously be that— given its intention as a professional workstation— that it isn’t ejecting external drives just because it needs a nap. Before you ask, yes, the behavior continues even if you turn off “put hard drives to sleep when possible” in the energy saving preferences. The only solution is a third party app like Jettison or to set your energy savings so that the computer never sleeps.


I just want to know if Apple has ever addressed this in any official capacity and if a fix is ever coming for this? The fact that there’s a market for third party apps that have to exist to try and mitigate this long-standing bug should be kind of embarrassing. I don’t get it, you can create your own processors that exceeded everybody’s expectations while running cool to the touch but you can’t get harddrives to stop ejecting? That seems odd. Does Apple plan on addressing this? Have they ever said anything about this at all? If anybody knows, I’d appreciate it.

Mac Studio, macOS 13.0

Posted on Oct 27, 2022 12:35 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 17, 2023 11:05 AM

I've posted here a number of times, with both questions and potential solutions, but until now nothing I've tried has worked, until... drum role; I've finally solved mine without any changes to default macOS settings. My eject drives problem has been with me from Mountain Lion up to and including High Sierra. Here is what has worked for me and why I believe it can be replicated.


First, have y'all noticed that Apple has never, and I mean never sold an Apple-branded USB hub? They now sell several third-party hubs but attach a disclaimer that all warranty or trouble claims must be submitted to the makers of those hubs. Translation in plain English; they know they have a problem with USB and the fix in either the firmware or the OS is not worth the dime to corporate Apple, especially since they have a story they can lay on you if you have a USB problem, to wit: SMC and/or NVRAM reset.


The problem I believe is a race condition between arrival of a wake up signal and the distribution and initialization of 5v dc over USB. It appears random because it is, because it cannot be duplicated: there is no way to resolve this to properly initialize 5v dc over USB without a significant engineering investment, and since Apple does not own USB, the way they do Firewire and Thunderbolt, why bother?


My problem was having two external drive enclosures on a 7-port USB hub. The hub was connected to a direct port on the machine. When the eject problem occurred, both of these drives always ejected, not just one but both, always both (actually 4, since both drives have 2 partitions.) Meanwhile, a RAID enclosure with its own power supply also connected to USB, but on the other direct USB port on my MBP, never ejected. I discussed this problem with technical support at both the hub and enclosure manufacturers and got conflicting advice. One said never put more than one enclosure on any hub, the other said never put even one enclosure on any hub even though they sell a 5v dc adapter for their enclosure. Their message; attach their enclosure with its own 5v dc source directly to the machine. Reading between the lines; this is subtle finger pointing, certainly implying the problem is Apple's. So I ran my own experiments.


First, I moved one of those drive enclosures to an open direct Firewire port. Voilà, this drive now never ejects while the one still on the hub did, at least once every 2 or 3 days. Remember, for me macOS has only default settings and sleep, if done correctly, is welcome. This is the only fair way to test macOS since it is valuable to permit drives to sleep on a system that is always on.


Next, I added a dedicated 5v dc power adapter to the drive enclosure. The hub itself has its own dedicated supply. Result, now neither of my two external drives eject. Going into my third week without a reboot and with no spurious ejects.


Conclusion: Apple has a latent bug in the hardware/firmware/software implementation of 5v over USB. Don't expect a solution anytime soon from Apple since we know the problem is present in all versions of macOS from at least Mountain Lion to Ventura, even in non-Intel machines given the comments on this site.



Similar questions

127 replies

Jan 31, 2023 12:19 PM in response to KJH1986

I'm curious: did you buy a Magic Track-pad with your Studio? I've written several posts to your thread re my experience with waking my MBP by touching and swiping its track-pad. I am now convinced that my erratic and unfocused banging away on the track-pad is what was causing my external drives to be ejected. I'm not a track-pad gestures expert {not IMHO one of Apple's better implementations, almost as stupid as thumb-typing) so I rely on a mouse, but that pad is so conveniently located that I had been, until a week ago, using it to wake up a sleeping Mac (not a sleeping bee, but close :-) .). I now use the space-bar, one press and like magic, macOS awakes and all my seven drives are still mounted. I have tried all the many technical solutions advanced by Apple or the Apple community, and none, and I mean absolutely none worked. Also, a very long telephone session with Apple support in which one of their minions walked me through exactly the same steps and procedures I performed by myself. I can read and follow written instructions as well as the next CS type with an MS, so I learned absolutely nothing by letting that dude lead me through the "SMC reset, etc" evolutions. And since none of those special sleep settings ever made any difference, I ignore them and set computer sleep and display sleep to 15 mins, and boxes checked to put disks and network to sleep, which I think are the defaults for 10.13.6. Interestingly, I use Carbon Copy Cloner for backup, and of course, it has to wake the machine at 2, 3 and 4 A.M. to perform all of my nightly backups, and it has never ejected a drive in error. Clearly, the CCC code knows how to wake the OS and unmount and mount drives without breaking anything. Does Apple, really, and is their track-pad code really bug free?


Please tell all of us who are very interested in this issue exactly how you wake your machine? What keys or input devices do you press or activate? Curious minds would like to know.

Mar 9, 2023 2:12 PM in response to barbrab

My last re this thread was 2/17, and I thought I had a solution, but alas, two of my drive partitions on a single drive ejected about 10 days into that experiment. Simply adding a dedicated 5v dc supply to external enclosure attached to a 7-port Pluggable USB 3.0 hub with its own dc supply failed, just as all previous attempts had. However, I have one last configuration change that seems to be holding. My setup includes an HP LP2465 monitor. This monitor includes a 4-port USB 2.0 hub (1 upstream, 4 downstream) and of course, its own dedicated power supply. And worthy of note, my MBP is a mid-2012 MacBook Pro 9,2. Why is this noteworthy? That is the first model of MBP that implemented USB 3.0 ports. All MBPs prior to that were USB 2.0.


I connected the monitor's upstream port direct to the MBP and moved the sensitive drive enclosure (a USB 3.0 device backward compatible to USB 2.0, now with its own PS) to one of the downstream ports. I also moved the 7-port hub to another port on the monitor. That hub now has non-drive devices only. So far, 16 days with no ejects. That is the longest continuous period I can recall of no spurious ejects. The monitor goes to sleep as does the MBP, more than a dozen times/day, but now I refrain from powering it down. My theory now is that not all hubs are the same, regardless of assertions to compliance certification notwithstanding, and USB 2.0 to USB 3.0 is a non-trivial engineering exercise. I still believe Apple has a latent, un-diagnosed race condition in all versions of macOS at least from Mountain Lion to the present but perhaps only in its USB 3.0 implementation. Apple broke it going to 3.0 from 2.0. I never had this problem with my predecessor Apple machine (USB 2.0 only) and my LAN was just as hardware/device intensive as now. Race conditions are the most difficult bugs to track down. I doubt fewer than .001 % of SW/HW engineers have the skill to debug a race issue which would probably require a physical hardware debugger. That just ain't gonna happen from 'dear leader' Apple. Too expensive! I'd be interested in hearing from others who have the means to further explore this USB 3.0/2.0 conundrum, since Apple won't.

Jan 8, 2024 7:34 PM in response to KJH1986

I have tried multiple Hard Drive Enclosures trying to resolve this, and I found one last Sept that seems to have stabilized this eject issue with me: https://a.co/d/5rFobHY


At the same time I also updated my drive to a Western Digital 18TB WD Purple Pro: https://a.co/d/chxrz9i So, I'm not positive which one helped the most (pretty sure it's the enclosure), but I only get random ejects every few weeks now.


I also minimized what USB accessories I plug in, ever since I discovered one of my USB hubs seemed to make the problem worse. I hope this helps!

Mar 2, 2024 8:35 AM in response to Kayemtee

I found this on the OWC site. I suppose it's possible I have too many things connected...

https://software.owc.com/knowledge-base/disk-eject-errors/


Ventura/Sonoma: preventing sleep is a bit more complicated

  1. In System Settings, click on Lock Screen. then set Display Sleep to never when plugged in. Then under “Displays” / Advanced, check “Prevent automatic sleeping:. In Energy Saver, uncheck, “Put hard disks to sleep when possible”

Most users never see this problem. It is a flaw in the design of Thunderbolt and can be difficult to troubleshoot. 

The more devices you have connected to your computer, the more likely this issue will occur. Even a Thunderbolt monitor can trigger disk ejects in some cases. 

Note: Disk ejects like this are very rare with USB. If you have a USB enclosure that keeps ejecting, it is a cable issue, or a failing enclosure.

Apr 19, 2024 9:35 PM in response to KJH1986

I found an answer that worked quite well for me. I had been plagued with this issue for years. For me, the fix was twofold... The first thing I did that started to keep my drive mounted for longer periods of time was to disconnect all my USB hubs. But it still had occasional issues. Then, I started trying different hard drive enclosures. Some worked better than others but, then I found a great one that was very stable, and inexpensive. I put it into service in September 2023 and cannot remember the last time my drive did not eject properly. This is that enclosure: https://a.co/d/2zgoNXK PS: The only thing I have checked in Energy Saver is "Prevent Mac from automatically sleeping when display is off".

Oct 31, 2022 9:08 PM in response to Dogcow-Moof

Currently I'm using Jettison so that my drives are safely ejected before sleep and storing my encryption keys for those drives in my keychain so that they can be automatically remounted when the computer wakes up. Not the most elegant solution but other than disabling sleep it's the only work around until this is fixed.


Given the potential for data corruption with a problem like this, it really is unacceptable that this has been an ongoing issue for so many users for as long as it has been. These are machines advertised as professional grade, for professional workflows. The idea that the OS itself may be responsible for corrupting a user's data or Time Machine backups seems like a pretty serious oversight. In the grand scheme of bugs and their respective levels of seriousness, something with this much potential for data loss persisting the way it has really feels like Apple fumbling the ball.

Dec 11, 2022 7:50 PM in response to Dogcow-Moof

I appreciate your input but I think you might misunderstand the issue. A few thoughts— 


First thing is that, as you said, this is not the OS safely ejecting the drive to go to sleep. It is “Disk Not Ejected Properly”. This means the OS reduced power to a drive to such an extent that it couldn’t even remain connected in a hibernation state. This is likely to cause data corruption, not prevent it. If this really was a dichotomy between reduced battery life and damage to user data, I’d strongly argue that Apple chose wrong. If the options you laid out were the only choices, then Apple implementing something akin to what Jettison does to unmount/remount the drives would obviously be preferable to risking damage to the user's data. 


Fortunately we don’t have to make that choice because it’s not actually true that the machine needs to eject the drives in order to sleep. It just needs to stop writing to them before suddenly entering into a low power state (sleep) in order to prevent potential data corruption. This doesn’t require the full ejection of a drive, the drive merely needs to be made inaccessible to any background processes that may try to write to the drive while it is in a low power “standby” state because the drive isn’t receiving enough constant power to write to or read from reliably and safely. It may seem like splitting hairs, but there’s a difference between software hibernating or “soft dismounting” a disk in the background and truly ejecting it, and it’s basically the difference between a solution where the driver for handling the disk is terminated by the OS and one where the OS basically just directs itself to ignore the drive, which allows that disk to enter whatever power management/hibernation pattern the drive’s internal firmware dictates whenever it is no longer being written to/read from. This is a bit of a simplification, but the advantage of the latter approach is that you can very quickly “remount” the drive because the “mounting” is, in effect,  just the OS sending instructions to the drive again to bring it out of a hibernation state. When done properly, this happens so quickly that the user would not even notice anything. You wouldn’t even have to re-input the credentials for an encrypted drive because it was never truly ejected and doesn’t need to be truly re-mounted. 

Dec 11, 2022 7:54 PM in response to Dogcow-Moof

All of this is to say that (as a long-time Mac user) this is how Macs used to work back in the, “Big Cat” days. I simply did not have my desktop computer ejecting all of my drives when it went to sleep. Keep in mind that the way power is managed on a laptop vs a desktop should not be the same. Desktop users often have many permanently attached peripherals and drives because they have a stationary setup dedicated to a particular workflow. Even if there was an excuse for this behavior on a MacBook that isn’t currently connected to a power supply, I’m using a Mac Studio. One of the other computers I dealt with this on was an i7 iMac. I don’t remember exactly when this started happening, but this is a problem with the MacOS software that Apple introduced at some point. I know this because my 2009 iMac’s hardware didn’t change, and it went from not having this issue to having it at some point in the OS release cycle. This problem didn’t exist back when all my drives were more power hungry spinning drives and somehow despite the power efficiency of SSDs, better Macs now can’t maintain the tiny amount of power to keep an SSD in stand-by mode? It doesn’t make sense. My guess is it has something to do with some power menagement tweaking Apple did to hit some energy efficiency metric for improved battery life and they accidentally created an annoying limitation for desktop computers that shouldn’t have it.


It’s also important to point out that this is not how other operating systems handle external drives. This is some kind of bug or misguided power efficiency tweak and it’s an Apple problem, not a general computer problem. The irony is that whatever little gain in power efficiency that decision resulted in has likely been totally negated now that so many of us are disabling sleep altogether to avoid this problem. Apple probably doesn’t care because it means they can still use the most impressive power efficiency claims in their marketing regardless of how many of their user’s now need to disable the vanilla settings in order to use their computers without risking the corruption of their external data. In attempting to strike the right balance between efficiency and capability, Apple introduced an unnecessary issue that is frankly unacceptable for the workflows of many of the pro users they market these high-performance machines to. I cannot have massive resource libraries corrupted by my computer because the drive was attached to the computer when it went to sleep. These machines are marketed to creative professionals almost more so than anybody else and Apple appears to have ignored the actual ways this group of customers use their machines.

Jan 13, 2023 7:33 AM in response to functionista

SOLUTION‽


Wanted to update here. Since doing this a few days ago, I have not had the issue of the external drives being ejected.


This seems to indicate that the issue is to do with Sleep. Preventing Sleep prevents drives from automatically being ejected.


While I understand this is not fixing the real issue, it’s working for me, and it might work for some of you, too.

Jan 30, 2023 11:45 AM in response to KJH1986

First thing is that, as you said, this is not the OS safely ejecting the drive to go to sleep. It is “Disk Not Ejected Properly”. This means the OS reduced power to a drive to such an extent that it couldn’t even remain connected in a hibernation state.

I set my Mac's to never sleep the drives. When the Mac goes to sleep, the drives are not improperly ejected.

It seems more logical that the drive's are getting an, "I'm going to sleep, you should, too," but it appears they do not go to sleep. Mine certainly get enough power when the Mac sleeps, so I don't understand your logic.


macOS mounts all drives with write cache enabled. If they arbitrarily shut themselves off, then they could cause themselves problems. I can't figure out what the drive controller's are thinking when the Mac tells them it is closing down operations, but they don't seem to think so well.

Apr 4, 2023 2:44 PM in response to KJH1986

So I am now on Ventura 13.3 MBP M1 Max and still having the hard drives ejecting issue randomly on both bus powered USB C 3.2 ssd's and Spinning disk Raided OWC drives on USB C 3.2. I know from my support ticket with Western Digital (Sandisk SSD's) that the M1 has only a USB C 3.1 controller, not 3.2, so when you hook any USB C 3.2 drive, you don't get the full speeds of the disk and perhaps that may be contributing to the issue. I have not had any issues with Thunderbolt drives so far. I have been formatting my drives APFS per an Apple tech that told me I should be using that instead of Mac OS Extended Journaled. Today I tried the former type of format (Mac OS Extended) today on hard drives I have not used before (Samsung Portable SSD T7 Shield) and no issues at all. But I know this is a random issue so we will see. I do know once a drive has had this issue, it always will. Even on other computers.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

External Drives STILL ejecting during sleep in Ventura

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.