How to resolve AppleAHICIDDiskQueueManager timeouts and kernel panics on iMac with external SSD?

I have the iMac 27" released in 2017. The hard drive died last year so I had Ventura installed on an external Samsung T9 SSD connected to the USB-C port.


It has been working very well over a year until recently, when the O/S just shut down because of the AppleAHICIDDiskQueueManager time out. When I reboot it, it comes back up fine, then the log in process takes a very long time, then it works fine for about 15 minutes then it got shut down again with the same kernel panic.


I've search this board and somebody suggested Enable Power Nap. That didn't make any difference. I don't have any other external drive connected.


What bothers me is when it is working it works flawlessly. No sign of any trouble then suddenly the screen went dark and the reboot took place.


As it stands right now I can get keep it running for more than half an hour. It doesn't matter if it's idle or I'm actively using it.


Any idea?



[Re-Titled by Moderator]

iMac 27″ 5K, macOS 12.7

Posted on May 25, 2025 1:50 PM

Reply
21 replies

May 27, 2025 7:41 PM in response to bediron

bediron wrote:

Second, I followed the link and tried to disable the SSD portition of the dead Fusion drive from mounting. I attached a picture of that portion. Sure enough, after I used the automount command from the link and disable the UUID of that "Untitled" volume it came up unmounted next time the system rebooted. However, it still crashed after 20 minutes or so with the same kernel panic.

The "Untitled" volume is located on the internal SSD.


I don't see the whole hard drive. What I see is in the picture and I assume the spinning portion is no longer accessible. Just the SSD part. So I don't know whether I can create a tiny partition as you suggested.

If you can get the device identifier for the physical Hard Drive, then we can try to create a very small partition on it...just enough so you can try those instructions again to prevent it from automatically mounting. For example the device identifier for the "Untitled" volume shown in your screenshot is "disk1s2".


I'm guessing your physical Hard Drive will have a device identifier of "disk4", but make sure to replace "disk4" with the actual device identifier of your drive, or bad things can happen to the wrong drive or volume.


Here is the command you will need to partition & format the internal Hard Drive with device identifier "disk4" with just a 50 MB MacOS Extended (Journaled) leaving the rest of the Hard Drive as unpartitioned.


diskutil  partitionDisk  disk4  2  GPT  jhfs+  BadHD 50M  free  FREE  R


If this succeeds, then you should theoretically be able to prevent it from mounting automatically during boot.


This command will not prompt you to confirm anything. And it may erase the drive with the device identifier you provide even if the drive is mounted, so make sure you are using the correct device identifier. FYI, it should not erase any volumes on your boot drive since they are in active use, but still be careful. Disconnect all other external drives just to be safe. There is no safety net when using the command line.


I tested this command (using a different device identifier of course) and it works on a writable mounted DMG image file. However, it will erase the drive even if there are mounted volumes....sometimes even while an app has an open file on the drive (it depends on the app & what the app is doing with the drive). TextEdit didn't lock the drive, but LibreOffice did prevent the drive from being erased in my tests.


I was thinking that I would need to take it to a store and have the physical dead drive removed. Before doing that I rebooted in Recovery and did First Aid on the Samsung external T9 volumes.

The Macintosh HD passed. But the Macintosh HD Data failed. The exit code is 8. The last line says could not verify or repair: -69845.

Sometimes First Aid will fail on the first scan for unknown reasons. Immediately run First Aid again...sometimes it will be able to finish the scan. You may need to click "Show Details" and scroll back through the report which may provide a clue. Just make sure you are running First Aid on the APFS Container which in your screenshot of Disk Utility is "Container disk3". Sometimes the container's file system needs to be scanned & repaired before you can scan or repair the APFS volumes within that Container which include "Macintosh HD" and "Macintosh HD - Data", as well as some other hidden ones (Apple likes to hide things from users....sometimes for good reason as it can simplify things, other times not so simple).


It is also possible you may need to be booted into Recovery Mode or from a macOS USB installer. Some file system repairs can only be performed when booted to other media.


May 29, 2025 7:26 PM in response to bediron

bediron wrote:

Thanks again. Just a quick question.

