linux-on-mac / mbpfan

A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
https://ineed.coffee/projects/mbpfan
GNU General Public License v3.0
875 stars 138 forks source link

Confused by comment in configuration file (`min_fan1_speed` and `max_fan1_speed`) #262

Open whxvd opened 10 months ago

whxvd commented 10 months ago

The default mbpfan.conf contains:

#min_fan1_speed = 2000  # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
#max_fan1_speed = 6200  # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"

Shouldn't it be min_fan_speed and max_fan_speed instead of min_fan1_speed and max_fan1_speed?

whxvd commented 10 months ago

I was confused, because the default mbpfan.conf mentiones https://ineed.coffee/post/a-beginners-tutorial-for-mbpfan-under-ubuntu, which uses the names without numbers, and because the advice in the default mbpfan.conf ("put the ... value of "cat /sys/devices/platform/applesmc.768/fan*_...") makes most sense when all fan speeds would be set together.

Another problem is, that the daemon does not give an error message, when the configuration file uses an unsupported name. E.g., I can write a line troet = 23 in it, restart the service, and the logs says nothing. So that could not be used to disambiguate.

However, for now I assume it is as the other comments in the default configuration file say: Every fan is set individually, and there is no min/max setting for all fans at once (anymore). I now just use the defaults from the SMC, i.e., no explicit setting.

HackerPide commented 10 months ago

The default mbpfan.conf contains:

#min_fan1_speed = 2000    # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
#max_fan1_speed = 6200    # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"

Shouldn't it be min_fan_speed and max_fan_speed instead of min_fan1_speed and max_fan1_speed?

That seems to be the case. My mbpfan service fails to run with the numbers in the variable names but works as expected without them.