hholtmann / smcFanControl

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

MacBook Pro (16-inch, 2019) Support #96

Open aanttila opened 4 years ago

aanttila commented 4 years ago

I just received my new 16-inch MacBook Pro (MacBookPro16,1) with an 8-core 2.4 GHz CPU, and of course, I wanted to customize the fan profiles using smcFanControl. Unfortunately, there seem to be enough software/hardware changes that fan speeds are reported incorrectly and cannot currently be modified.

kleuter commented 4 years ago

@aanttila Did you try this app?

aanttila commented 4 years ago

@kleuter I did, with similar problems; I've also tried iStatus Menus. All 3 have similar issues; they can't read the actual status of the fans or can't control them.

kleuter commented 4 years ago

@aanttila strange they claim full support image

aanttila commented 4 years ago

So it does work now, but only for a single custom setting without paying the license fee; I prefer smcFanControl for the simpler user interface and cost (free), which is why I submitted the bug for this project instead of ignoring it and using a different software product.

alvinnguyen commented 4 years ago

Would love to see this happening :)

The new Mac wants to be quiet more than be cool so I have to find a solution while waiting for a hero to make SMC compatible with the new Mac.

But I'm happy to report the iStat Menu is working, it's a bit of a waste getting it just for the fan control but it works.

image

mikeziri commented 4 years ago

No one got it running yet? not even with sudo /Applications/smcFanControl.app/Contents/Resources/smc ?

mikeziri commented 4 years ago

when running /Applications/smcFanControl.app/Contents/Resources/smc -k "FS! " -w 0003 I allways get Error: SMCWriteKey() = e00002bc

this forces manual mode on the fans allowing you to set custom speeds on the fans. for the mbpro it has 2 fans so: smc -k F0Tg -w 36b0 smc -k F1Tg -w 36b0

the 36b0 is is hex for 3500 dec left shifted by 2: python -c "print hex(3500 << 2)"

probably need to dig into the code but I don't really know any objective-c.

jlehrer1 commented 4 years ago

Any luck? @mikeziri

jlehrer1 commented 4 years ago

@aanttila When are you open sourcing yours?

mikeziri commented 4 years ago

unfortunately no. the smc keys must be new.

mgalijot commented 4 years ago

Can confirm that latest version (v2.48) of TG Pro can control fans on MacBook Pro (16-inch, 2019)

CasperPas commented 4 years ago

https://github.com/hholtmann/smcFanControl/issues/77#issuecomment-660602982

pokekrishna commented 4 years ago

Hey folks,

I tried using smcFanControl on my MBP 16 2019, and as I can see you are mentioning SMC keys have changed.

I went ahead and installed Mac Fan Control and it did work for me. I am on the latest GA Mac OS version. Interesting thing is that the logs of the Mac Fan Control app dumps the values of the SMC Keys. Could you please take a look at my logs snippet.

