From bd2a9352332e73b4cf6c59840e278ee94049f511 Mon Sep 17 00:00:00 2001 From: everbarry Date: Thu, 18 Dec 2025 00:54:35 +0100 Subject: [PATCH] update readme --- README.org | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index b7974ee..fe7173f 100644 --- a/README.org +++ b/README.org @@ -5,20 +5,29 @@ #TODO * Workings -This project works by setting the following dtparams in =/boot/firmware/config.txt=. Settings require reboot to work. -#+begin_src txt -[all] -dtparam=fan_temp0=55000,fan_temp0_hyst=2000,fan_temp0_speed=90 -dtparam=fan_temp1=65000,fan_temp1_hyst=3000,fan_temp1_speed=160 -dtparam=fan_temp2=70000,fan_temp2_hyst=4000,fan_temp2_speed=200 -dtparam=fan_temp3=72000,fan_temp3_hyst=5000,fan_temp3_speed=255 -#+end_src +This project's backend works by setting the following dtparams in =/boot/firmware/config.txt=. Settings require reboot to work. +The RaspberryPi 5 firmware supports up to 4 different [[https://github.com/raspberrypi/firmware/blob/4aa2a51fecb99ce16fe591391f6779174b9b5bea/boot/overlays/README#L271][thresholds]]. +The backend validates the new config and only if valid it writes it to disk. +Each threshold is defined by: 1. *fan_tempN*: temperature fan activates at in millicelsius 2. *fan_tempN_hyst*: fan turns off (or to lower setting) when temperature is =fan_tempN - fan_tempN_hyst=. Also in millicelsius 3. *fan_tempN_speed*: fan speed in range [0, 255] where 255 is 100% fan speed -The RaspberryPi 5 firmware supports up to 4 different [[https://github.com/raspberrypi/firmware/blob/4aa2a51fecb99ce16fe591391f6779174b9b5bea/boot/overlays/README#L271][thresholds]]. + +An example of the additions to your =/boot/firmware/config.txt:= +#+begin_src diff +[all] + ++ # Auto-Generated Fan Curve parameters by PiFanUI ++ dtparam=fan_temp0=55000,fan_temp0_hyst=2000,fan_temp0_speed=90 ++ dtparam=fan_temp1=65000,fan_temp1_hyst=3000,fan_temp1_speed=160 ++ dtparam=fan_temp2=70000,fan_temp2_hyst=4000,fan_temp2_speed=200 ++ dtparam=fan_temp3=72000,fan_temp3_hyst=5000,fan_temp3_speed=255 +#+end_src + + +** Defaults The following are the default values used by the firmware: #+begin_src txt fan_temp0 Temperature threshold (in millicelcius) for