macfanctld(1)

πŸ’– macfanctld β€” the girlies' guide to not melting your MacBook πŸ’–

okay so bestie, you know how your MacBook gets ✨toasty✨ and the fans just sit there like they're on their lunch break? yeah. this is the manual page for macfanctld, from the USER COMMANDS section of your friendly neighbourhood man pages. it's the little daemon that keeps your laptop from becoming a panini press. no cap.


🌸 NAME 🌸

macfanctld β€” fan control for MacBook. yes literally that's the whole job and she eats every time πŸ’…


✨ SYNOPSIS ✨

macfanctld [-f]

that's it. that's the whole summoning ritual. πŸͺ„


πŸ¦‹ DESCRIPTION πŸ¦‹

so macfanctld is a daemon β€” meaning she's out here running in the background, minding her own business, being the main character of your thermal management arc. what she does is read your temperature sensors and adjust the fan speed (or speeds, plural, she's flexible) on MacBooks. she's configurable, and she logs temp and fan data to a file so you can stalk the numbers later. obsessed.

here's the thing though β€” she doesn't just look at one number, she uses three sources to figure out how fast the fans should spin:

  1. the average temperature from all the sensors
  2. sensor TC0P β€” that's CPU 0 Proximity Temp
  3. sensor TG0P β€” that's GPU 0 Proximity Temp

and the way that each source's impact on fan speed can be individually adjusted?? that's the whole point, bestie β€” it lets you fine tune the working temperature on different MacBooks, because not every MacBook is built the same and they all have their own little temperaments. it's giving ✨personalised care✨.

Important: macfanctld depends on applesmc-dkms. like, depends depends. she cannot function without it. periodt.

πŸ’… OPTIONS πŸ’…

  • -f β€” runs macfanctld in the foreground, logging to stdout. basically she stops hiding in the background and just yaps directly into your terminal. useful for watching her work her magic live. πŸŽ€

😭 EXIT STATUS 😭

macfanctld returns a non-zero exit status in case of failure to start. so if she can't get up, she will tell you she couldn't get up. respectful, honestly.


πŸ“ FILES πŸ“

  • /etc/init.d/macfanctld β€” the daemon init script. this is the one that wakes her up at boot, like a lil alarm clock but for thermals. ⏰
  • /etc/macfanctl.conf β€” the configuration file, aka the glow-up station. tune this to get your desired working temperature. the format must be <key>:<number>. let's go through every single key because i would never gatekeep:
    • fan_min β€” minimum fan speed. typically this is set to 2000 (that's Apple's default, iykyk). maximum speed is 6200.
    • temp_avg_floor β€” average temperature in Celsius at which the fan speed will be set to fan_min. valid values are 0 to 90, and it must be less than temp_avg_ceiling. (yes it has to be smaller. she has rules.)
    • temp_avg_ceiling β€” average temperature in Celsius at which the fan speed will be set to max (6200). valid values are 0 to 90, and it must be larger than temp_avg_floor. keep the vibes in order, please. 🌈
    • temp_TC0P_floor β€” temperature in Celsius at TC0P, at which the fan speed will be set to fan_min. valid values are 0 to 90, and it must be less than temp_TC0P_ceiling.
    • temp_TC0P_ceiling β€” temperature in Celsius at TC0P, at which the fan speed will be set to max (6200). valid values are 0 to 90, and it must be larger than temp_TC0P_floor.
    • temp_TG0P_floor β€” temperature in Celsius at TG0P, at which the fan speed will be set to fan_min. valid values are 0 to 90, and it must be less than temp_TG0P_ceiling.
    • temp_TG0P_ceiling β€” temperature in Celsius at TG0P, at which the fan speed will be set to max (6200). valid values are 0 to 90, and it must be larger than temp_TG0P_floor.
    • exclude β€” a list of natural numbers defining sensors that should be excluded from reading. example:
exclude: 1 7

this will disable reading of sensors temp1_input and temp7_input. so basically it's a blocklist for sensors that are acting up. not me excluding the problem sensors 😌

this feature was added as a workaround for issues in applesmc-dkms that disable reading of some sensors, or in some cases, incorrectly define sensors that don't exist. so if applesmc-dkms is out here inventing sensors that aren't real, this is your fix. πŸ™ˆ

  • log_level values β€” set the log level. valid values are:
    • 0 β€” Startup / Exit logging only
    • 1 β€” Basic temp / fan logging
    • 2 β€” Log all sensors
  • /var/log/macfanctl.log β€” the log file. when log_level is 1, the following output is generated:
Speed: 6200,  AVG: 52.5C, *TC0P: 62.0C,  TG0P: 62.0C
Speed: 6200,  AVG: 52.4C, *TC0P: 62.0C,  TG0P: 61.8C
Speed: 6200,  AVG: 52.4C,  TC0P: 61.8C, *TG0P: 62.0C
Speed: 6168,  AVG: 52.3C,  TC0P: 61.8C, *TG0P: 61.8C
Speed: 6168,  AVG: 52.2C,  TC0P: 61.5C, *TG0P: 61.8C
  • Speed is the current fan speed.
  • AVG, TC0P and TG0P show the temperature in Celsius at the source.
  • the '*' indicates which source is currently driving the fan. (she's pointing at whoever's in charge right now. main character of the moment. πŸ‘‘)

🧚 NOTES 🧚

hopefully the provided configuration file will be suitable on most MacBooks. however, there has been very little testing at this point. like, barely any. so please β€” enable logging and keep an eye on the temperatures in the log, as well as sensing the temp with your hand on the left part above the keyboard. yes, fr fr, put your hand there. if it feels too hot, tweak the config file! πŸ”₯

to follow the log as it's written do:

$ tail -F /var/log/macfanctl.log

πŸ’€ BUGS πŸ’€

there are most certainly bugs in this software. she said it, not me. 😭

please submit bug reports, comments and suggestions to mikael@sesamiq.com.


🫢 AUTHOR 🫢

Mikael Strom (mikael@sesamiq.com)


⭐ SEE ALSO ⭐

tail (1) β€” you're gonna need her to watch the logs, bestie. they're a duo. πŸ’œ


okay that's the whole page!! stay cool out there (literally), keep your fans spinning, and remember β€” Version 0.6, dated October 20, 2011. yes she's an elder but she's still iconic, we love a vintage queen πŸ‘‘πŸ’–βœ¨