[2020-08-08 07:25:57:322] [thread 163436] [SMC/Service.cpp#335] setFanRPM 5297 for F0Tg [2020-08-08 07:25:58:325] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Tg 0088a545 OK [2020-08-08 07:25:58:325] [thread 163436] [SMC/Service.cpp#335] setFanRPM 5297 for F0Tg [2020-08-08 07:26:08:367] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Md 01 OK [2020-08-08 07:26:08:367] [thread 163436] [SMC/Service.cpp#511] Set fan 0 mode 1 [2020-08-08 07:26:08:368] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F1Md 01 OK [2020-08-08 07:26:08:368] [thread 163436] [SMC/Service.cpp#511] Set fan 1 mode 1 [2020-08-08 07:26:08:368] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Tg 0088a545 OK [2020-08-08 07:26:08:368] [thread 163436] [SMC/Service.cpp#335] setFanRPM 5297 for F0Tg [2020-08-08 07:26:09:371] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Tg 0088a545 OK [2020-08-08 07:26:09:371] [thread 163436] [SMC/Service.cpp#335] setFanRPM 5297 for F0Tg [2020-08-08 07:26:10:372] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Tg 0088a545 OK [2020-08-08 07:26:10:372] [thread 163436] [SMC/Service.cpp#335] setFanRPM 5297 for F0Tg [2020-08-08 07:26:35:439] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F0Md 01 OK [2020-08-08 07:26:35:439] [thread 163436] [SMC/Service.cpp#511] Set fan 0 mode 1 [2020-08-08 07:26:35:440] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F1Md 01 OK [2020-08-08 07:26:35:440] [thread 163436] [SMC/Service.cpp#511] Set fan 1 mode 1 [2020-08-08 07:26:35:441] [thread 163436] [SMC/Platform_mac_smcwrite.mm#251] process_command_write: SMCWriteKey F1Tg 00489945 OK [2020-08-08 07:26:35:441] [thread 163436] [SMC/Service.cpp#335] setFanRPM 4905 for F1Tg [2020-08-08 07:26:36:408] [thread 163252] [SMC/Service.cpp#647] WARNING: getTemperature - skipping sensor TC7C with value of 129.0 [2020-08-08 07:26:36:409] [thread 163252] [SMC/Service.cpp#647] WARNING: getTemperature - skipping sensor TC8C with value of 129.0 [2020-08-08 07:26:36:413] [thread 163252] [SMC/Service.cpp#647] WARNING: getTemperature - skipping sensor TGDT with value of 255.934

jlehrer1 commented 4 years ago

@pokekrishna Huh that is very interesting. Thank you!

CasperPas commented 4 years ago

yes, it might be affected by the recent macOS update. Both smc & iStat Menus stopped working, only Macs Fan Control works now. @pokekrishna Thank you for your logs

theRealSuperMario commented 3 years ago

I tried macOS Fan control and hate to say that it is a little bit too complicated for me. Can anyone share their fan control settings with me maybe?

All I want is to increase the minimum fan speed so that it is a little bit cooler by default.

What confuses is which sensor to take for measurement. How to include CPU + GPU to the calculation and keep fan RPM in sync?

erolrecep commented 3 years ago

I just installed smcFanControl via brew cask. When I open it showed me a warning message of "this software is not tested on your machine but if you follow our instructions it will work". Which is a fair warning. However, on the bar, it just shows "47C and 0000RPM". I understand that it's not tested on this laptop specifically. When I install htop, it says run with sudo to run all features. Is there anyone who have tried running smcFanControl with sudo?

kamil6x commented 3 years ago

Has anyone figured out the smc key for the Macbook Pro 16 to increase max fan speed?

denysvitali commented 3 years ago

Not sure if it's the maximum, but here it is something useful:

alias smc="/Applications/smcFanControl.app/Contents/Resources/smc"
smc -k "F0Md" -w 01
smc -k "F0Tg" -w 00d8d951
smc -k "F1Md" -w 01
smc -k "F1Tg" -w 0004a651
kamil6x commented 3 years ago

Thanks Denys for getting back to me. I used similar values that seem to work but will try yours as well: smc -k "F0Md" -w 01 smc -k "F0Tg" -w 0060ea45 smc -k "F1Md" -w 01 smc -k "F1Tg" -w 0060ea45

Denys Vitali wrote on 2021-07-01 11:48:

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

-- Sincerely,

Kamil Bukala

Mobile / WhatsApp: +48 798 183 905 Skype: kamil6x LinkedIn: https://www.linkedin.com/in/kbukala/ If you need to organize your bookmarks check out TabsFolders.com https://www.tabsfolders.com/appsumopartnership/?email_kamil

denysvitali commented 3 years ago

Oh yes, don't use mine, they're not bit shifted (LOL)

kamil6x commented 3 years ago

Ok your values set the fans 100 rpm faster. Thank you!!! :)

FYI: to reset back to system controlled speed I start macsfans control. Any way to do this with smc -k?

Kamil

Denys Vitali wrote on 2021-07-01 11:48:

|smc -k "F1Tg" -w 0004a651 |

-- Sincerely,

Kamil Bukala

Mobile / WhatsApp: +48 798 183 905 Skype: kamil6x LinkedIn: https://www.linkedin.com/in/kbukala/ If you need to organize your bookmarks check out TabsFolders.com https://www.tabsfolders.com/appsumopartnership/?email_kamil

denysvitali commented 3 years ago

How do you check your RPMs by the way?

kamil6x commented 3 years ago

istat menus. It was worth the investment as it does all the stats I need, fans, temperatures, network, and amazing at showing which process is using the cpu, disk, or network. Macos activity monitor only shows the total disk transferred bytes not the current top user. https://bjango.com/mac/istatmenus/

Denys Vitali wrote on 2021-07-01 12:43:

How do you check your RPMs by the way?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hholtmann/smcFanControl/issues/96#issuecomment-872129803, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA26YD7FEENUUTMKEQW5DJLTVRBGDANCNFSM4JPL5ATA.

-- Sincerely,

Kamil Bukala

Mobile / WhatsApp: +48 798 183 905 Skype: kamil6x LinkedIn: https://www.linkedin.com/in/kbukala/ If you need to organize your bookmarks check out TabsFolders.com https://www.tabsfolders.com/appsumopartnership/?email_kamil

denysvitali commented 3 years ago

