#
92f9f3c8 |
| 06-Nov-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set to 80%, when "DIMM0" sensor failed, since there is no "FailSafePercent" setting in config, so set to zone's FailSafePercent 100%. ``` { "Class": "temp", ... ... ... "Inputs": [ "Die CPU0" ], "Name": "CPU0 PID", "FailSafePercent": 80.0, ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "Class": "temp", ... ... ... "Inputs": [ "DIMM[0-9]", "DIMM1[0-5]" ], "Name": "DIMM CPU0 PID", ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "FailSafePercent": 100.0, "MinThermalOutput": 0.0, "Name": "Zone 0", "Type": "Pid.Zone", "ZoneIndex": 0 }, ```
Tested: If zone1 and zone2 into failsafe duty 40% => fan0_pwm | 1Dh | ok | 29.0 | 24.70 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 24.70 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 39.98 unspecifi fan5_pwm | 22h | ok | 29.5 | 39.98 unspecifi
cpu0_nbm | 48h | ok | 7.79 | 36 degrees C
Let cpu0_nbm(zone0 and zone2) into failsafe which set failsafe duty as 100% => fan0_pwm | 1Dh | ok | 29.0 | 99.96 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 99.96 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 99.96 unspecifi fan5_pwm | 22h | ok | 29.5 | 99.96 unspecifi
cpu0_nbm | 48h | ns | 7.79 | No Reading
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iaf5ffd1853e5cd110a1ef66c7a1fd073bc894dda
show more ...
|
#
b300575e |
| 22-Feb-2022 |
Josh Lehan <krellan@google.com> |
pid/zone: Adding unscaled to cache and logging
The "ReadReturn" structure, and the cache within DbusPidZone, have been widened, to hold both the scaled and the original unscaled values at the same t
pid/zone: Adding unscaled to cache and logging
The "ReadReturn" structure, and the cache within DbusPidZone, have been widened, to hold both the scaled and the original unscaled values at the same time. This allows logging to show both at once, and also clears up confusion/bugs resulting from storing one or the other and losing track of which was which.
Compatibility setValue() and getCachedValue() functions still retained, so this will not break other sensors. These functions still only take a single argument/return, which will be used for both value and unscaled, indicating scaling is unknown or irrelevant to this sensor.
Also, the PWM output of the PID loop appears in the log file, conveniently right alongside the RPM input of the PID loop.
An output cache has been added to the zone interface, and, unlike the input cache, use of it is optional. It is only to help populate the logging, so subclasses are free to ignore it if they want.
Tested: In the logging files, I can see both PWM and RPM, and they are consistent, showing how the PID loop is trying to update the PWM to target the desired RPM.
Example: Here's /tmp/zone_0.log on my system epoch_ms,setpt,fan0_tach,fan0_tach_raw,fan0_tach_pwm,fan0_tach_pwm_raw,bmcmargin_zone0,bmcmargin_zone0_raw,thermal_zone0,thermal_zone0_raw,failsafe 3097918,3818.42,0.748267,11224,0,0,0.724753,56.812,0.745098,62,0 3098022,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0 3098132,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0
Here's what we can now learn: The desired setpoint is 3818 RPM. The fan is at 74.8% of scale, which is 11224 RPM. The written PWM, after the first PID loop pass, is a raw value of 67, which is 26.6% of scale. The first margin temperature is 56.8 degrees of margin, which is 72.4% of scale. The second margin temperature is 62 degrees of margin, which is 74.5% of scale. This zone is not in failsafe mode. As you can see, this will be rather useful for PID loop tuning.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I972a4e4a3b787255f0dcafa10d4498ee58b682f0
show more ...
|
#
a4146eb1 |
| 01-Oct-2020 |
Josh Lehan <krellan@google.com> |
pid/zone: Restore PWM when fans returned to auto
This makes use of the improved write() interface, to allow the PID-loop-determined PWM to be restored, when the fan is returned to automatic mode.
W
pid/zone: Restore PWM when fans returned to auto
This makes use of the improved write() interface, to allow the PID-loop-determined PWM to be restored, when the fan is returned to automatic mode.
Without this fix, a fan set to manual mode, then manually set to a different speed, would not properly return to the correct speed, when transitioning back to automatic from manual.
This patch also adds a stub to allow the caller to learn the raw PWM value written as output, another useful write() interface improvement. Although not the topic of this change, it is included here, to avoid later patch conflicts.
Tested: I can now correctly toggle between automatic, and manual, fan control. Upon resuming automatic control, after a few seconds, the fan PWM is now properly restored, to what the PID loop wanted it to be at.
Signed-off-by: Josh Lehan <krellan@google.com> Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I46fc65d6b931755d51093ea475c64cf5e3e6bacb
show more ...
|