Running a Macbook at Full Speed Without a Battery (Linux)

📌 Late May 2022
May 21, 2022

I have a mid-2012 Macbook Air (MacBookAir5,2) that I’m still using as my everyday computer. It works great, but the battery hardly holds any charge anymore and I thought I’d remove it to prevent any possible issues of battery swelling.

Once I had the proper tools to open it up (which took 2 rounds of tool orders on eBay) I went ahead and removed the battery. The laptop was now much lighter!

I turned it on and… hmm. It was slow as molasses.

It turns out that when you remove the battery from a MacBook Air it stays at the processor’s slowest setting as not to draw too much power. This isn’t a software setting: it’s done in the machine’s firmware.

“BD PROCHOT” stands for bi-directional prochot. PROCHOT stands for processor hot. This signal is what initiates thermal throttling so the CPU can slow down and keep from over heating.

(source: https://github.com/yyearth/turnoff-BD-PROCHOT)

But fear not! There’s a way to override this.

⚠ CAUTION: These instructions could cause your computer to malfunction, break, or melt into a puddle of molten metal. I haven’t run into any issues, but I cannot take responsibility for your computer if you choose to follow these instructions.

First install msr-tools. On Ubuntu you can sudo apt install msr-tools. This is software that allows you to manipulate machine-specific registers in the CPU.

Next, create a file in your home folder (or wherever is a convenient location for you) that we’ll call turnoff-BD-PROCHOT.sh, with the following contents:

#!/bin/bash
# 4005d --> 4005e

/sbin/modprobe msr
r=`/usr/sbin/rdmsr 0x1FC`
s='0x'$r'' 
f=$(($s&0xFFFFE))
sudo /usr/sbin/wrmsr 0x1FC "obase=16;$f"|/usr/bin/bc
echo "$r"" write to ""reg 0x1FC" 
echo "BD PROCHOT off."

Now chmod +x ./turnoff-BD-PROCHOT.sh to make it executable, and then you can sudo ./turnoff-BD-PROCHOT.sh to run it. Now your computer should be fast again!

This will need to be run at each boot or after waking the computer from suspend.

Setting up a system service to run it automatically is left as an exercise for the reader.


Comments

On Dec 17, 2022 leana8959 wrote:
Hello,
Firstly, thank you for your guide! If not for you, I wouldn’t have found such an efficient solution.
I run TrueNAS on a MacBook Pro suffering from the exact same problem, I had to use another command (cpucontrol) since I didn’t manage to compile msr-tools on TrueNAS(OpenBSD): cpucontrol -m "0x1fc&=~0x01" /dev/cpuctl0. This actually works fine, the problem is that the system gets unstable and hangs within 20 minutes… It probably draws more power than the power brick could handle.
I guess I’m sticking with a throttled MBP, at least it doesn’t hang every 20 minutes and doesn’t contain a fire hazard inside.
Have a nice day :)
Leana.