Only works with Catalina? #8

Closed
opened 2025-12-30 01:31:57 +01:00 by adam · 7 comments
Owner

Originally created by @cyclism6486 on GitHub (May 27, 2020).

when I open the DMG on my laptops running Mojave I see the dreaded "circle with line" over the app's icon. I really wanted this to work for Mojave since I don't plan on going to Catalina until next September. Maybe update the readme to state "requires macOS 10.15.x"

Originally created by @cyclism6486 on GitHub (May 27, 2020). when I open the DMG on my laptops running Mojave I see the dreaded "circle with line" over the app's icon. I really wanted this to work for Mojave since I don't plan on going to Catalina until next September. Maybe update the readme to state "requires macOS 10.15.x"
adam closed this issue 2025-12-30 01:31:57 +01:00
Author
Owner

@krackers commented on GitHub (May 28, 2020):

You can compile command line version of SMCUtil from https://github.com/sicreative/BatteryStatusShow and run sudo SMCUtil -w BCLM <hex val>. Works as far back as 10.9 (probably even further, as it just needs the smc key to be defined).

@krackers commented on GitHub (May 28, 2020): You can compile command line version of `SMCUtil` from https://github.com/sicreative/BatteryStatusShow and run `sudo SMCUtil -w BCLM <hex val>`. Works as far back as 10.9 (probably even further, as it just needs the smc key to be defined).
Author
Owner

@alexwhittemore commented on GitHub (May 28, 2020):

If you want a slightly easier way, I built a quick wrapper around that same utility in the form of an Alfred workflow that lets you set charging level to either 70% or 100% cap.

It's here, midway down below the Alfred screenshot
https://www.alexwhittemore.com/controlling-macbook-pro-charging-cap-with-alfred/

@alexwhittemore commented on GitHub (May 28, 2020): If you want a slightly easier way, I built a quick wrapper around that same utility in the form of an Alfred workflow that lets you set charging level to either 70% or 100% cap. It's here, midway down below the Alfred screenshot https://www.alexwhittemore.com/controlling-macbook-pro-charging-cap-with-alfred/
Author
Owner

@alexwhittemore commented on GitHub (May 28, 2020):

@krackers you can also take the easy route and just download it pre-compiled, which is what I did for that Alfred workflow :) https://github.com/sicreative/BatteryStatusShow/tree/master/BatteryStatusShow/smcutil/Products/usr/local/bin

@alexwhittemore commented on GitHub (May 28, 2020): @krackers you can also take the easy route and just download it pre-compiled, which is what I did for that Alfred workflow :) https://github.com/sicreative/BatteryStatusShow/tree/master/BatteryStatusShow/smcutil/Products/usr/local/bin
Author
Owner

@cyclism6486 commented on GitHub (May 28, 2020):

@krackers - just because I figured out how to leave an "issue" here doesn't mean I'm a developer. Last time I used a compiler was with Fortran 77, so I have no idea how to do what you said. @alexwhittemore - I will take a look at that Alfred workflow....but first I need to install Alfred.

@cyclism6486 commented on GitHub (May 28, 2020): @krackers - just because I figured out how to leave an "issue" here doesn't mean I'm a developer. Last time I used a compiler was with Fortran 77, so I have no idea how to do what you said. @alexwhittemore - I will take a look at that Alfred workflow....but first I need to install Alfred.
Author
Owner

@itsjoshpark commented on GitHub (May 28, 2020):

Thanks for the tips everybody. I decided to create a small utility using Script Editor to set the max charge level using smcutil. It should run on almost all versions of macOS, though it was specifically tested on my MacBook Pro 13" (early 2015) with macOS Mojave 10.14.6.

https://github.com/godly-devotion/charge-limiter

@itsjoshpark commented on GitHub (May 28, 2020): Thanks for the tips everybody. I decided to create a small utility using Script Editor to set the max charge level using `smcutil`. It should run on almost all versions of macOS, though it was specifically tested on my MacBook Pro 13" (early 2015) with macOS Mojave 10.14.6. https://github.com/godly-devotion/charge-limiter
Author
Owner

@krackers commented on GitHub (May 29, 2020):

@alexwhittemore Nice work! I believe the pre-compiled binary uses the os_unfair_lock symbol which was only defined in 10.12+.

4e64c47a8d/BatteryStatusShow/smc.c (L140)

To build for older platforms it should be safe to replace this with the commented out variant (OSSpinLock). I haven't done enough kernel development to be sure of the difference but I think the switch to unfair_lock was just a performance optimization – since we're not calling it repeatedly it should be fine.

@krackers commented on GitHub (May 29, 2020): @alexwhittemore Nice work! I believe the pre-compiled binary uses the `os_unfair_lock` symbol which was only defined in 10.12+. https://github.com/sicreative/BatteryStatusShow/blob/4e64c47a8d6c51416ad9fd250650929b327162c8/BatteryStatusShow/smc.c#L140 To build for older platforms it should be safe to replace this with the commented out variant (`OSSpinLock`). I haven't done enough kernel development to be sure of the difference but I think the switch to unfair_lock was just a performance optimization – since we're not calling it repeatedly it should be fine.
Author
Owner

@davidwernhart commented on GitHub (Jun 4, 2020):

Hi guys!

Since I developed and compiled this tool on Catalina, I was not able to test if it works for other versions of MacOS. I am sad to hear that it apparently does not.

Also @alexwhittemore congrats on your Alfred workflow, it seems to be very handy and convenient!

Best regards,
David

@davidwernhart commented on GitHub (Jun 4, 2020): Hi guys! Since I developed and compiled this tool on Catalina, I was not able to test if it works for other versions of MacOS. I am sad to hear that it apparently does not. Also @alexwhittemore congrats on your Alfred workflow, it seems to be very handy and convenient! Best regards, David
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/AlDente-Battery_Care_and_Monitoring#8