Skip to content

BUG: terminal stuck when "battery charge 80" command is run. #439

@Deepcode007

Description

@Deepcode007

Did you check that your issue is not already reported?

  • I opened the issues tab
  • I used the search bar to check if the issue was already reported
  • There is no issue that reports what I observed

What is the issue? (required)
I have both the cli and gui installed.
when i do battery charge 80,
it should charge till 80 and stop right?
but instead in the terminal, it gets stuck:

battery charge 80
01/12/26-12:45:53 - Killing old maintain process at 42149
01/12/26-12:45:53 - Killing running maintain daemons & enabling charging as default state
01/12/26-12:45:53 - Disabling daemon at gui/501/com.battery.app
01/12/26-12:45:53 - 🔌🔋 Enabling battery charging
01/12/26-12:45:53 - 🔼🪫 Disabling battery discharging
01/12/26-12:45:53 - Disabling discharging: No valid maintain percentage set, enabling charging
01/12/26-12:45:53 - MagSafe LED function invoked
01/12/26-12:45:53 - 💡 Setting magsafe color to orange
01/12/26-12:45:53 - setting LED to orange
01/12/26-12:45:53 - Battery at 35% (2:38 remaining), 11.888V, smc charging enabled
01/12/26-12:45:53 - Setting adapter to on
01/12/26-12:45:53 - Killing running maintain daemons & enabling charging as default state
01/12/26-12:45:53 - Disabling daemon at gui/501/com.battery.app
01/12/26-12:45:53 - 🔌🔋 Enabling battery charging
01/12/26-12:45:53 - 🔼🪫 Disabling battery discharging
01/12/26-12:45:53 - Disabling discharging: No valid maintain percentage set, enabling charging
01/12/26-12:45:53 - MagSafe LED function invoked
01/12/26-12:45:53 - 💡 Setting magsafe color to orange
01/12/26-12:45:53 - setting LED to orange
01/12/26-12:45:54 - Battery at 35% (2:38 remaining), 11.888V, smc charging enabled
01/12/26-12:45:54 - 🔽🪫 Enabling battery discharging
01/12/26-12:45:54 - Charging to 80% from 35%
01/12/26-12:45:54 - 🔌🔋 Enabling battery charging
01/12/26-12:45:54 - 🔼🪫 Disabling battery discharging


Stuck here for infinite time ig.

What exactly did you do to produce the issue? (required)
Steps to reproduce the behavior:

  1. Go to terminal.
  2. type "battery charge 80".
  3. see terminal gets stuck.

Expected behavior (required)
battery should charge till 80 and stop.

Screenshots (optional)

Error logs

 battery logs
👾 Battery CLI logs:

