actuallymentor / battery

CLI/GUI for managing the battery charging status for Apple silicon (M1, M32, M3) Macs
MIT License
3.88k stars 165 forks source link

Charges past battery maintain number by 4-5% #295

Open aliuexe opened 3 months ago

aliuexe commented 3 months ago

I set battery maintain to 80, and it always charges up to 85% for some reason. Better yet, when I restart my laptop, it shows up at 88-90% post-restart.

Set battery maintain to 80 Plug in MacBook Charge past 80, ends at around 85

I expect it to stop at 80%, or +- 1-2% that range. Not up to 5% over :(

image image

aliuex@Alexs-MacBook-Air ~ % battery logs πŸ‘Ύ Battery CLI logs:

08/11/24-23:05:14 - MagSafe LED function invoked 08/11/24-23:05:14 - πŸ’‘ Setting magsafe color to green 08/11/24-23:05:14 - setting LED to green 08/11/24-23:06:14 - Charge above 70 08/11/24-23:06:14 - MagSafe LED function invoked 08/11/24-23:06:14 - πŸ’‘ Setting magsafe color to green 08/11/24-23:06:14 - setting LED to green 08/11/24-23:07:33 - Charge above 70 08/11/24-23:07:33 - MagSafe LED function invoked 08/11/24-23:07:33 - πŸ’‘ Setting magsafe color to green 08/11/24-23:07:33 - setting LED to green 08/11/24-23:08:33 - Charge above 70 08/11/24-23:08:33 - MagSafe LED function invoked 08/11/24-23:08:33 - πŸ’‘ Setting magsafe color to green 08/11/24-23:08:33 - setting LED to green 08/11/24-23:09:34 - Charge above 70 08/11/24-23:09:34 - MagSafe LED function invoked 08/11/24-23:09:34 - πŸ’‘ Setting magsafe color to green 08/11/24-23:09:34 - setting LED to green 08/11/24-23:11:07 - Charge above 70 08/11/24-23:11:07 - MagSafe LED function invoked 08/11/24-23:11:07 - πŸ’‘ Setting magsafe color to green 08/11/24-23:11:07 - setting LED to green 08/11/24-23:12:07 - Charge above 70 08/11/24-23:12:07 - MagSafe LED function invoked 08/11/24-23:12:07 - πŸ’‘ Setting magsafe color to green 08/11/24-23:12:07 - setting LED to green 08/11/24-23:14:09 - Charge above 70 08/11/24-23:14:09 - MagSafe LED function invoked 08/11/24-23:14:09 - πŸ’‘ Setting magsafe color to green 08/11/24-23:14:09 - setting LED to green 08/11/24-23:15:09 - Charge above 70 08/11/24-23:15:09 - MagSafe LED function invoked 08/11/24-23:15:09 - πŸ’‘ Setting magsafe color to green 08/11/24-23:15:09 - setting LED to green 08/11/24-23:16:09 - Charge above 70 08/11/24-23:16:09 - MagSafe LED function invoked 08/11/24-23:16:09 - πŸ’‘ Setting magsafe color to green 08/11/24-23:16:09 - setting LED to green 08/11/24-23:20:41 - Charge above 70 08/11/24-23:20:41 - MagSafe LED function invoked 08/11/24-23:20:41 - πŸ’‘ Setting magsafe color to green 08/11/24-23:20:41 - setting LED to green 08/11/24-23:21:41 - Charge above 70 08/11/24-23:21:41 - MagSafe LED function invoked 08/11/24-23:21:41 - πŸ’‘ Setting magsafe color to green 08/11/24-23:21:41 - setting LED to green 08/11/24-23:26:04 - Debug trail. User: aliuex, config folder: /Users/aliuex/.battery, logfile: /Users/aliuex/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover 08/11/24-23:26:05 - Recovering maintenance percentage 70 08/11/24-23:26:05 - Not triggering discharge as it is not requested 08/11/24-23:26:05 - Charging to and maintaining at 70% from 75% 08/11/24-23:26:05 - Charge above 70 08/11/24-23:26:05 - πŸ”ŒπŸͺ« Disabling battery charging 08/11/24-23:26:06 - MagSafe LED function invoked 08/11/24-23:26:06 - πŸ’‘ Setting magsafe color to green 08/11/24-23:26:06 - setting LED to green 08/11/24-23:27:19 - Debug trail. User: aliuex, config folder: /Users/aliuex/.battery, logfile: /Users/aliuex/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover 08/11/24-23:27:19 - Recovering maintenance percentage 70 08/11/24-23:27:19 - Not triggering discharge as it is not requested 08/11/24-23:27:19 - Charging to and maintaining at 70% from 74% 08/11/24-23:27:19 - Charge above 70 08/11/24-23:27:19 - πŸ”ŒπŸͺ« Disabling battery charging 08/11/24-23:27:19 - MagSafe LED function invoked 08/11/24-23:27:19 - πŸ’‘ Setting magsafe color to green 08/11/24-23:27:19 - setting LED to green 08/11/24-23:27:21 - Not triggering discharge as it is not requested 08/11/24-23:27:21 - Charging to and maintaining at 70% from 74% 08/12/24-00:11:53 - Charge below 70 08/12/24-00:11:53 - πŸ”ŒπŸ”‹ Enabling battery charging 08/12/24-00:11:53 - πŸ”ΌπŸͺ« Disabling battery discharging 08/12/24-00:11:53 - MagSafe LED function invoked 08/12/24-00:11:53 - πŸ’‘ Setting magsafe color to orange 08/12/24-00:11:53 - setting LED to orange 08/12/24-22:24:44 - Not triggering discharge as it is not requested 08/12/24-22:24:44 - Charging to and maintaining at 80% from 64% 08/12/24-22:51:47 - Charge above 80 08/12/24-22:51:47 - πŸ”ŒπŸͺ« Disabling battery charging 08/12/24-22:51:47 - MagSafe LED function invoked 08/12/24-22:51:47 - πŸ’‘ Setting magsafe color to green 08/12/24-22:51:47 - setting LED to green 08/12/24-22:56:39 - Debug trail. User: aliuex, config folder: /Users/aliuex/.battery, logfile: /Users/aliuex/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover 08/12/24-22:56:39 - Recovering maintenance percentage 80 08/12/24-22:56:39 - Not triggering discharge as it is not requested 08/12/24-22:56:39 - Charging to and maintaining at 80% from 88% 08/12/24-22:56:39 - Charge above 80 08/12/24-22:56:39 - πŸ”ŒπŸͺ« Disabling battery charging 08/12/24-22:56:39 - MagSafe LED function invoked 08/12/24-22:56:39 - πŸ’‘ Setting magsafe color to green 08/12/24-22:56:39 - setting LED to green 08/12/24-22:57:01 - Debug trail. User: aliuex, config folder: /Users/aliuex/.battery, logfile: /Users/aliuex/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover 08/12/24-22:57:01 - Recovering maintenance percentage 80 08/12/24-22:57:01 - Not triggering discharge as it is not requested 08/12/24-22:57:01 - Charging to and maintaining at 80% from 88% 08/12/24-22:57:01 - Charge above 80 08/12/24-22:57:01 - πŸ”ŒπŸͺ« Disabling battery charging 08/12/24-22:57:01 - MagSafe LED function invoked 08/12/24-22:57:01 - πŸ’‘ Setting magsafe color to green 08/12/24-22:57:01 - setting LED to green 08/12/24-22:57:03 - Not triggering discharge as it is not requested 08/12/24-22:57:03 - Charging to and maintaining at 80% from 88%

πŸ–₯️ Battery GUI logs:

Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Refreshing tray icon... Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Refreshing tray icon... Limiter status message: 08/12/24-23:04:30 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:30 - Your battery is currently being maintained at 80%

Get active logo for 87 Force discharge setting: undefined undefined Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Found image: /Applications/battery.app/Contents/Resources/battery-active-85-Template.png Refreshing interface update timer Resetting interface timer speed Generate app menu percentage: 87 (discharge disallowed, limited on) Display percentage 85 based on 87 Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Setting interface refresh speed to 10 minutes Limiter status message: 08/12/24-23:04:31 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:31 - Your battery is currently being maintained at 80%

Force discharge setting: undefined undefined Generate app menu percentage: 87 (discharge disallowed, limited on) Display percentage 85 based on 87 Resetting interface timer speed Refreshing interface update timer Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Found image: /Applications/battery.app/Contents/Resources/battery-active-85-Template.png Get active logo for 87 Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Setting interface refresh speed to 10 minutes Refreshing tray icon... Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status Limiter status message: 08/12/24-23:04:34 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:34 - Your battery is currently being maintained at 80%

Generate app menu percentage: 87 (discharge disallowed, limited on) Resetting interface timer speed Refreshing interface update timer Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Get active logo for 87 Display percentage 85 based on 87 Found image: /Applications/battery.app/Contents/Resources/battery-active-85-Template.png Force discharge setting: undefined undefined Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Setting interface refresh speed to 10 minutes Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Refreshing tray icon... Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status Limiter status message: 08/12/24-23:04:43 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:43 - Your battery is currently being maintained at 80%

Generate app menu percentage: 87 (discharge disallowed, limited on) Display percentage 85 based on 87 Force discharge setting: undefined undefined Found image: /Applications/battery.app/Contents/Resources/battery-active-85-Template.png Get active logo for 87 Resetting interface timer speed Refreshing interface update timer Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Setting interface refresh speed to 10 minutes Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Refreshing tray icon... Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status Limiter status message: 08/12/24-23:04:43 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:43 - Your battery is currently being maintained at 80%

Get active logo for 87 Display percentage 85 based on 87 Force discharge setting: undefined undefined Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv Found image: /Applications/battery.app/Contents/Resources/battery-active-85-Template.png Generate app menu percentage: 87 (discharge disallowed, limited on) Refreshing interface update timer Resetting interface timer speed Battery status: {"percentage":"87","remaining":"16:23","charging":false,"discharging":false,"maintain_percentage":"80","battery_state":"87% (16:23 remaining)","daemon_state":"smc charging disabled"} Setting interface refresh speed to 10 minutes

πŸ“ Config folder details:

total 1328 drwxr-xr-x@ 7 aliuex staff 224B 12 Aug 22:57 . drwxr-x---+ 19 aliuex staff 608B 12 Aug 22:56 .. -rwxr-xr-x@ 1 aliuex staff 29K 12 Aug 23:04 battery.log -rwxr-xr-x@ 1 aliuex staff 5B 12 Aug 22:57 battery.pid -rw-r--r--@ 1 aliuex staff 572K 12 Aug 23:04 gui.log -rw-r--r--@ 1 aliuex staff 3B 12 Aug 22:57 maintain.percentage -rw-r--r-- 1 aliuex staff 965B 12 Aug 22:56 visudo.tmp

βš™οΈ Battery data:

08/12/24-23:04:54 - Battery at 87% (16:23 remaining), 12.635V, smc charging disabled 08/12/24-23:04:54 - Your battery is currently being maintained at 80% Battery CLI utility v1.2.7

js4jiang5 commented 2 months ago

I think that is normal because similar app like bclm also has the same phenomenom. The approach is to set the level to lower by 5%. In your case, you may set to 75%. When you reboot the charging is enabled until till this battery app is started, so that's normal too. I might be wrong because I'm just a user like you. It seems that the forum is not well maintained.