It took some time I know, since I last managed to resurrect the old Macbook 2013 from a completely unusable state 3 years ago. It was an antedote to speeding fan, to a completely paniced kernel service (that goes up to more than 200% usage for the minimal amount of applications).
The kernel panic happened essentially due to the system detecting a sensor signal that suggests there is overheating in the CPU. In order to prevent this, and protect the machine from overheating, it tries to throttle the CPU power for as much as possible till the sensor returns to normal. It does this, apparently via two ways, first of which is an IOcontrol module, which the last fix takes care of. Upon the fix, my CPU usage for light uses (e.g. browsing news website on chrome) consumed only 50-70% of CPU power, and the Mac was useable as a note-taking device. But that was not quite enough. The Macbook, despite being old, was a lot more power than that (It has three cores each in theory capable of being clocked to 2.9GHz). As it turns out, the core CPU was still being throttled physically via hardware limitation – the voltage supply to the CPU is capped at around 0.7241 volts, and as a result, CPU clock-speed capped at 0.8GHz (less than a third of the maximum capacity – and that explains almost 50% CPU usage for merely opening a page in chrome!)
I came upon this tool that could detect the core frequency, and upon some searches (and browsing through the Q&A sections), another tool being used by people with powerful Macs to clock-down their fast CPUs in order to gain better battery performance has surfaced as the ideal tool to get the CPU back to its normal working speed. Here is a quick walk through of how:
We need a tool called Voltageshift. You might be tempted to build the tool from source just to err on the safe side. Been there, did not succeed. It seems that the support for older versions of XCode was no longer good enough for that build. I chose to download the built version supplied by the author instead.
in order to use the tool, it needs to be uplifted in list of kext files, using the command similar to below. Replacing the directory to VoltageShift to wherever the downloaded/build kext file is saved
sudo chown -R root:wheel ./VoltageShift.kext
It is easy to run the following code to verify the installation:
./voltageshift.info
This should provide a summary of the CPU core, which could look something like this:
------------------------------------------------------
VoltageShift Info Tool
------------------------------------------------------
CPU voltage offset: 0mv
GPU voltage offset: 0mv
CPU Cache voltage offset: 0mv
System Agency offset: 0mv
Analogy I/O: 0mv
Digital I/O: 0mv
CPU BaseFreq: 2400, CPU MaxFreq(1/2/4): 2900/2900/2900 (mhz)OC_Locked PL1: 100W PL2: 125W
CPU Freq: 0.8ghz, Voltage: 0.7241v, Power:pkg 9.40w /core 2.06w,Temp: 43 c
Use the following piece of code to force CPU voltage back to normal (disclaimer: use this at own risk, it will definitely void warranty; you shouldn’t do it if you are not sure)
./voltageshift write 0x1FC 0x04005e
In my case, this usually forces the CPU to go back to CPU Freq of 2.4 GHz if something demanding is already running. Notice the immediate speeding up of CPU back to how it used to be (which seemed likea long distant memory).
One thing to note, from my own experience, and from feedback in the forum, the override seems to be discarded each time Macbook wakes up from a sleep cycle. So it needs to be applied again. It is minimal hassle considering the speed boost that I get back. I also made a shell script to quickly run it each time the Macbook sleeps. Although not fully automated, it is definitely is an acceptable solution for the end-result.