01/10/26-17:12:42 - setting LED to green
01/10/26-17:13:42 - Charge at or above 80%
01/10/26-17:13:42 - MagSafe LED function invoked
01/10/26-17:13:42 - 💡 Setting magsafe color to green
01/10/26-17:13:42 - setting LED to green
01/10/26-17:14:42 - Charge at or above 80%
01/10/26-17:14:42 - MagSafe LED function invoked
01/10/26-17:14:42 - 💡 Setting magsafe color to green
01/10/26-17:14:42 - setting LED to green
01/10/26-17:15:42 - Charge at or above 80%
01/10/26-17:15:42 - MagSafe LED function invoked
01/10/26-17:15:42 - 💡 Setting magsafe color to green
01/10/26-17:15:42 - setting LED to green
01/10/26-17:16:42 - Charge at or above 80%
01/10/26-17:16:42 - MagSafe LED function invoked
01/10/26-17:16:42 - 💡 Setting magsafe color to green
01/10/26-17:16:42 - setting LED to green
01/10/26-17:17:42 - Charge at or above 80%
01/10/26-17:17:42 - MagSafe LED function invoked
01/10/26-17:17:42 - 💡 Setting magsafe color to green
01/10/26-17:17:42 - setting LED to green
01/10/26-17:18:42 - Charge at or above 80%
01/10/26-17:18:42 - MagSafe LED function invoked
01/10/26-17:18:42 - 💡 Setting magsafe color to green
01/10/26-17:18:42 - setting LED to green
01/10/26-17:19:42 - Charge at or above 80%
01/10/26-17:19:42 - MagSafe LED function invoked
01/10/26-17:19:42 - 💡 Setting magsafe color to green
01/10/26-17:19:42 - setting LED to green
01/10/26-17:20:42 - Charge at or above 80%
01/10/26-17:20:42 - MagSafe LED function invoked
01/10/26-17:20:42 - 💡 Setting magsafe color to green
01/10/26-17:20:42 - setting LED to green
01/10/26-17:21:43 - Charge at or above 80%
01/10/26-17:21:43 - MagSafe LED function invoked
01/10/26-17:21:43 - 💡 Setting magsafe color to green
01/10/26-17:21:43 - setting LED to green
01/10/26-17:22:43 - Charge at or above 80%
01/10/26-17:22:43 - MagSafe LED function invoked
01/10/26-17:22:43 - 💡 Setting magsafe color to green
01/10/26-17:22:43 - setting LED to green
01/10/26-17:23:43 - Charge at or above 80%
01/10/26-17:23:43 - MagSafe LED function invoked
01/10/26-17:23:43 - 💡 Setting magsafe color to green
01/10/26-17:23:43 - setting LED to green
01/10/26-17:24:43 - Charge at or above 80%
01/10/26-17:24:43 - MagSafe LED function invoked
01/10/26-17:24:43 - 💡 Setting magsafe color to green
01/10/26-17:24:43 - setting LED to green
01/10/26-17:25:43 - Charge at or above 80%
01/10/26-17:25:43 - MagSafe LED function invoked
01/10/26-17:25:43 - 💡 Setting magsafe color to green
01/10/26-17:25:43 - setting LED to green
01/10/26-17:26:43 - Charge at or above 80%
01/10/26-17:26:43 - MagSafe LED function invoked
01/10/26-17:26:43 - 💡 Setting magsafe color to green
01/10/26-17:26:43 - setting LED to green
01/10/26-17:27:43 - Charge at or above 80%
01/10/26-17:27:43 - MagSafe LED function invoked
01/10/26-17:27:43 - 💡 Setting magsafe color to green
01/10/26-17:27:43 - setting LED to green
01/10/26-17:28:43 - Charge at or above 80%
01/10/26-17:28:43 - MagSafe LED function invoked
01/10/26-17:28:43 - 💡 Setting magsafe color to green
01/10/26-17:28:43 - setting LED to green
01/10/26-17:29:44 - SMC capabilities: tahoe=true legacy=true CHIE=true CH0I=true CH0J=true
01/10/26-17:29:44 - Debug trail. User: deep, config folder: /Users/deep/.battery, logfile: /Users/deep/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover
01/10/26-17:29:44 - Recovering maintenance percentage 25-80
01/10/26-17:29:44 - Not triggering discharge as it is not requested
01/10/26-17:29:44 - Maintaining battery between 25% and 80% from 81%
01/10/26-17:29:44 - Charge at or above 80%
01/10/26-17:29:44 - 🔌🪫 Disabling battery charging
01/10/26-17:29:44 - MagSafe LED function invoked
01/10/26-17:29:44 - 💡 Setting magsafe color to green
01/10/26-17:29:44 - setting LED to green
01/10/26-17:29:46 - SMC capabilities: tahoe=true legacy=true CHIE=true CH0I=true CH0J=true
01/10/26-17:29:46 - Not triggering discharge as it is not requested
01/10/26-17:29:46 - Maintaining battery between 25% and 80% from 81%
01/10/26-17:29:46 - Charge at or above 80%
01/10/26-17:29:46 - MagSafe LED function invoked
01/10/26-17:29:46 - 💡 Setting magsafe color to green
01/10/26-17:29:46 - setting LED to green
01/11/26-22:34:35 - Charge below 25%
01/11/26-22:34:35 - 🔌🔋 Enabling battery charging
01/11/26-22:34:35 - 🔼🪫 Disabling battery discharging
01/11/26-22:34:35 - Disabling discharging: No valid maintain percentage set, enabling charging
01/11/26-22:34:35 - MagSafe LED function invoked
01/11/26-22:34:35 - 💡 Setting magsafe color to orange
01/11/26-22:34:35 - setting LED to orange
01/11/26-22:34:35 - MagSafe LED function invoked
01/11/26-22:34:35 - 💡 Setting magsafe color to orange
01/11/26-22:34:35 - setting LED to orange
01/12/26-12:45:15 - SMC capabilities: tahoe=true legacy=true CHIE=true CH0I=true CH0J=true
01/12/26-12:45:15 - Debug trail. User: deep, config folder: /Users/deep/.battery, logfile: /Users/deep/.battery/battery.log, file called with 1: maintain_synchronous, 2: recover
01/12/26-12:45:15 - Recovering maintenance percentage 25-80
01/12/26-12:45:15 - Not triggering discharge as it is not requested
01/12/26-12:45:15 - Maintaining battery between 25% and 80% from 35%
01/12/26-12:45:17 - SMC capabilities: tahoe=true legacy=true CHIE=true CH0I=true CH0J=true
01/12/26-12:45:17 - Not triggering discharge as it is not requested
01/12/26-12:45:17 - Maintaining battery between 25% and 80% from 35%

