Published

- 6 min read

How To Fix "3rd party NVMe controller. Loss of MMIO space" MacBook Kernel Panic

by Hong Cheung

img of How To Fix "3rd party NVMe controller. Loss of MMIO space" MacBook Kernel Panic
Watch this if you don’t like reading texts.

Intro

If you are like me, using an old model of MacBook, you might have upgraded the SSD inside your machine. It was all good and glorious. I’ve been running a 1TB NVMe SSD MacBook Air 2015 with Ventura installed using OpenCore Legacy Patcher, check out this article if you want to know how.

It was unbeatable, but suddenly things changed.

The Problem

After running for some good old months, the MacBook started having random freezes and crashes. It has gotten really bad that my machine would crash right after logging in. I clicked the report button to read the crash report, it said something like:

   panic(cpu 0 caller 0xffffff8016542836): nvme: "3rd party NVMe controller. Loss of MMIO
space. Write. fBuiltIn=1 MODEL=Kingston FW=S5Z42105 CSTS=0xffffffff US[1]=0x0
US[0]=0x5a VID=0x1987 DID=0x5012 CRITICAL_WARNING=0x0.\n"
@IONVMeController.cpp:6053

By reading that report, I know it is related to the NVMe controller.

Searching for a solution

”Maybe it’s the update I installed from system settings?” I told myself. Anyway, so I tried to update and re-patch my OpenCore, to see if it’s an issue with the drivers, but to no avail. So, I turned to Google.

A bunch of people are having the same exact issue, the common thing is that we all upgraded a 3rd party NVMe SSD/M.2 drive to the MacBook. To do that, we used an adaptor, ideally Sintech, or use a particular model of SSD, etc. That’s what people say, we followed everything but still.

I checked on the Apple support forum as well as other websites. I even re-installed my MacBook using internet recovery to the factory setting of Monterey, but it still crashed, for the same exact reason. So, I can conclude it is not a software problem.

What worked for the others

Updating SSD firmware

Some people said they fixed it by updating the SSD firmware. That’s what I did. You can find out your model from the crash report, as you can see above, the model I am using is Kingston, with a firmware number S5Z42105. I found the information on Kingston’s official website saying the latest firmware of my A2000 SSD is S5Z42109.

The difficulty part is that they only provide a Windows installer. That makes sense because I don’t think third party SSDs are meant to be installed on macOS. So, if your drive doesn’t support updating the driver under macOS, for non-tech-savvy, what you can do are the following:

  1. Install Windows to your MacBook, download and run the driver update inside Windows. Then, use the internet recovery tool or macOS USB to install the disk or backup (time machine) you have to retrieve your macOS. This is time-consuming because you have to download and install Windows, the whole process takes a few hours at least. Not to mention the internet recovery from Apple takes an absurd amount of time, think 1 whole day to finish the recovery.
  2. Make a live bootable Linux of your choice, boot it up in live mode. Then, install it using nvme command like the following.

NVMe-Driver-Update

Credit: I found the instruction on this GitHub repo, shout out to that guy. But remember, just use the instructions, not the file. Because you and I are using different drives from different brands.

When you finish, you can reboot into your macOS like nothing happened. But this requires a knowledge of making a bootable live Linux USB. It is not that hard, less time-consuming, and you don’t have to wipe out your macOS. You can follow a tutorial like this.

So the procedure will be:

Make a live Linux USB > Boot up Linux in live mode > Find and download your latest SSD driver > Follow the above instructions > Shut down, unplug the Linux USB > Boot back in your macOS.

Opening the chassis

  1. Reseating the SSD - One commenter I found said that reseating the SSD (physically dismounting and replugging firmly) fixed the issue. But you have to have that weird MacBook-only screwdriver to open the chassis.
  2. Cleaning the SSD & Motherboard - Another commenter on the Apple support forum said there was a jellyish thing near where the SSD is located, the person fixed the crash just by removing it.

Buy a new SSD and adaptor

This is just a last resort, who would spend one more time to buy another SSD just for this old MacBook?

Also, one commenter said by switching back to the original SSD, the issue was resolved, but when he/she put the new SSD back in, the problem reappeared.

People were using their SSDs fine and all, but after a few months or a year, we are facing this issue. What if you buy a new one and face the same problem again a few months later?

What fixed mine

OK, here is why you are here. This is worth a million dollars.

What I found

After heavily trying everything possible without opening the chassis - Like, I also tried just to use Linux, giving up on macOS, but damn, Linux froze the same way too! I also tried resetting SMC and NVRAM. So, I know it is something related to the hardware.

NOT ABOUT SOFTWARE, REALLY!

It’s pretty controversial to what the internet people are telling me.

People said reseating fixed the issue, some came back saying the issue happened after a day of use. So that’s actually fixed the issue, but temporary. Which means something has been done right, just not everything.

Here’s how:

I turned the MacBook off.

I make a fist with my right hand, holding the closed MacBook upside down with my left hand.

Then, I punched my MacBook evenly in the back. Not like I’m trying to break it, but fix it kind of force, if you’re smart enough to know what I mean.

Boot it up, and viola.

No crashes for two days straight.


I fixed my MacBook tech issue with the old school “Slap the TV to get better signal” way.

I love old folks’ wisdom.

I am not crazy

To explain, what I did was simple, some connections under the hood of the MacBook were unstable.

I don’t know where, why and how, but there it was.

So for some people, it was reseating the SSD, while for others, it might be caused by a jelly or a crumb, no way to know. And I also didn’t have that screwdriver.

By hitting it - if there’s a crumb it will move away; if it’s a minor connection issue it might go back into place(like resetting).

The final recipe

So, out of desperation, having no suitable screwdriver, the thinking of vibration can help to get rid of small debris, combining the old wisdom I carried, with an impatience anger.

I am proud to say I fixed this annoying “3rd freaking party NVMe controller” problem, hell yes! I can finally get back to work.

At the time, I was looking for a new MacBook on my iPhone right before punching it in the back, I thought to myself, “If it doesn’t help, I will buy a new one. If it works, great.”.

Nothing to lose.


Comments are welcomed.

(If you don’t see the comment section, turn off your AdBlock and refresh the page)

If this has fixed your problem, please kindly leave a message below and share it.

So people know this is legit, it really works!


Have Fun Punching Your MacBook!



Reference on the Apple forum:



Enjoyed the read?

Share