Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BFCL value does not seem to be restored on reboot #13

Open
godly-devotion opened this issue Dec 19, 2020 · 8 comments
Open

BFCL value does not seem to be restored on reboot #13

godly-devotion opened this issue Dec 19, 2020 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@godly-devotion
Copy link

godly-devotion commented Dec 19, 2020

Even after setting the bclm utility to launch at login, it doesn't seem to be restoring the BFCL property correctly. The MagSafe charger light is orange and it requires re running the utility to update it again. The BCLM property seems to be fine but that could be because it doesn't reset that value at reboot as easily, which could mean that its not running the command correctly at login.

macOS Mojave 10.14.6
MacBook Pro 13" Early 2015

@zackelia
Copy link
Owner

Can you verify that /Library/LaunchDaemons/com.zackelia.bclm.plist has something like this section:

<string>/usr/local/bin/bclm</string>
<string>write</string>
<string>77</string>

And also that the bclm binary referenced there is at least version 0.0.3?

@godly-devotion
Copy link
Author

The LaunchDaemon plist file seems to be correct. For testing purposes, I modified the value from 65 to 60 to see if it would apply the value correctly. However upon logging in again, i checked the BCLM value and it was still set to 65 meaning the value wasn't restored correctly. I've updated the issue title to accurately reflect the problem I am having.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.zackelia.bclm.plist</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/bclm</string>
		<string>write</string>
		<string>60</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
~ % which bclm
/usr/local/bin/bclm

bclm version is 0.0.4.

@godly-devotion godly-devotion changed the title BFCL value does not seem to be properly restored on reboot BCLM value does not seem to be restored on reboot Dec 20, 2020
@zackelia
Copy link
Owner

It sounds like possibly the job is not running on boot? Try sudo launchctl list | grep com.zackelia.bclm.plist and if it is working, it should have a status of 0 indicating it was successful.

@godly-devotion
Copy link
Author

- 0 com.zackelia.bclm.plist so it seems it should've been successful.

@zackelia
Copy link
Owner

Was able to replicate this, going to try and work on a fix here soon.

@zackelia
Copy link
Owner

Still taking a look at this when I can... it appears that the BCLM value is fine but BFCL is getting overwritten some time shortly after the launchd job goes. So far I tried adding a niceness value but that didn't change much, still investigating.

@amoratti
Copy link

Also facing this issue on MacBook Pro 15' Late 2013 running macOS Big Sur 11.1
Running the utility again fixes the BFCL value.

@krackers
Copy link

+1, just writing the keys to smc manually, I find that BCLM survives reboots but BFCL does not. I wonder if we can find which process is responsible for resetting this BFCL value.

@zackelia zackelia added the help wanted Extra attention is needed label Mar 29, 2023
@zackelia zackelia changed the title BCLM value does not seem to be restored on reboot BFCL value does not seem to be restored on reboot Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants