external devices disconnecting from my mac during sleep

Joined
Nov 12, 2016
Messages
36
Reaction score
0
Points
6
Hi, i am having an issue with external devices disconnecting from my mac during sleep. Could you please help?

After i return to the computer when it has been sleeping, i've noticed that certain devices often show me notifications that they have been disconnected. Here are the specific examples:

- My audio interface (scarlett 18i8) will often be removed. The audio interface is plugged directly into the mac usb port and has not physically been touched when the mac is sleeping, but Logic will notify my to say something like audio device removed. To reconnect it, i have been turning it off and back on again (which, after a minute of logic reconnecting to it, usually works fine). This doesn't happen every time that the mac wakes from sleep, but seems to be around 5-10% of the time.


- I purchased a SD reader a few weeks ago ( https://www.amazon.com/dp/B00CMKS2DI/?tag=macforums0e4-20 ). When i come back to the mac after is been in sleep, it will show me notifications that the SD card has been ejected improperly (even though the SD card is still in the reader the SD reader is still connected to the mac via the USB hub (anker 14 port - https://www.amazon.com/dp/B00GSLMTQ8/?tag=macforums0e4-20) . This doesn't happen every time that the mac wakes from sleep, but seems to be around 30% of the time. I am also concerned that this could damage the SD cards or the data on the cards.

- I don't think this ever happens when the SD card is in the mac itself, just the external SD reader (if it does, it happens infrequently)



- On rare occasions, a hard drive that is connected directly to the mac via either USB or thunderbolt will disconnect and i will receive a notifications that the hard drive has been ejected improperly . Again, this happens when these wires/drives are not being touched physically. It doesn't happen often- maybe just once a month or so. But it causes concern because i dont want my data to be compromised because of it.


- Logic will often notify me that MIDI services are unavailable. I'm not entirely sure that this is related (i have several midi instruments connected via usb hub, so i dont think that its a particular device that is disconnecting). This happens often when i turn the mac on after being off and i cant remember if it happens when waking from sleep as well (but i think it does). To fix it, i need to quit logic and re-open it (this always works). This doesn't happen every time that i turn the mac off or wake from sleep, but seems to be around 30-50% of the time.




I have had these issues since i bought this imac new in Oct 2016.

My computer stats/model:

www.dropbox.com/s/7fpmht1tbwfwx42/Screen... 21.17.16.png?dl=0


NOTE:

I have also been having alot of issues with the mac crashing/freezing, so i am not sure if this issue with external devices disconnecting is related to this issue. I have written about the crashing and am currently troubleshooting that issue here:

http://www.fcp.co/forum/4-final-cut-pro-x-fcpx/27382-diagnosing-issues-with-mac



Does anybody have any experience with this type of issue?

Do you have Any thoughts about what could be causing this and how to fix it?

What are the next best steps to take?

Thanks, Dan
 

pigoo3

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,212
Reaction score
1,424
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
Hi, i am having an issue with external devices disconnecting from my mac during sleep. Could you please help?

After i return to the computer when it has been sleeping, i've noticed that certain devices often show me notifications that they have been disconnected.

Does anybody have any experience with this type of issue?

Do you have Any thoughts about what could be causing this and how to fix it?

What are the next best steps to take?

To be honest...I'm not surprised. When the computer is put to sleep...it's "Sleeping". Thus external devices will disconnect...since they have nothing to connect to. Have you had previous Mac's where this didn't happen?

Here's what I would do in this situation when I know that I'm putting the computer to sleep:

- Eject all external devices.
- Power them off (if they are externally powered).
- Put the computer to sleep.

When powering the computer on:

- Wake up the computer from sleep.
- Power on the external devices.

An alternative to this is:

- Power on the external devices first.
- Then wake the computer from sleep (it's possible the iMac will wake up on it's own when it senses external devices being powered on).

You can try both "wake up" methods to see which one works better for you & the external devices you have.

HTH,

- Nick

p.s. I should mention that if external storage devices like hard drives, flash drives, SD cards, etc. are not "ejected" properly time after time after time...this can really mess them up (the drive management files can get corrupted/damaged)...and they won't work properly.
 
M

MacInWin

Guest
The other alternative is not to let the iMac sleep. In the System Settings/Energy Saver, click the box labelled "Prevent computer from sleeping automatically when the display is off." Now all the will happen is that the screen will go dark, but the CPU will keep going, which will communicate with the externals when they ask,
"Are you there?" and keep the alive an online.
 

pigoo3

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,212
Reaction score
1,424
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
Very true Jake.:) I remember when I was in college...I think that we had some computers (which were connected to external data gathering devices)...that hadn't been fully shut down (powered off) for years & years & years. They were only rebooted when they locked up for some reason...or the hard drive finally died after years & years & years of continuous on time.

And some of those hard drives & cooling fans got pretty darn noisey until they finally failed.;)

- Nick
 
OP
D
Joined
Nov 12, 2016
Messages
36
Reaction score
0
Points
6
Thanks Nick and MacInWin!




To be honest...I'm not surprised. When the computer is put to sleep...it's "Sleeping". Thus external devices will disconnect...since they have nothing to connect to. Have you had previous Mac's where this didn't happen?

