Chosen Solution

I have a mid 2012 13” MBP that I purchased back in December 2014. In 2017, the system started giving me serious kernel_task problems. The process used to jump over 300% even during idle time and the laptop became unusable. Doing some diagnosis gave me this error: 4SNS/1/C0000008: TAOP—124 Which I decipher as a faulty temperature ambient air optical drive power bus sensor. I also have the schematic for the A1278 logic board that this system works on and so I can approximately locate the location of this particular sensor. However, not every time my system is running the way I’ve described above. For example, during writing this question, I experienced lag a couple of times but also normal functioning side-by-side. Which means that the sensor is not 100% dead. It does work but something is not allowing it to work at full capacity. Also, there are so many sensors on the logic board, why did this particular sensor throw out the error? As of my own experience, cleaning some dust a couple of days ago put my system to normalcy and I thought I fixed the issue but now it’s here again, sometimes working and sometimes not working. I’ve never spilled liquid so that is not the cause; maybe some moisture that I cannot avoid. What would subject the sensor to function randomly and can it be fixed?

Sounds like you had liquid spill into the trackpad at some point and the ribbon connection is corroded which is messing up the sensor on the logic board. I would try replacing the trackpad MacBook Pro 13" Unibody (Mid 2009-Mid 2012) Trackpad and here’s the guide MacBook Pro 13" Unibody Mid 2012 Trackpad Replacement

Which means that the sensor is not 100% dead. It does work but something is not allowing it to work at full capacity. Also, there are so many sensors on the logic board, why did this particular sensor throw out the error? Not 100% dead is another way of saying it’s barely alive! The thing “not allowing it to work at full capacity” may well be the very fact that it is failing. As for why that particular sensor, who knows? It might just be the first failure. But if what you say is correct, and it’s related to the optical drive, then it’s probably very close to (or inside) the optical drive, which is one of the worst spots to be in in terms of ingress particle/liquid protection. I don’t have the schematic or boardview for the pre-retina MBPs, but if sensor in the optical drive, built into the cable, a separate thermistor, etc., you might be lucky enough to fix this by replacing the optical drive, ribbon cable, or the sensor itself. It may also be just a SMC config issue, but I’m guessing you’ve already tried an SMC reset. Otherwise, unfortunately the only other option I can think of at the moment is an MLB replacement, assuming you don’t want to do an SMC replacement. You don’t, and you probably won’t be able to find anyone willing to do it for you either. The thing is though, the only practical issue you’re having is the unnecessary thermal throttling by kernel_task due to the failing sensor right? If that’s the only issue, and removing the optical drive and/or its sensor doesn’t help, you could get away with just disabling the kernel power management. Just remove the kext that handles your board id or rename it to something else (e.g. IOPlatformPluginFamily.kext to IOPlatformPluginFamily.kext.tmp, invalidate your kernel cache, and that might fix the problem of kernel_task hogging all the system resources in an effort to prevent the non-existing overheating condition.