Now that I know the HDD is disk1, should I try these commands why the system is running in Normal mode now (it's been running for 1.5 days)? Or, should I shut down, unplug the external SSD (containing Ventura), boot it in Recovery mode, launch a Terminal, find the HDD identifier and run the commands?

I would do it now while you still see the internal HD. Who knows what will happen to the HD when it gets power cycled. Even this command could cause the HD to act up again (of course it will anyway at some point). The command should fail if accidentally used on the drive you are currently booted.

May 30, 2025 8:46 AM in response to bediron

Thanks for the update. I'm glad it worked since you never know with a failing drive.


Anxiously awaiting if this will solve your problem. Of course it may take a while and multiple reboots, or power off & power on before you will really know.


I've never tried this so I am really curious.


Just out of curiosity, would you mind running DriveDx (free trial period) and posting the complete text report for the internal HD here using the "Additional Text" icon which looks like a piece of paper on the forum editing toolbar? I would just like to see what the health report shows about the HD failure. This app won't install anything & can even be run from the Downloads folder & just deleted when finished. This really shouldn't affect the HD (as long as you don't run the self test) since it will just be asking the drive to send its health information which normally takes just seconds.


May 26, 2025 10:16 AM in response to bediron

bediron wrote:

How to resolve AppleAHICIDDiskQueueManager timeouts and kernel panics on iMac with external SSD?

I have the iMac 27" released in 2017. The hard drive died last year so I had Ventura installed on an external Samsung T9 SSD connected to the USB-C port.

It has been working very well over a year until recently, when the O/S just shut down because of the AppleAHICIDDiskQueueManager time out.

AHCI has to do with the internal drive. If the internal Hard Drive failure is severe enough it can affect booting from external media. My guess is that you are accessing that internal hard drive in some fashion (either you or the OS) which is triggering the problem (best case since you can minimize the chances of accessing it, otherwise the issue will continue until the internal drive is physically disconnected which is not simple & is very risky).


To prevent the internal drive from even being mounted during system boot, you can use the instructions in the following article so the only time the internal drive will be accessed is by the system firmware at power on when it looks for bootable drives and when the OS boots to identify the internal drive which will be blocked.


Prevent a volume from mounting at startup - Apple Community



Jun 3, 2025 4:52 PM in response to HWTech

Uh oh. I ran into a different problem and don't know how to resolve it.


I followed the instructions of DriveDx and installed the Smart Drivers for external SSD. After installation, I went into System Preferences/Security/General and allowed software from kirill luzanov (as the instructions said) then rebooted.


But the reboot failed. It kept trying and failing. I had to boot it into Safe Mode. The errors are below.



The BadHD volume is still in tact so it's a different problem now. Since it happened right after I installed the DriveDx smart drivers I'm sure those drivers are causing this.


I followed the DriveDx instructions and removed the smart drivers (basically removed 2 folders in /Library).


That didn't fix the problem. I still have to boot into Safe Mode.


I went back to System Preferences/Security/General but don't see the message about "software from kirill luzanov" anymore.


Any idea?



Jun 2, 2025 9:31 AM in response to HWTech

Sorry for the late response. I was a little bit reluctant initially to reboot because it had been running so well.


I think the problem is fixed. First, I restarted.


Second, I shut down and started.


Third, I shut down, unplugged, waited for an hour, plugged it back in and started it.


This morning, I shut it down, waited for 15 minutes then started it.


In all 4 cases, I never got the "Could not read the attached drive: Eject, Ignore, Initialize." The BadHD volume showed up as unmounted in all cases. For the last time I was a little worried because the Log in process gave me the spining rainbow wheel for about a minute or so. But it finally came up fine.


Thank you again for your help!


So:


  1. The trick is to find the disk identifier, create a small volume and change the automount to exclude it at boot.
  2. The problem is indeed with the dead internal drive. The First Aid errors on the external boot SSD are just red herring.
  3. The Safe Mode might have done something to cause my HD to show up. Since it was broken a year ago it had never showed up once as a 2tb drive.


I intend to pursue the First Aid errors on the external boot SSD to see if there's anything wrong with it. I will probably log a different question for that.

May 29, 2025 4:21 AM in response to HWTech

Thank you so much for your knowledge and willingness to help.


This problem is getting stranger by the day. Yesterday morning, I tried booting up in Safe Mode to see if it makes a difference. The Safe Mode was very very slow as expected, then I put it in Sleep mode. Half an hour later it crashed and got rebooted into Normal mode. I checked the error and it was the same kernel panic. Then I left it to go to work.


Surprisingly when I got home (and until this morning) it was still ok. It hasn't crashed yet. I do remember that when I logged in the last time I did not get the "Could not read the drive attached. Eject. Ignore. Initialize...". So I used Disk Utility to see if I can locate the identifier the dead hard drive. Guess what, the drives changed from the last picture I posted. I can now "see" the dead hard drive of 2 tb, which for a fact I was never able to since a year ago. I'll attach a picture for that.



As you can see from the above, it is different from the last time. I've yet to figure out how to find the identifier of that drive to do the trick you showed. But currently it hasn't crashed anymore and I'm afraid to restart it because the problem could happen again.


So... did the Safe Mode fix it? Should I try creating a small partition on it? I'm pretty that drive is dead.


Again, thank you so much.

May 30, 2025 7:40 AM in response to HWTech

Your first command works. And I used the instructions to turn off the automount on that BadHD volume.


This is the output of the command:


$ diskutil  partitionDisk disk1 2 GPT jhfs+  BadHD 50M  free  FREE  R
Started partitioning on disk1
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk1s2 as Mac OS Extended (Journaled) with name BadHD
Initialized /dev/rdisk1s2 as a 48 MB case-insensitive HFS Plus volume with a 512k journal
Mounting disk
Finished partitioning on disk1


This is what Disk Utility shows me:

Then this is how I turned off the automount:


$ diskutil info /Volumes/BadHD
   Device Identifier:         disk1s2
   Device Node:               /dev/disk1s2
   Whole:                     No
   Part of Whole:             disk1

   Volume Name:               BadHD
   Mounted:                   Yes
   Mount Point:               /Volumes/BadHD

   Partition Type:            Apple_HFS
   File System Personality:   Journaled HFS+
   Type (Bundle):             hfs
   Name (User Visible):       Mac OS Extended (Journaled)
   Journal:                   Journal size 512 KB at offset 0x3000
   Owners:                    Enabled

   OS Can Be Installed:       No
   Media Type:                Generic
   Protocol:                  SATA
   SMART Status:              Verified
   Volume UUID:               B7383C43-39AC-3BD0-9A59-ECA663955C2A
   Disk / Partition UUID:     E285062F-3719-42B3-BF11-CC8C566CAE01
   Partition Offset:          209735680 Bytes (409640 512-Byte-Device-Blocks)

   Disk Size:                 50.0 MB (49999872 Bytes) (exactly 97656 512-Byte-Units)
   Device Block Size:         512 Bytes

   Volume Total Space:        50.0 MB (49999872 Bytes) (exactly 97656 512-Byte-Units)
   Volume Used Space:         1.7 MB (1708032 Bytes) (exactly 3336 512-Byte-Units) (3.4%)
   Volume Free Space:         48.3 MB (48291840 Bytes) (exactly 94320 512-Byte-Units) (96.6%)
   Allocation Block Size:     4096 Bytes

   Media OS Use Only:         No
   Media Read-Only:           No
   Volume Read-Only:          No

   Device Location:           Internal
   Removable Media:           Fixed

   Solid State:               No
   Hardware AES Support:      No

#
# Warning - this file should only be modified with vifs(8)
#
# Failure to do so is unsupported and may be destructive.
#
UUID=63832A19-19A6-3D8C-A9EE-B3FCE8181281 none hfs rw,noauto
UUID=B7383C43-39AC-3BD0-9A59-ECA663955C2A none hfs rw,noauto

$ sudo automount -vc
automount: /System/Volumes/Data/home updated (/home -> /System/Volumes/Data/home)
automount: no unmounts


I haven't restarted yet :)


I'll do that later and let you know if the problem is fixed.


Thanks for sharing again.


May 26, 2025 10:32 AM in response to HWTech

Thank you so much for your insights. I really appreciate it.


The rotating hard drive died last year as I mentioned. Since it was a Fusion drive the spinning portion died but the SSD part is still there and I can access it. I haven't taken it out yet. So your thinking that this remnant of the old hard drive is the problem makes perfect sense. The Samsung T9 external was put in last year so I didn't expect it to have problems that soon.


I will follow your link when I get home tonight.


But just another question here. When I booted it I got an error message (beside the message about the crash report) saying the drive could not be read and presented with 3 choices: Eject, Ignore, Initialize. I ALWAYS thought that the message is pertaining to the external SSD since it is being used as a system drive. Therefore, I always clicked Ignore. Should I try clicking Eject and solve the problem? (haha...)

May 26, 2025 10:36 AM in response to BDAqua

Thank you so much for your response. So sorry for being late to reply. I always thought I would get an email when somebody replied to my question. But this time no email whatsoever. I happened to go back to the post and found yours and HWTech's reply.


I replied to HWTech in the above. Do you think if I click Eject it will solve the problem. I'm currently away from home so can't try it yet.


I'll attach the crash report here for completeness.



May 26, 2025 12:59 PM in response to bediron


But just another question here. When I booted it I got an error message (beside the message about the crash report) saying the drive could not be read and presented with 3 choices: Eject, Ignore, Initialize. I ALWAYS thought that the message is pertaining to the external SSD since it is being used as a system drive. Therefore, I always clicked Ignore. Should I try clicking Eject and solve the problem? (haha...)

You can try clicking "Ignore", but you will need to do that every time you boot....possibly even when waking from sleep as well. It sounds like the internal Hard Drive's failure is getting worse.


bediron wrote:

I will follow your link when I get home tonight.

I'm doubtful that link will help now. You can still try it, but you will need to successfully erase that internal Hard Drive since it doesn't appear to have a valid file system.


If you have trouble erasing the whole hard drive, then can try creating a tiny partition on that drive instead, but I don't think you can do that with the Disk Utility GUI interface. Besides it will just want to format the second partition which would still give you the error. It may be possible to use the command line to partition the internal hard drive, but I would need to research the proper command.


May 26, 2025 1:01 PM in response to bediron

bediron wrote:

Thank you so much for your response. So sorry for being late to reply. I always thought I would get an email when somebody replied to my question. But this time no email whatsoever. I happened to go back to the post and found yours and HWTech's reply.

You are supposed to be notified, but the Apple forums have been having issues lately with sending notification updates in a timely manner. While it has gotten better recently, there still seem to be some delays in receiving them...usually just late, but sometimes no notification at all.

May 27, 2025 10:20 AM in response to HWTech

First, quick status updates on easy items.


I clicked on Eject instead of Ignore. That didn't make any difference.


Second, I followed the link and tried to disable the SSD portition of the dead Fusion drive from mounting. I attached a picture of that portion. Sure enough, after I used the automount command from the link and disable the UUID of that "Untitled" volume it came up unmounted next time the system rebooted. However, it still crashed after 20 minutes or so with the same kernel panic.


I don't see the whole hard drive. What I see is in the picture and I assume the spinning portion is no longer accessible. Just the SSD part. So I don't know whether I can create a tiny partition as you suggested.


Here's another experiment.


I was thinking that I would need to take it to a store and have the physical dead drive removed. Before doing that I rebooted in Recovery and did First Aid on the Samsung external T9 volumes.


The Macintosh HD passed. But the Macintosh HD Data failed. The exit code is 8. The last line says could not verify or repair: -69845.


The Samsung T9 is 2tb and I'm only using 500G or so.


You did say that the AHCI kernel panic is internal drive. So I'm not sure the First Aid failure is just red herring and I still have to take it to a store to have the physical drive removed.





May 29, 2025 4:27 AM in response to bediron

Here's the output of diskutil list:


/dev/disk0 (internal, physical):

  #:            TYPE NAME          SIZE    IDENTIFIER

  0:   GUID_partition_scheme            *121.3 GB  disk0

  1:            EFI ⁨EFI⁩           314.6 MB  disk0s1

  2:         Apple_HFS ⁨Untitled⁩        120.9 GB  disk0s2


/dev/disk1 (internal, physical):

  #:            TYPE NAME          SIZE    IDENTIFIER

  0:   GUID_partition_scheme            *2.0 TB   disk1

  1:            EFI ⁨EFI⁩           209.7 MB  disk1s1

  2:         Apple_APFS ⁨⁩            2.0 TB   disk1s2


/dev/disk2 (external, physical):

  #:            TYPE NAME          SIZE    IDENTIFIER

  0:   GUID_partition_scheme            *2.0 TB   disk2

  1:            EFI ⁨EFI⁩           209.7 MB  disk2s1

  2:         Apple_APFS ⁨Container disk3⁩     2.0 TB   disk2s2


/dev/disk3 (synthesized):

  #:            TYPE NAME          SIZE    IDENTIFIER

  0:   APFS Container Scheme -           +2.0 TB   disk3

                 Physical Store disk2s2

  1:        APFS Volume ⁨Macintosh HD - Data⁩   582.4 GB  disk3s1

  2:        APFS Volume ⁨Preboot⁩         2.1 GB   disk3s2

  3:        APFS Volume ⁨Recovery⁩        1.1 GB   disk3s3

  4:        APFS Volume ⁨VM⁩           1.1 MB   disk3s4

  5:        APFS Volume ⁨Macintosh HD⁩      21.2 GB  disk3s5

  6:       APFS Snapshot ⁨com.apple.os.update-...⁩ 21.2 GB  disk3s5s1


How to resolve AppleAHICIDDiskQueueManager timeouts and kernel panics on iMac with external SSD?

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