Code Monkey home page Code Monkey logo

Comments (2)

Atemu avatar Atemu commented on May 28, 2024

The underlying CLI program uses Apple's SMCKit library/framework, so no that won't work on Linux I believe.

A Linux kernel driver for the SMC is required for this sort of thing to work, so I'd start looking into that.

from charge-limiter.

porteusconf avatar porteusconf commented on May 28, 2024

tl/dr: Good question! It might be worthwhile to try a temporarily boot to 10.14, like from external usb, and run Charge Limiter in 10.14. Then, If lucky, when booted back to linux the battery may not charge above the limit set in 10.14. I say this because it works for me when booting 10.13, where charge-limiter cannot be run, as detailed below.

... Details of my possibly flawed reasoning.... Since the limit is stored in nvram (not anywhere on disk storage), I think when linux is running, perhaps the charge limit might still be in effect. I have not tested in linux(yet) but if I have time will test in linux and update this posting with results. The reason I thiink it is worth a try is based on what I see with a dual-boot mac laptop: 10.13 or 10.14. I set the limit to 80% in 10.14, and when I boot to 10.13, the battery does not charge above 80% or so. The charge-limiter 1.5.1 currently does not run on 10.13 or earlier (tho I tried, below). In 10.13 when launched, after about a second it displays error below about bclm (bclm is the The underlying CLI program uses Apple's SMCKit library/framework,

$  ./bclm --help
dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Applications/Charge Limiter.app/Contents/Resources/./bclm
  Reason: image not found
Abort trap: 6
$ file bclm 
bclm: Mach-O 64-bit executable x86_64
$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G6030
$ ls -l /Applications/Charge\ Limiter.app/Contents/Resources/bclm 
 1382576 Nov 19  2020 /Applications/Charge Limiter.app/Contents/Resources/bclm

P.S. My first try to compile bcim that might run on 10.13 failed as shown below... (I have the command-line tools but maybe I need full xcode???)

bash-3.2$ pwd
/Users/Shared/bclm/bclm
bash-3.2$ swift build
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

bash-3.2$  xcode-select -p   
/Library/Developer/CommandLineTools

bash-3.2$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G6030

from charge-limiter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.