Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
What can cause external Drive or external SSD drive to suddenly eject? It just happened to me. Never happened since I got this new iMac M3 in December. 24/2TB, 8/10, 4port. No TM migration new clean setup since the beginning. Wish it showed an error log or something.
 

Bigwaff

Contributor
Sep 20, 2013
2,736
1,830
Eject notifications happening when iMac wake from sleep? Known irritating problem dependent on USB enclosure and/or drive firmware. You can try make settings such HDD never sleep but will make iMac never sleep too. Eject does not happen with Thunderbolt, seems some USB external.
 
  • Like
Reactions: kagharaht

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
Eject notifications happening when iMac wake from sleep? Known irritating problem dependent on USB enclosure and/or drive firmware. You can try make settings such HDD never sleep but will make iMac never sleep too. Eject does not happen with Thunderbolt, seems some USB external.
Oh my iMac never sleeps. On 24/7. It is an External USB with an SSD inside it. I'm using it for Content Caching only. If it keeps happening I guess I'll turn off content caching and remove it. DriveDX shows every metric 100% on it. I bet your right its a Sonoma known issue and it finally hit me.
 

HobeSoundDarryl

macrumors G5
There are external drive bugs in macOS and have been since at least Big Sur. Some drives work and some don't. Some from any one brand work and some don't. There are MANY threads about this. Do searches for macOS unexpected ejection and dig in.

Long story short: you have to just keep trying different ones until you find one that will work... OR keep waiting on Apple to get around to fixing this part of macOS (but it has been YEARS now).

Apple fans will likely pop in with the usual mix of blame the enclosure, blame you, blame your cable, blame your settings, etc (anything & all things other than Apple) but if you dig into this in the many threads, you'll quickly realize it's in macOS and only Apple can fix it by debugging macOS. The ultimate evidence of this are those people who had perfectly stable externals BEFORE an upgrade to Big Sur or newer, then suddenly "unexpected ejections" and- because they needed the drive more than they needed the newer version- then downgraded again and the drive became perfectly stable again: same cable, same user, same drive, same setup, same Mac. What variable changed?

If you have an older, pre-Big Sur Mac, hook that drive to it and it will probably remain connected for as long as you leave it connected. Or hook it to any PC and it will be the same.

It is a very frustrating problem for those of us affected... which is not everyone, but only some of us with select drives. Some will chime in that it is sleep related, but I suspect sleep is only a contributing variable as my own testing will have select drives unexpectedly ejecting even while actively transferring files to/from them (so obviously no sleep involved). Take the same drive back to a Mac before Big Sur and it's stable as the internal drive. I suspect the sleep link is either: the passage of time while it sleeps triggers the ejection OR perhaps macOS power management being based on iOS keeps working down the power draw until it drops below some minimal threshold needed to persist the connection. My guess is the bug(s) is in power management algorithms vs. sleep.

I wish the U in USB meant what is is supposed to mean with modern Apple. And I miss "just works."
 

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
There are external drive bugs in macOS and have been since at least Big Sur. Some drives work and some don't. Some from any one brand work and some don't. There are MANY threads about this. Do searches for macOS unexpected ejection and dig in.

Long story short: you have to just keep trying different ones until you find one that will work... OR keep waiting on Apple to get around to fixing this part of macOS (but it has been YEARS now).

Apple fans will likely pop in with the usual mix of blame the enclosure, blame you, blame your cable, blame your settings, etc (anything & all things other than Apple) but if you dig into this in the many threads, you'll quickly realize it's in macOS and only Apple can fix it by debugging macOS. The ultimate evidence of this are those people who had perfectly stable externals BEFORE an upgrade to Big Sur or newer, then suddenly "unexpected ejections" and- because they needed the drive more than they needed the newer version- then downgraded again and the drive became perfectly stable again: same cable, same user, same drive, same setup, same Mac. What variable changed?

If you have an older, pre-Big Sur Mac, hook that drive to it and it will probably remain connected for as long as you leave it connected. Or hook it to any PC and it will be the same.