🖥️	Battery GUI logs:

Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv
Generate app menu percentage: 38 (discharge disallowed, limited off)
Battery status: 
{"percentage":"38","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"38% (2:34 remaining)","daemon_state":"smc charging enabled"}
Setting interface refresh speed to 0.5 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":"38","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"38% (2:34 remaining)","daemon_state":"smc charging enabled"}
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status
Limiter status message: 
01/12/26-12:50:45 - Battery at 38% (2:34 remaining), 11.942V, smc charging enabled

Display percentage 35 based on 38
Force discharge setting: undefined undefined
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 38
Generate app menu percentage: 38 (discharge disallowed, limited off)
Found image: /Applications/battery.app/Contents/Resources/battery-inactive-35-Template.png
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":"38","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"38% (2:34 remaining)","daemon_state":"smc charging enabled"}
Setting interface refresh speed to 0.5 minutes
Battery status: 
{"percentage":"38","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"38% (2:34 remaining)","daemon_state":"smc charging enabled"}
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status
Limiter status message: 
01/12/26-12:50:46 - Battery at 38% (2:34 remaining), 11.942V, smc charging enabled

Refreshing interface update timer
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv
Resetting interface timer speed
Force discharge setting: undefined undefined
Get active logo for 38
Display percentage 35 based on 38
Generate app menu percentage: 38 (discharge disallowed, limited off)
Found image: /Applications/battery.app/Contents/Resources/battery-inactive-35-Template.png
Battery status: 
{"percentage":"38","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"38% (2:34 remaining)","daemon_state":"smc charging enabled"}
Setting interface refresh speed to 0.5 minutes
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status_csv
Refreshing tray icon...
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status
Battery status: 
{"percentage":"39","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"39% (2:34 remaining)","daemon_state":"smc charging enabled"}
Limiter status message: 
01/12/26-12:51:16 - Battery at 39% (2:34 remaining), 11.955V, smc charging enabled

Force discharge setting: undefined undefined
Found image: /Applications/battery.app/Contents/Resources/battery-inactive-35-Template.png
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 39
Generate app menu percentage: 39 (discharge disallowed, limited off)
Display percentage 35 based on 39
Battery status: 
{"percentage":"39","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"39% (2:34 remaining)","daemon_state":"smc charging enabled"}
Setting interface refresh speed to 0.5 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":"39","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"39% (2:34 remaining)","daemon_state":"smc charging enabled"}
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status
Limiter status message: 
01/12/26-12:51:18 - Battery at 39% (2:34 remaining), 11.955V, smc charging enabled

Found image: /Applications/battery.app/Contents/Resources/battery-inactive-35-Template.png
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
Generate app menu percentage: 39 (discharge disallowed, limited off)
Force discharge setting: undefined undefined
Display percentage 35 based on 39
Get active logo for 39
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":"39","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"39% (2:34 remaining)","daemon_state":"smc charging enabled"}
Setting interface refresh speed to 0.5 minutes
Battery status: 
{"percentage":"39","remaining":"2:34","charging":true,"discharging":false,"maintain_percentage":"25-80","battery_state":"39% (2:34 remaining)","daemon_state":"smc charging enabled"}
Executing PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin battery status
Limiter status message: 
01/12/26-12:51:18 - Battery at 39% (2:34 remaining), 11.955V, smc charging enabled

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

📁 Config folder details:

total 73728
drwxr-xr-x@  6 deep  staff   192B 12 Jan 12:45 .
drwxr-x---+ 56 deep  staff   1.8K 12 Jan 13:07 ..
-rwxr-xr-x@  1 deep  staff   1.2M 12 Jan 13:07 battery.log
-rw-r--r--@  1 deep  staff    33M 12 Jan 12:51 gui.log
-rw-r--r--@  1 deep  staff     6B 12 Jan 12:45 maintain.percentage
-rw-r--r--   1 deep  staff   1.4K 20 Nov 17:12 visudo.tmp

⚙️	Battery data:

01/12/26-13:07:11 - Battery at 51% (2:17 remaining), 12.163V, smc charging enabled
Battery CLI utility v1.3.2

Additional context (optional)

battery status
01/12/26-13:12:04 - Battery at 54% (2:13 remaining), 12.239V, smc charging enabled

This is while the terminal is stuck.
Please provide a solution and give me a temporary solution. @actuallymentor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions