Question about thermal management

When I run the jetson_clocks.sh script, it echoes the value 255 into the PWM control register for the on-board fan.
This makes the fan spin at full tilt, even if the CPU and GPU is idle.

I’d like to run at the full clocks, just like the jetson_clocks.sh script sets up, BUT I’d like to only run the fan if the temperature is high enough.

Is there some kind of power governor or thermal/fan driver already loaded, by default, that I can configure to only turn on the fan if the temperature is too high?
If so, where does it live, where is it documented, and how do I enable it?
(Note: I want fan spinning up around 55C or so, to avoid throttling of the GPU/CPU if possible.)

If not, is it enough to write a daemon that looks at the temperature in the /sys/devices/virtual/thermal/thermal_zone*/temp nodes, and sets the PWM based on those values?
How frequently would this need to run? Is 10 times a second enough?

Also, when I check those sensors on the TX2 with the stock devkit carrier board, the PMIC-Die sensor (zone6) always shows 100000, which is a surprisingly precise number, that doesn’t change.
I assume that this is a dummy value, and it is safe to ignore it. Is that correct?

I’ve skimmed through the thermal management document on the downloads section, but it mainly talked about physical interface; I didn’t see any kernel configuration / device documentation. Maybe I missed it?

snarky,

I’d like to run at the full clocks, just like the jetson_clocks.sh script sets up, BUT I’d like to only run the fan if the temperature is high enough.

This can be done once you comment out the do_fan in jetson_clock.sh.

Is there some kind of power governor or thermal/fan driver already loaded, by default, that I can configure to only turn on the fan if the temperature is too high?
If so, where does it live, where is it documented, and how do I enable it?
(Note: I want fan spinning up around 55C or so, to avoid throttling of the GPU/CPU if possible.)

Please use below script with PWD=/sys/class/thermal/thermal_zoneX

for i in cdev*([0-9]); do  trip=`cat ${i}_trip_point`; echo "$i `cat ${i}/type` trip: $trip: `cat trip_point_${trip}_temp` (mC)"; done;

Also, when I check those sensors on the TX2 with the stock devkit carrier board, the PMIC-Die sensor (zone6) always shows 100000, which is a surprisingly precise number, that doesn’t change.
I assume that this is a dummy value, and it is safe to ignore it. Is that correct?

The PMIC doesn’t allow software to read an actual temperature. Software can only read whether various thermal thresholds have been crossed. The first threshold is higher than 100C. So, the PMIC driver assumes temperature is 100C.

I believe this thread can help you.

Thanks for the answer.

Is there some more documentation about how the different “trip points” and temperature measurements actually affect the different “cooling devices”?

Which particular driver or process is responsible for turning the fan up/down, using what mechanism?

Sorry for the late reply. We only have module datasheet and thermal design guide that has some description about the thermal management.

Those drivers are under kernel/t18x/driver/thermal. In fact, we don’t reveal this kind of information too much because it has chances to cause device broken.

Thank you for your answer.

I am commenting out do_fan in the jetson_clocks.sh script, and the module runs without the fan.

I notice in the driver setup that it will accept a fairly high heat before it starts running the fan.

Is there a good way to configure the system to start the fan sooner (say, at 45 or 50 C) at a low duty cycle (say, 30%) and other wise follow the curve that is built-in?

Presumably doing this won’t overheat the module, as it would be running more cooling than the default!

Alternatively: If I set a value into the PWM duty cycle register (say, the value 80,) if the module ever gets very hot, will it increase the duty cycle to something higher than what I wrote into the sysfs? I e, is the sysfs PWM value a “minimum” or an “override” ?

Below values in dts may help adjust fan with corresponding temperature.

active_pwm = <0x0 0x50 0x78 0xa0 0xff 0xff 0xff 0xff 0xff 0xff>;
active_trip_temps = <0x0 0xc738 0xee48 0x11558 0x14050 0x222e0 0x249f0 0x27100 0x29810 0x2bf20>;

Note that the sysfs are override instead of minimum.