It is a very frustrating problem for those of us affected... which is not everyone, but only some of us with select drives. Some will chime in that it is sleep related, but I suspect sleep is only a contributing variable as my own testing will have select drives unexpectedly ejecting even while actively transferring files to/from them (so obviously no sleep involved). Take the same drive back to a Mac before Big Sur and it's stable as the internal drive. I suspect the sleep link is either: the passage of time while it sleeps triggers the ejection OR perhaps macOS power management being based on iOS keeps working down the power draw until it drops below some minimal threshold needed to persist the connection. My guess is the bug(s) is in power management algorithms vs. sleep.

I wish the U in USB meant what is is supposed to mean with modern Apple. And I miss "just works."
Wow thanks for that information. That kinda sucks. lol Yeah this drive has worked fine from previous OS. If it keeps doing it, I'll just turn off that content cache feature and just use the drive for archiving stuff.
 

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
It’s risky to use drives that unexpectedly eject. I have a great one temporarily retired for about 3 years now due to this same issue. I hope to bring it back into regular use someday.

And yes, connect it to my old Macs or my new PC and reliability resumes.
True about being risky. If it happens again I'll remove it and turn off Content Cache. It's strictly used for that feature and nothing else. It shouldn't harm the rest of the Mac OS system itself. I think. lol If it ejects, Content Cache just stops when it's unmounted. Again I won't use it if it kicks itself out again with Sonoma and turn off the feature.
 

HobeSoundDarryl

macrumors G5
Right, the risk is entirely in ejecting while writing to it… just like pulling the cable during a write. The rest of the system won’t be affected.

Hopefully, Apple will get around to debugging whatever was broken in Big Sur. It would be nice to not have to worry about this issue nearly as much anymore. I’d love to bring old reliable back into play with my newest Mac.
 
  • Like
Reactions: kagharaht

star-affinity

macrumors 68000
Nov 14, 2007
1,996
1,333
Just built myself a new drive (M.2 in a Thunderbolt 4 enclosure) and I'm affected by this issue. Pretty bad and I'm also worried I might corrupt data on it. I guess the only way is to not put the computer to sleep. A bit sad since I like the concept of energy efficiency and things turning off or drawing lower power while not in use.
 
Last edited:

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
Just built myself a new drive (M.2 in a Thunderbolt 4 enclosure) and I'm affected by thus issue. Pretty bad and I'm also worried I might corrupt data on it. I guess the only way is to not put the computer to sleep. A bit sad since I like the concept of energy efficiency and things turning off or drawing lower power while not in use.
Oh mine never sleeps. It happed while iMac was awake. I don't think it matters if its sleeping or awake, it just happens in Sonoma it seems.
 
  • Like
Reactions: HobeSoundDarryl

PaulD-UK

macrumors 6502a
Oct 23, 2009
906
507
I find connecting SSDs to a self powered Thunderbolt 3 dock (Intel Titan Ridge JHL7440) solves it for me.
The dock handles the USB protocol and supplies power better than the Mac.
 
Last edited:

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
Wow even after erase all contents and new setup SSD plugged directly on iMac still ejects suddenly.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,237
13,305
"Wow even after erase all contents and new setup SSD plugged directly on iMac still ejects suddenly."

Could be the drive.
Could be the enclosure (if you bought the drive and enclosure separately).
Could be the cable.
Could be a combination of factors.

If the cable is removable, I'd try replacing that first.
If that makes no difference, and the enclosure itself is replaceable, I'd try replacing THAT.

If the drive is disappearing ONLY during/after sleep, you might consider leaving the Mac AWAKE all the time, but "just idling". Try display sleep ONLY.

