- Published on
80% Battery Charge Limit
The : How to Save Money and Extend Your Mac's Life on Linux
The Problem
Lithium-ion batteries degrade faster when held at 100% charge. If your Mac sits plugged in 24/7 as a desktop, the battery spends its entire life at maximum voltage — the single biggest factor in calendar aging. Apple's own research shows that a battery cycled at 100% retains roughly 80% of its original capacity after 500–1,000 cycles, while one held at 80% retains the same capacity after 1,200–2,000 cycles.
That's a 2× lifespan difference from a single setting.
The Solution
Set a charge limit so the battery stops at 80% instead of 100%. The Mac then runs entirely on AC power, and the battery simply sits at a lower, less stressful voltage.
How to Do It (Linux / Intel Mac)
Step 1: Install the kernel module
sudo apt install dkms linux-headers-$(uname -r) build-essential git sudo git clone --depth 1 --branch 0.1.6 https://github.com/c---/applesmc-next /usr/src/applesmc-next-0.1.6 sudo dkms install "applesmc-next/0.1.6" sudo modprobe -r applesmc 2>/dev/null sudo modprobe applesmc
Step 2: Set the 80% limit
echo 80 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold
Step 3: Make it survive reboots
Create /etc/systemd/system/smc-battery-limit.service:
[Unit] Description=Set Mac battery charge limit to 80% After=multi-user.target [Service] Type=oneshot ExecStart=/bin/sh -c 'echo 80 > /sys/class/power_supply/BAT0/charge_control_end_threshold' [Install] WantedBy=multi-user.target
Then:
sudo systemctl enable smc-battery-limit
Step 4: Verify
cat /sys/class/power_supply/BAT0/capacity cat /sys/class/power_supply/BAT0/status
Once plugged in, watch it charge to 80% and flip to Full . The green light on the charger means "done" — which now means 80%, not 100%.
Why It Works
Lithium-ion cells degrade from two sources: cycle wear (charge/discharge) and calendar aging (time at voltage). Holding a cell at 4.2V (100%) vs 3.9V (80%) increases the electrochemical stress inside the cell by roughly 5×. The solid electrolyte interphase (SEI) layer grows faster, consuming active lithium and reducing capacity over time.
By capping at 80%, you eliminate the highest-stress portion of the charge curve. The battery still gets used, but it never sits at the voltage where degradation accelerates.
The Money
100% Charge80% ChargeCycles to 80% health~500–1,000~1,200–2,000Years before replacement (daily use)~2–3~5–7Replacements over 7-year Mac lifespan2×1×Savings—$159–$249
Apple charges $159–$249 for an out-of-warranty battery replacement. Third-party shops run $120–$180. Either way, you save one full replacement over the life of the machine.
The Time
- No daily monitoring. Set it once, forget it.
- No "is my battery dying?" anxiety. You'll know the number and it'll hold.
- No mid-project battery swaps. If you unplug, you still get ~80% of your original runtime — enough for most work sessions.
- Zero ongoing cost. No subscription, no app, no service. One kernel module, one systemd unit, done.
how to set 80% battery charge with monthly gain and time earn linux
The Tradeoff
You lose ~20% of your unplugged runtime. If your Mac originally gave you 15 hours on a full charge, you now get ~12. For a machine that lives plugged in as a desktop, that's irrelevant. For a machine you carry daily, it's a small price for doubling battery lifespan.
Reversing It
Want 100% for a trip? One command:
echo 100 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold
Reboot and it snaps back to 80% automatically.
Bottom Line
One kernel module, one systemd service, five minutes of setup. You save $159–$249 in battery replacements, extend your old Mac's with linux usable life by 2–4 years, and never think about it again. The most cost-effective hardware tweaks you'll ever make costs nothing.