Open MoienBowen opened 1 month ago
Hi, have you started the homebrew service? I didn't see it in the information you provided.
Or try again with the original installations in README without homebrew.
Hi Charlie, I can confirm that if I install with the commande in README, everything goes well. However, if I install batt via brew, the issue shows up.
I did not get what you mean by "started the homebrew service", not sure if there is any specific service for any particular permission. Could you please tell me what should I do, please?
Will brew service start batt
do?
After clean up batt with sudo batt uninstall
, I tried with brew services start batt
, there is a system notification pops-up. In the system setting, batt is listed below "Allow in the Background".
However, sudo batt limit 80
still returns the same error.
PS. the batt installed via brew is also cleaned previously via brew uninstall --force batt
.
Can you show the content of /tmp/batt.log
?
I reinstalled via brew at 18:42, and run the commands:
However, in the log, there is nothing after 18:42. The log may be gathered from the batt installed via command line.
time="2024-08-28 18:09:58.095" level=info msg="batt version v0.2.1 commit 90df4aaefb930ab05a6763c96866e8db0faf698e" time="2024-08-28 18:09:58.095" level=info msg="config loaded: main.Config{Limit:80, PreventIdleSleep:true, DisableChargingPreSleep:true, AllowNonRootAccess:true, LowerLimitDelta:2, ControlMagSafeLED:true}" time="2024-08-28 18:09:58.096" level=info msg="non-root access is allowed, chaning permissions of /var/run/batt.sock to 0777" time="2024-08-28 18:09:58.096" level=info msg="http server listening on /var/run/batt.sock" time="2024-08-28 18:09:58.096" level=debug msg="main loop starts" time="2024-08-28 18:09:58.096" level=info msg="registered and listening system sleep notifications" time="2024-08-28 18:09:58.098" level=debug msg="batteryCharge=100, lower=78, upper=80, chargingEnabled=true, isPluggedIn=true, maintainedChargingInProgress=true" time="2024-08-28 18:09:58.099" level=info msg="battery charge 100% reached 80% but charging is enabled, disabling charging" time="2024-08-28 18:10:11.958" level=info msg="set charging limit to 80" time="2024-08-28 18:10:11.959" level=debug msg="batteryCharge=100, lower=78, upper=80, chargingEnabled=false, isPluggedIn=true, maintainedChargingInProgress=false" time="2024-08-28 18:10:11.959" level=debug msg="PUT /limit 201 (2ms)" dataLength=190 latency=2 method=PUT path=/limit statusCode=201 time="2024-08-28 18:10:18.101" level=debug msg="batteryCharge=100, lower=78, upper=80, chargingEnabled=false, isPluggedIn=true, maintainedChargingInProgress=false"
It seems homebrew service is having some issues. The service (batt daemon) is not running at all. I personally don't use homebrew on my Mac so some investigation is needed for me to see what is going on.
Is the commandline installation method feasible? In this way it should run as intended.
Yes, I am currently using the batt installed via command line. Thanks a lot. :D
MBA M4, macOS 14.6.1
Installed version via brew:
Error when setting with batt