rurza / BatFi

Battery charging limiter for macOS.
MIT License
208 stars 27 forks source link

BatFi Battery Limit Breaks macOS default charging #46

Closed IBUnderdog27 closed 1 month ago

IBUnderdog27 commented 2 months ago

BatFi Version: 1.42 --> 2.0.0 Beta macOS version: 14.4.1 --> 14.5 Mac: MacBook Pro M1 Pro

I used BatFi with App Mode disabled ever since I got it on April 9th, because BatFi had other features to offer other than limiting battery charge. With the limiter off, the MacBook charged normally, using Optimized Battery Charging enabled and everything.

I then used the battery limiter in BatFi for a period of time, with 80% charge limit. Now, with the limit off again, my Mac doesn't seem to know how to charge anymore. Even if I completely uninstall BatFi, the Mac no longer charges to 100%. If the Mac starts charging at relatively low battery (like 30% for example), it will charge a lot, but then stop at around 80-95%.

In addition, BatFi and the system now disagree a lot. BatFi will show a charging icon and power distribution showing that the Mac is charging, but when I see the system battery menu bar indicator, it shows charging is not happening and the power adapter is the source of power. This is not Optimized Battery Charging doing its stuff, because then the Charge to Full option would be in the system menu bar options, which it is not.

I have also tried to use the Charge to 100% option in BatFi. This is useful, and the system ends up also indicating it is charging too...up until it gains 1% of battery, and then the system and BatFi disagree and the charge does not increase. This usually happens if the battery is relatively full, in that 70-90% range.

I have tried both the stable public release of 1.42 and the 2.0.0 beta, and the same issue happens on both. I have also tried many reboots of the system, since on Apple Silicon that should reset the SMC, but nothing changes. I also tried turning off Optimized Battery Charging, but nothing changes. This all leads me to think BatFi is somehow the culprit of the faulty charging.

TLDR: I think BatFi's charge limiter broke my MacBook's default charging.

IBUnderdog27 commented 2 months ago

After a lot of troubleshooting, I think I pinpointed where the problem lies in BatFi: it messes with the SMC improperly on macOS. I understand that battery limiter apps on macOS need to mess with SMC in order to control the battery charge, but it seems BatFi does it in such a way that it corrupts the SMC, seemingly permanently. This issue also spans reboots, which as I said in my post, should reset the SMC on M-series macs.

In addition, it is really unhelpful that BatFi forces the user to use the app as a battery limiter app in onboarding, as well as install a helper tool that I would guess allows BatFi to mess with the SMC. The battery limiter function in BatFi should be optional to enable, not required, especially if it messes with the SMC.

IBUnderdog27 commented 1 month ago

UPDATE: SOLVED

Turns out, BatFi was not the culprit of my problems. I had another CLI tool that was limiting my battery charge, called "battery". Coincidentally, it was the same tool I used to check if the smc was enabled or not.

I did a scan with Antivirus One by Trend Micro and it flagged the tool. No other antivirus software flagged it, but I uninstalled anyway. Now, the Mac charges to 100% like normal.