MacBook randomly shuts down This is likely the same problem I saw reported countless times. However, mine comes with a twist, so I wonder if anyone can provide extra insight. Briefly, my laptop randomly shuts down (I think it happens only on battery). It's an early 2011 17" version running the latest macOS.

A few weeks ago I reinstalled the whole macOS after it wouldn't turn on anymore. I thought it might've been a hardware issue as many people suggest replacing the motherboard, but I was still able to boot it in the safe mode, which would suggest it's a software component issue.

Fast-forward and it's started happening again, although only infrequently and I am able to turn it back on very quickly if I have a charger nearby. Now, here are 2 insights I noticed and wonder if anyone can explain futher.

1/ Once the laptop "dies", I usually need to connect it to the charger to start it again. It feels like giving it some juice to power up. The battery level doesn't seem to play a role here (happens on 90% too). Sometimes if I connect the charger, turn it on, remove charger, it dies instantly. As if I had to keep the charger in for a certain amount of time until it feels confident to run without it. Feels like teaching a child ride a bike.

2/ Lately, I developed a new theory that it happens only when discharging AND I have to have the laptop on my lap, bed, or other unstable surface. I am paying attention now if it happens again when I work on desk, I couldn't replicate it so far. It's this point that drives me crazy, wondering what it could be.

Any experience with this issue is welcome. 

[UPDATE]: I removed case from the Macbook, dusted it off a bit and since then it's been running without any issues again. I haven't changed any settings or components. Computers are weird.
The symptom of powering off suddenly at various charge states (sometimes 25% left, sometimes 75% left) is almost always a battery that can’t keep up with the designed current. 

Some times it’s physical damage from a drop, sometimes chemical damage from being in a car trunk, sometimes just an out of spec battery. 

Any service technician with Apple diagnostics can diagnose and repair that for you. Be sure your firmware and software is up to date before paying for service, though.  Also, try once a SMC reset. 


https://apple.stackexchange.com/a/297277/5472
MacBook Pro randomly shutting down
Fully charged MacBook Air turns off when power cord removed


DIY repair is possible, especially if you are patient and aware an improper battery swap is a fire hazard and can afford a do over if you damage the battery when it’s out or don’t get the adhesive properly handled. 


Is it possible to replace a whole keyboard on a MacBook?