There is also what I call "the Semulov solution".
Download Semulov (it's free).
It's as easy to use as anything I've ever seen on the Mac.
When you're not using a drive, use Semulov to dismount it.
When you need to use the drive, use Semulov to mount it.

RATIONALE:
A drive "dismounted" by Semulov may "endure" computer sleep/wake cycles.
And Semulov will "wake it back up" when you NEED it.

I realize this solution won't work for time machine drives, which need to be connected and live all the time. But I don't use tm.
 

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
"Wow even after erase all contents and new setup SSD plugged directly on iMac still ejects suddenly."

Could be the drive.
Could be the enclosure (if you bought the drive and enclosure separately).
Could be the cable.
Could be a combination of factors.

If the cable is removable, I'd try replacing that first.
If that makes no difference, and the enclosure itself is replaceable, I'd try replacing THAT.

If the drive is disappearing ONLY during/after sleep, you might consider leaving the Mac AWAKE all the time, but "just idling". Try display sleep ONLY.

There is also what I call "the Semulov solution".
Download Semulov (it's free).
It's as easy to use as anything I've ever seen on the Mac.
When you're not using a drive, use Semulov to dismount it.
When you need to use the drive, use Semulov to mount it.

RATIONALE:
A drive "dismounted" by Semulov may "endure" computer sleep/wake cycles.
And Semulov will "wake it back up" when you NEED it.

I realize this solution won't work for time machine drives, which need to be connected and live all the time. But I don't use tm.
Could be Mac OS Sonoma being crappy with this feature? LOL The iMac is always on, never sleeps since I use it for Home Sharing with the family.

Well that's a lot of good tips. I'll start with he cable first since I have extra Apple branded cables.
 
  • Like
Reactions: owidhh

HobeSoundDarryl

macrumors G5
Just built myself a new drive (M.2 in a Thunderbolt 4 enclosure) and I'm affected by thus issue. Pretty bad and I'm also worried I might corrupt data on it. I guess the only way is to not put the computer to sleep.

Nope. While sleep is viewed as a popular catalyst, I think sleep only MIGHT play a role in it. I actually believe the sleep perception is driven by the TIME that passes vs. the actual sleep. I think this problem is tied to passage of time whether Mac is awake or asleep. With some of my enclosures, I have had it "unexpectedly eject" while transferring files to or from it. No way either end was asleep during a file transfer.

Oh mine never sleeps. It happed while iMac was awake. I don't think it matters if its sleeping or awake, it just happens

Correct. Some people claim using apps like Amphetamine to keep the hard drive perpetually awake resolved the issue for them but I still believe sleep only gets the blame for a different actual cause.

My hypothesis goes back to the roots of macOS which is iOS, which is focused on working energy drain down to minimums to maximize battery life. I think as it works it down if goes too low for some enclosures and they unexpectedly eject. I suspect anti-sleep apps might trick this process some of the time so that it doesn't work the energy sip down below the threshold.

Hypothesis #2 says that it is port management software in general. For example, there are several threads that basically talk about the ethernet port regularly "crashing" and seeming to "reboot." It doesn't take a lot of time but internet seems down while it reboots. What if the other ports also occasionally crash & reboot. That would create seemingly random "unexpected ejections."

in Sonoma it seems.

Nope, since at least Big Sur. There are many threads where enclosures were fine pre-Big Sur but then had this problem since Big Sur. In some cases, upgrades from pre-Big Sur to newer macOS showed this issue and owners downgraded again back to the pre-Big Sur macOS: enclosure was fine again. All other variables were the same.

I find connecting SSDs to a self powered Thunderbolt 3 dock (Intel Titan Ridge JHL7440) solves it for me.
The dock handles the USB protocol and supplies power better than the Mac.

Some people have reported this and there's logic that if some other tech is managing the power, perhaps the iOS power sipping algorithms wouldn't potentially contribute here. However this seems as hit or miss as trying different enclosures. Some seem to work, some don't. And if the port crashing hypothesis plays a role here (too?), power management would only be a portion of the catalyst.

Wow even after erase all contents and new setup SSD plugged directly on iMac still ejects suddenly.

Yes, many have assumed perhaps a full re-format need might be needed... myself included... to then find it would not resolve the problem.

What I can offer is that I've actually invested a LOT of time in this problem, digging lots of retired and new enclosures out of storage to see if I could deduce some workaround. I've tried multiple hubs powered & unpowered, multiple cables, etc... basically trying to find something to tangibly blame or resolve outside of macOS. Best I can deduce, this is a macOS issue and only Apple can fix it.

For those who want to hypothesize blame into cable, enclosure, firmware, drives, power supply, user error, etc, eject the drive and hook it to any PC or any Mac running macOS older than Big Sur and it will probably magically "just work"- no "keep awake" apps, no settings alternations, etc required. Then bring it back to the new Mac and it will probably "unexpected eject." If the new Mac is able to run on a pre-Big Sur macOS version, install macOS on a boot drive and boot with that drive and watch the problematic enclosure work with the very same Mac with all other variables "as is"... until you switch back to using macOS Big Sur or newer.

I'd LOVE this to be one someone could crack by changing settings, installing an app, etc. but I'm about 95%+ confident only Apple can fix this one and wish they would get on with it. I miss "just works" Apple. I miss the U in USB meaning what it is supposed to mean. I miss easy access to a BIG RAID enclosure that still works just fine on pre-Big Sur Mac or any PC... just not on the "cutting edge Mac Silicon" for more than about 3 hours max.
 
Last edited:

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
What I can offer is that I've actually invested a LOT of time in this problem, digging lots of retired and new enclosures out of storage to see if I could deduce some workaround. I've tried multiple hubs powered & unpowered, multiple cables, etc... basically trying to find something to tangibly blame or resolve outside of macOS. Best I can deduce, this is a macOS issue and only Apple can fix it.
I agree. Just annoying as Hell. Well I got 2 other Apple Branded USB-C cables I bought directly on Apple Store, so I might as well try them and see what happens. Might as well.
 
Last edited:
  • Like
Reactions: HobeSoundDarryl

DedLvlDesign

macrumors newbie
Feb 9, 2024
5
1
I've have this issue for years and I think I may have just stumbled on a solution that doesn't require preventing the mac from sleeping or using any third party applications. I was using an application called Jettison for years to eject my drives before sleep but unfortunately it hasn't been working reliably for some time now. I'm not sure If this is something the dev can fix on their end or if something changed on Apple's end to cause this issue. I was forced to use an app called Amphetamine to prevent the mac from going to sleep. Not an elegant solution but it seemed like the only choice for a while.

So after a recent update to Jettison came out and didn't solve the issue I was having, I went to the dev's website to see if I could find more information. On the FAQ page I discovered that the dev provides a script for disabling some of the sleep/wake power management settings that can cause conflicts with their app. You can access these settings yourself using the terminal command "pmset -g live" to see your current settings. I decided to use the dev's script to turn off the recommended settings and, while this didn't solve the particular issue I was having with the their app, it did appear to resolve the "Disk Not Ejected Properly" issue I had been using Jettison to avoid in the first place. Now (after disabling all of Apple's advanced power management settings) I haven't had to use Amphetamine to prevent the mac from sleeping or use Jettison to safely eject my disks. As of the last few days, I've just been letting my mac go to sleep like normal and I haven't had any issues with my disks ejecting. These are my current settings, accessible through the terminal command pmset -g live


Screenshot 2.png



I think Apple's power management settings are to blame despite them insisting it's everything from your drive's firmware, to your cables, to your usb hub. I don't even understand how Apple can blame vendor firmware at all, since these power management settings appear to override how power would be managed by the firmware of a third-party device anyway. It just seems like a pointless suggestion to look to an external drive's firmware as a causal factor if you aren't actually giving that firmware control over the set of behaviors causing the issue. It's like Apple has taken direct control of power management away from your drives and yet has the audacity to suggest that the problem could lay in the firmware they're superseding with their own settings anyway, settings that users won't even know are there and don't have access to via a GUI. It's only been a few days but so far I haven't had any random disk ejections when entering sleep. I also haven't had any random wake-ups. It's like allowing each drive's firmware (the firmware made for it) handle these things rather than using these additional control layers Apple lays over top of them has had the immediate effect of these devices behaving more reliably, as the manufacturer intended.


I'm going to continue to monitor this but so far this seems like Apple's screw up. It looks like they've been blaming every 3rd-party hardware company for problems that they are the source of. If I had to guess I'd say that this all started because Apple figured out they could squeeze better battery life out of their laptops by taking more direct control over certain power management processes away from external firmware and having more of it managed by the OS.

Here's a link to Jettison script (credit goes to St. Clair Software) which disables all of the "smart" sleep/wake/power stuff and seems to restore the old-fashioned "Sleep" mode back to how it used to work. The effect of this seems to be no more random disk ejection, but we'll see. I hope this is actually the solution to this problem for most of us.


(scroll to part about "disc not ejected properly" errors to find the script)
 
  • Like
Reactions: unsertwegen

svenmany

macrumors demi-god
Jun 19, 2011
2,274
1,520
While sleep is viewed as a popular catalyst, I think sleep only MIGHT play a role in it. I actually believe the sleep perception is driven by the TIME that passes vs. the actual sleep. I think this problem is tied to passage of time whether Mac is awake or asleep. With some of my enclosures, I have had it "unexpectedly eject" while transferring files to or from it. No way either end was asleep during a file transfer.

I do agree with this. However, for my current computer and drives the logs always showed the disconnects right after waking from sleep. I've had no problems since turning off sleep.

It does depend on the hardware. I am using a CalDigit TS4. CalDigit replaced it to try to help me; the problem got worse. They allowed me to send the replacement back and keep the original.
 

HobeSoundDarryl

macrumors G5
I do agree with this. However, for my current computer and drives the logs always showed the disconnects right after waking from sleep. I've had no problems since turning off sleep.

The trick here is that if it's not sleep, there is no log update until it wakes from sleep. For example, when do you know about new email that came in through the sleep period? After Mac wakes from sleep: new notifications of email pop up on screen. Some log updates are on wake. I'm not so sure a sleeping Mac will keep track of when an enclosure was unexpectedly ejected. That might be an interesting test to run: manually UE one while Mac is asleep and then check the logs when it wakes to see if the time matches.

You've been quite lucky with your enclosure that only turning off sleep ended the "unexpected ejections." That's not the norm. I still mostly suspect that sleep gets the blame because of the passage of time while Mac is asleep vs. the actual sleep itself. I still mostly suspect it is power management working down below some minimal threshold "to conserve battery" (which is sometimes not even present, like in my Mac Studio) and/or ports may "crash & reboot" from time to time... or maybe both.

It does depend on the hardware. I am using a CalDigit TS4. CalDigit replaced it to try to help me; the problem got worse. They allowed me to send the replacement back and keep the original.

Yes, part of why it is so hard to zero in on a single cause is that all kinds of different hardware combinations yield varying results. It is NOT a brand thing or a cheap vs. expensive thing or a new vs old thing, etc. It SEEMS to affect HDDs more than SSDs but the latter is not immune. It seems that RAID setups are most impacted. It doesn't seem to matter which port is used.

As I offered, I've pounded through what I think are all possible combinations- including bringing some ancient drives out of retirement to test a lot of different enclosures- and have zeroed in on macOS (since Big Sur) as the issue. Some ancient drives with ancient firmware seemed to work fine vs. some very new ones with much newer firmware having issues. My enclosure that can't stay connected is pretty new and very important to much of the work I do. It is perfectly fine when connected to an old Mac or a PC with the very same cable (and thus all variables are the same). Hook it to any port (and I've tried ALL of them) on Mac Studio and it won't remain connected for more than about 3 hours MAX. I also tried 3 hubs as "middlemen" with no luck (powered and unpowered). Another product from the very same brand is stable for a couple of years now. I would bet a LOT of money if I could install macOS BEFORE Big Sur on Mac Studio, the drive would magically be just fine too.

Good luck to all who try to run this down yourselves. I don't think user tweaks can lead to a "universal" solution for this Universal Serial Bus-connection issue.
 
Last edited:

svenmany

macrumors demi-god
Jun 19, 2011
2,274
1,520
The trick here is that if it's not sleep, there is no log update until it wakes from sleep. For example, when do you know about new email that came in through the sleep period? After Mac wakes from sleep: new notifications of email pop up on screen. Some log updates are on wake. I'm not so sure a sleeping Mac will keep track of when an enclosure was unexpectedly ejected. That might be an interesting test to run: manually UE one while Mac is asleep and then check the logs when it wakes to see if the time matches.

I guess something could be going wrong while the computer is sleeping. Certainly such an event wouldn't be logged. But for me I think the problem happened when the computer was awake. As such, the event corresponding to the issue would have been logged at that moment.

When I used to have my computer sleep at night, it would wake up regularly for various tasks. So during that long night of my computer not being observed, there was a lot of time when my computer was awake. The disconnects always happened a few moments after waking from sleep.

Further, there was a setting (I forget which but it related to WiFi or Bluetooth) that caused my computer to wake every 2 minutes. With that setting enabled, I was almost guaranteed to find the disk error popups in the morning. When I disabled that setting and the computer only woke infrequently, it was hit or miss whether the disk errors would be seen in the morning.

When reviewing the logs the next day, they usually showed the computer looking for the disks right after waking and a few moments later the USB finished powering up (or at least that's how I interpreted the log entries).

From all this I drew the conclusion that it was the act of waking the computer and powering up the USB that was introducing the risks of disconnects. My issue seems like a timing issue, so it's reasonable that different connected hardware would add enough variability to change that timing.
 
  • Like
Reactions: HobeSoundDarryl

DedLvlDesign

macrumors newbie
Feb 9, 2024
5
1
As of the last few days, I've just been letting my mac go to sleep like normal and I haven't had any issues with my disks ejecting.

Well, it was good while it lasted but yesterday the problem returned. I guess I'm just going back to never having my mac go to sleep and just having the display turn off. Maybe one day this will be fixed but I doubt it. Apple hasn't cared about this for years and if the main culprit is something happening during sleep/wake I doubt we will be getting a fix at all. If Apple saw traditional "sleep" behavior as approching obsolecence on modern computers and they were moving everything towards an efficient "always on" state that means they would have even less incentive to fix this now then they did in the past. The death of "sleep" kills two birds with one stone for them and takes the bulk of the disk ejection problem or any other sleep associated bugs with it on it's way out.
 

saldin

macrumors regular
Jul 30, 2012
143
25
I've had this kind of issue happen to me since I got a Mac Mini M2 to replace a MacBook Pro 2011.

In my case, I have an external drive partitioned with 3 APFS volumes and I sometimes get the "disk was not ejected properly" on only one of the volumes. The other 2 are not dismounted and it's baffling, because I always thought it would be a USB device, port, or cabling problem...
 
  • Wow
Reactions: steve123

kagharaht

macrumors 68000
Original poster
Oct 7, 2007
1,707
1,400
I have my iMac M3 to never sleep. It has ejected the external SSD a few times already.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,274
1,520
I've had this kind of issue happen to me since I got a Mac Mini M2 to replace a MacBook Pro 2011.

In my case, I have an external drive partitioned with 3 APFS volumes and I sometimes get the "disk was not ejected properly" on only one of the volumes. The other 2 are not dismounted and it's baffling, because I always thought it would be a USB device, port, or cabling problem...

I suspect that any volume being accessed by the OS when there's an issue will eject and other volumes will not.
 

HDFan

Contributor
Jun 30, 2007
7,290
3,339
There are external drive bugs in macOS and have been since at least Big Sur. Some drives work and some don't. Some from any one brand work and some don't. There are MANY threads about this. Do searches for macOS unexpected ejection and dig in.

Long story short: you have to just keep trying different ones until you find one that will work... OR keep waiting on Apple to get around to fixing this part of macOS (but it has been YEARS now).

If you have done all of the standard troubleshooting then you've fallen into the same disconnect pit which MacOS has had for as long as I can remember. Some hardware combinations work, others don't.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.