Chosen Solution

So I recently have gotten my hands on a laptop in need of a new battery. Battery swap was easy enough, and works fine (thanks iFixit). Another problem has risen though; the trackpad becomes erratic under heavy loads on the CPU. Here are some troubleshooting tips I’ve tried:

Resetting SMC - No effect, same inconsistent behavior.

External mouse - More consistent control, interrupted by erratic movement and random keyboard inputs (most commonly Cmd+F3 (show desktop) and .

Removed battery and ran laptop directly off charger - same behavior, inconsistent movement seemingly under heavy load.

Cleaned trackpad cable connectors - same behavior, no change.

Installed new battery and ran off of that - same erratic behavior under load.

Plugged in with new battery installed - same behavior.

Stress testing via terminal using [yes>/dev/null/] to see if behavior became erratic again - Behavior returned and has persisted even after stress test was ended.

I suspect it may be the trackpad cable or the trackpad itself. I’m leaning more towards the trackpad cable as if it were just the trackpad the keyboard would be unaffected, right? I feel confident with my diagnosis, save for the fact that the connections and ribbon cable look pristine. Anyone have any insight to this? I realize I may just be shouting into the void with such old hardware and a relatively obscure problem, but I figured I’d give it a shot.

Turns out the trackpad cable was causing the issue, after replacing that with a new one everything is working again! EDIT (1/1/22): Ok so that wasnt the problem. The laptop worked great after that cable was replace, stress tested for hours with zero issues in mouse movement and no issues keyboard wise. I then closed the lid, and put it away for about 36hrs before opening it up again to find everything still working fine. I then went to create a new user account and midway through the issue occurred again. I then managed to crank the fans to 100% to cool the CPU only to find that it wasnt under heavy load nor was it overheating. The next step is to check and swap the mousepad but I am first going to check the keyboard and see if there are any obvious shorts. Will edit this post if I find anything. EDIT 2 (1/1/22): So as it turns out, one of the connectors to the mousepad is corroded which lead to the erratic behavior of the trackpad and hence the system. Here is a picture of the healthy connection:

Here is the picture of the corroded connection:

So I will be attempting to clean this connection for now while the new mousepad is on its way. Also good to note: this laptop lives in a rather humid and salty climate (tropical island) so it is possible that a little bit of moisture with a small amount of salt weaseled its way into the laptop causing this corrosion. Phew, what a troubleshooting journey this has been.

While it may not seam like it, your battery maybe failing! Blistered up, pressing on the trackpad and the cables. I would first recommend, install this gem of an app! CoconutBattery take a snapshot of the apps main window and post it here for us to see Adding images to an existing question It helps in getting a better view of things. The next thing is to carefully remove the bottom cover to inspect the battery for blistering. Follow this guide to Step-2 MacBook Air 13" Mid 2013 Battery Replacement. Note how the battery cells look in this image nice and flat on the left and blistered up on the right.

If it appears damaged its time for a new battery.