128GB SSD causing kernel panics - how to partition or disable
I have a Retina 5K, 27-inch, Late 2015 iMac. It is "vintage" and thus cannot receive much help from the Apple store, and I cannot leave macOS Monterrey behind. The machine is fully updated to the current version of Monterrey. There's nothing else weird about this machine; it's about a vanilla an iMac as exists.
Six months ago the fusion drive died. I cracked the machine apart and replaced the hard drive with an SSD kit from iFixit but at the time I did the replacement I did not touch the SSD part of the fusion drive. The hard drive death was sudden and unfixable so there was no opportunity to split the SDD and HDD parts of the fusion drive.
When the machine either goes to sleep or wakes up (it's impossible to know which transition causes the issue) a kernel panic is caused. The source of the panic is AppleAHCIDiskQueueManager::setPowerState.
I had managed to suppress this problem at some point (although I can't remember exactly how - I believe I configured the system to never go to sleep) and had not had this issue in several months, but there have been a number of Monterrey updates in the past couple of weeks and tonight the machine started to panic again.
Currently the "Prevent your Mac from automatically sleeping when the display is off" checkbox in Energy Saver is checked on. "Put hard disks to sleep when possible" is not checked. "Enable Power Nap" is not checked. "Turn display off after:" is set to 1 hour. One of the default screen savers in enabled; it is scheduled to run after 20 minutes.
I can see this disk with the terminal command diskutil list internal; it appears as this:
/dev/disk5 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *121.3 GB disk5
This disk cannot be erased. Attempts to erase it with the Disk Utility app fail (the app starts the process then shows the progress indicator forever and never completes). Attempts to erase it with diskutil produce this result:
diskutil eraseDisk JHFS+ Unfusion /dev/disk5
Started erase on disk5
Error: -69888: Couldn't unmount disk
The terminal command diskutil cs list reports:
No CoreStorage logical volume groups found
So I cannot use the diskutil system to "break" the old fusion drive mapping - I cannot get the GUID for the fusion drive.
About 5 minutes after a reboot a system dialog appears indicating that a disk could not be mounted and asking to Eject or Ignore. I am 99% sure the disk in question is this 128GB SSD.
I am 99% sure that something about going to sleep or waking causes the system to attempt to manipulate this drive, which fails, and the failure triggers the kernel panic.
Anyone have any idea how to erase and establish a valid partition on this drive?
Anyone have any idea on how to hide this drive from macOS so that it stops trying to talk to it on a wake or sleep operation?
I really don't have any interest in cracking the iMac apart (again) and fishing around in its guts to try and remove the SSD. Other than this issue the machine works flawlessly.