After checking, your values (0060ea45 = 7500 rpms (float 32)) are correct, but mines are overflowing (?) and thus causing the fans to spin faster.

Useful bash functions:

utils.sh

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

function get_bytes(){
  $SMC -r -k "$1" | grep -E -o 'bytes [0-9a-f ]+' | cut -d ' ' -f 2- | sed -E 's/ //g'
}

function hex_to_f32(){
  python3 -c "import struct; print(int(struct.unpack('f', bytes.fromhex('$1'))[0]))"
}

function f32_to_hex(){
  python3 -c "import struct; print(struct.pack('f', $1).hex())"
}

get.sh

#!/bin/bash
set -e
. utils.sh

F0_TARGET_BYTES=$(get_bytes "F0Tg")
F0_MIN_BYTES=$(get_bytes "F0Mn")
F0_MAX_BYTES=$(get_bytes "F0Mx")

F1_TARGET_BYTES=$(get_bytes "F1Tg")
F1_MIN_BYTES=$(get_bytes "F1Mn")
F1_MAX_BYTES=$(get_bytes "F1Mx")

F0_TARGET=$(hex_to_f32 "$F0_TARGET_BYTES")
F0_MIN=$(hex_to_f32 "$F0_MIN_BYTES")
F0_MAX=$(hex_to_f32 "$F0_MAX_BYTES")

F1_TARGET=$(hex_to_f32 "$F1_TARGET_BYTES")
F1_MIN=$(hex_to_f32 "$F1_MIN_BYTES")
F1_MAX=$(hex_to_f32 "$F1_MAX_BYTES")

function print_fan(){
  NUMBER="$1"
  TARGET="$2"
  F_MIN="$3"
  F_MAX="$4"

  echo "F$NUMBER: $2 ($F_MIN, $F_MAX)"
}

print_fan 0 "$F0_TARGET" "$F0_MIN" "$F0_MAX"
print_fan 1 "$F1_TARGET" "$F1_MIN" "$F1_MAX"
kamil6x commented 3 years ago

Wow thank you for the full calculation script!!!  :)

Kamil

Denys Vitali wrote on 2021-07-05 17:19:

After checking, your values (|0060ea45| = 7500 rpms (float 32)) are correct, but mines are overflowing (?) and thus causing the fans to spin faster.

Useful bash functions:

  |utils.sh|

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

function get_bytes(){ $SMC -r -k"$1" | grep -E -o'bytes [0-9a-f ]+' | cut -d' ' -f 2-| sed -E's/ //g' }

function hex_to_f32(){ python3 -c"import struct; print(int(struct.unpack('f', bytes.fromhex('$1'))[0]))" }

function f32_to_hex(){ python3 -c"import struct; print(struct.pack('f', $1).hex())" }

  |get.sh|

!/bin/bash

set -e . utils.sh

F0_TARGET_BYTES=$(get_bytes "F0Tg") F0_MIN_BYTES=$(get_bytes "F0Mn") F0_MAX_BYTES=$(get_bytes "F0Mx")

F1_TARGET_BYTES=$(get_bytes "F1Tg") F1_MIN_BYTES=$(get_bytes "F1Mn") F1_MAX_BYTES=$(get_bytes "F1Mx")

F0_TARGET=$(hex_to_f32 "$F0_TARGET_BYTES") F0_MIN=$(hex_to_f32 "$F0_MIN_BYTES") F0_MAX=$(hex_to_f32 "$F0_MAX_BYTES")

F1_TARGET=$(hex_to_f32 "$F1_TARGET_BYTES") F1_MIN=$(hex_to_f32 "$F1_MIN_BYTES") F1_MAX=$(hex_to_f32 "$F1_MAX_BYTES")

function print_fan(){ NUMBER="$1" TARGET="$2" F_MIN="$3" F_MAX="$4"

echo "F$NUMBER: $2 ($F_MIN, $F_MAX)" }

print_fan 0"$F0_TARGET" "$F0_MIN" "$F0_MAX" print_fan 1"$F1_TARGET" "$F1_MIN" "$F1_MAX"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hholtmann/smcFanControl/issues/96#issuecomment-874188795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA26YD53VKG5UT2RJXLRMC3TWHEPPANCNFSM4JPL5ATA.

-- Sincerely,

Kamil Bukala

Mobile / WhatsApp: +48 798 183 905 Skype: kamil6x LinkedIn: https://www.linkedin.com/in/kbukala/ If you need to organize your bookmarks check out TabsFolders.com https://www.tabsfolders.com/appsumopartnership/?email_kamil

henrik242 commented 1 year ago

Tried building and running the latest (commit e1bd672b). My fans immediately went to full blast and wasn't able to control it. Had to turn the machine off :D