Hmm ok, that makes sense. I was thinking that this was a problem with the mac software or hardware, but this is actually the expected behavior - right?

I don’t have experience using any other mac with many devices that are plugged in constantly.


But do you have any idea why it wouldn’t just consistently be disconnecting/ejecting these device when it goes to sleep? I mean, there are many times when it stays connected- so why doesn’t it eject every time?


The other alternative is not to let the iMac sleep. In the System Settings/Energy Saver, click the box labelled "Prevent computer from sleeping automatically when the display is off." Now all the will happen is that the screen will go dark, but the CPU will keep going, which will communicate with the externals when they ask,
"Are you there?" and keep the alive an online.


I have been in the habit of manually using the sleep function whenever i walk away from the computer for an extended period of time. I thought this would be best to save power and give the computer a break.


Do you think its better to just turn the display off than putting it to sleep?
 
M

MacInWin

Guest
There is no "Best" or even "Better" way to go. It's up to you. The best for me is to use the settings in Energy Saver to turn the screen off after a period of inactivity (I use 5 minutes), but leave the CPU working. That way my external drives don't disconnect and the system uses minimum power. The biggest electrical hog is the backlight in the display so having it off saves a significant percent of the total power the unit consumes. As for the computer needing a "break," it doesn't really need one unless you are pounding it so hard that the temperature is high all the time. If you are doing nothing and walk away from the computer, if the screen goes dark in a few minutes, the rest of the system will be just loafing along, no stress at all.
 
Last edited:
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
I always put my iMac to sleep, and after backing up disconnect my two external hard drives. Then again as Jake can tell you I will not use Time Machine, only cloning software,.
 

pigoo3

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,212
Reaction score
1,424
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
But do you have any idea why it wouldn’t just consistently be disconnecting/ejecting these device when it goes to sleep? I mean, there are many times when it stays connected- so why doesn’t it eject every time?

When dealing with external devices...Mac's like things done a certain way (to be on the safe side "ejecting" the devices before sleeping)...or if external devices are randomly disconnected while the computer is running (powered on)...without properly "ejecting" them first. If the sequence of the relationship between the computer & the external devices is not done correctly (and is done time after time after time)...the preference files or permissions files can eventually get damaged/corrupted. And this is when you get irratic behavior (sometimes the external devices connect...and sometimes not). If these files get damaged enough...the external devices may not be recognized at all....until repairs are performed.

A good overall maintenance app we recommend is called "Onyx" (free). You download, install, and run Onyx.

- Launch Onyx
- Click on the "Automation" button
- Then click on the "execute" button...then let Onyx do its thing.

This can take 10+ minutes...be patient.:)

- Nick
 
Joined
Jul 24, 2013
Messages
5,075
Reaction score
764
Points
113
Location
Ohio (USA)
Your Mac's Specs
2023-14" M3max MBPro, 64GB/1TB, iPhone 15 Pro, Watch Ultra
I have the same issues with externals and the sleep function. I would wake up my mac pro and if I had forgotten to disconnect an external drive, I would have a long string of warnings telling me what a horrible forgetful owner I was (my interpretation ;D ). I found that since I also had two network drives connected that the server was evidently waking up my MP and that is why I was getting the multitude of "scoldings". I could not get my MP to ignore the server if the network drives were mounted and I never remembered to unmount them so....
To avoid this I set my power settings to always on with the displays turning off after an hour. I shut it off when I am done for the day.

Lisa
 
M

MacInWin

Guest
danklim, if you want the details, the OS and drives "talk" to each other periodically, just to make sure that the connection is still there. If the drive is powered up and the Mac is sleeping, the Mac fails to respond to the signal from the drive, so the drive thinks it is no longer attached and, after a while, it disconnects. But the Mac isn't gone, it's just sleeping, so when you wake it up, it sends signals to all the drives that it is awake again, but the drive now fails to respond because it disconnected when the Mac ignored it. Now the Mac starts throwing those error messages and warnings and you have to remount or reconnect the drives manually. By letting just the screen go dark but keeping the CPU awake, the Mac responds to the drives, nothing gets disconnected.
 
Joined
Sep 10, 2017
Messages
1
Reaction score
0
Points
1
My mac works in a similar way, but unexpected ejection happens even during a copy process.

This happens, although power is turned on, after the screen turns off, even if "Prevent the computer from sleeping automatically when the display is off" is enabled and even if "stops hard disks when it is possible" is disabled.

I can not figure out the problem and a preliminary hardware checkout seems like my macbook 13 late in 2016 (with the touchbar) does not have any problems
 
M

MacInWin

Guest
@Ingbilly, welcome to the forum.

It could be that your external drive is drawing too much power and is overtaxing the power supply. When that happens the drive slows slightly and then has to repeat and repeat the write operations in the copy, which takes longer than normal. The OS then thinks that the drive has disconnected because the drive has not responded to the write request.

To avoid this, use external drives with separate power supplies.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Your MacBook Pro uses its Thunderbolt ports to provide USB power to external devices. As Jake pointed out above, not enough power from the port may be causing the external device to eject. Your TouchBar MBP has 4 USB ports, however, not all provide the same amount of USB power. Move your external device to another port and try that for awhile.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top