hholtmann / smcFanControl

Control the fans of every Intel Mac to make it run cooler
GNU General Public License v2.0
2.41k stars 304 forks source link

Doesn't work with my new MacBook Air #98

Open forthrin opened 4 years ago

forthrin commented 4 years ago

MacBook Air (2017). macOS 10.14.6. smcFanControl 2.6.

Changes to fan speeds don't take.

Some times the fan speeds up after a while, but mostly not.

Doesn't work via the CLI either. (Reading back the fan value gives the value I've asked for, though the fan itself does not adhere to the value.)

Had no problems with this with earlier Macs, so may be related to this particular model.

PS! Enclosing my CLI tools, maybe they could be of use to someone (or could be included in the basic product for ease of use.)

alias smc="/Applications/smcFanControl.app/Contents/Resources/smc"

smcr() {
  smc -k $1 -r | cut -d " " -f 7
}

fan() {
  if [[ $# -eq 1 ]]; then
    smc -k F0Mn -w $(printf "%x" $(echo $(($1 << 2))))
  else
    printf "%.0f\n" $(smcr F0Mn)
  fi
}
Razique commented 2 years ago

After reading around, I have found that the values that the tool expects is not a decimal to hex conversion. Here's my snippets file:

## To convert decimal to string of bytes

# RPM value is 4400
python3 -c "import struct; print(bytearray(struct.pack('f', 4400)).hex())"

# RPM value is 1100
python3 -c "import struct; print(bytearray(struct.pack('f', 1100)).hex())"

# Activate 'forced' mode
/Applications/smcFanControl.app/Contents/Resources/smc -k "F0Md" -w 01
/Applications/smcFanControl.app/Contents/Resources/smc -k "F0Tg" -w 00007a44

# To restore to auto mode.
/Applications/smcFanControl.app/Contents/Resources/smc -k "F0Md" -w 00
forthrin commented 2 years ago

Thanks. However I'm getting an error similar to #131. sudo doesn't help. Building the lastest Git doesn't help. Maybe @hholtmann knows the status here?

Error: SMCWriteKey() = e00002bc
Error: SMCWriteKey() = e00002c1
Razique commented 2 years ago

To confirm, you are running the M1 CPU? If so, AFAIK, the tool isn't compatible with that yet :/

forthrin commented 2 years ago

An important clarification:

WORKS: Changing fan speed from the macOS top bar WORKS: Reading fan speed from CLI FAILS: Writing fan speeds from CLI

$ sudo /Applications/smcFanControl.app/Contents/Resources/smc -k F0Md -w 01
Error: SMCWriteKey() = e00002bc

MacBook Air (2017). macOS 11.6. smcFanControl 2.6 (latest Homebrew / Git).

Razique commented 2 years ago

@forthrin do these commands work without sudo? They do here. In theory, you shouldn't need sudo since you should be able to make changes to your session without escalating privileges? Does this one give you the same output?

/Applications/smcFanControl.app/Contents/Resources/smc -k "F0Md" -w 00
forthrin commented 2 years ago
$ /Applications/smcFanControl.app/Contents/Resources/smc -k "F0Md" -w 00
Error: SMCWriteKey() = e00002bc
Razique commented 2 years ago

Oh I see that you have the 2.6 version, try this one: https://github.com/hholtmann/smcFanControl/releases/tag/2.6.1%C3%9F1 (2.6.1 beta). I believe that it fixes that issue.

forthrin commented 2 years ago
$ git log
commit de3988463a8fbabb4887c16cb3ac0acb212f1405 (grafted, HEAD, tag: 2.6.1ß1)
Date:   Sun Aug 12 00:53:25 2018 +0200
$ ./smc -k F0Md -w 01
Error: SMCWriteKey() = e00002bc
Razique commented 2 years ago

hmmm, I don't know then :/ sorry for that