nx1.info | Adjusting NVIDIA Jetson Fan settings
The fan configuration file on the NVIDIA Jetson Orin NX is stored in the file:
/etc/nvfancontrol.conf
1. Default Configuration File [^]
By default, this file contains the following:
matoha@orin-nx-1:~$ cat /etc/nvfancontrol.conf
POLLING_INTERVAL 2
<FAN 1>
TMARGIN ENABLED
FAN_GOVERNOR cont {
STEP_SIZE 10
}
FAN_CONTROL close_loop {
RPM_TOLERANCE 100
}
FAN_PROFILE quiet {
0 0 255 6000
10 0 255 6000
11 0 187 4000
31 0 187 4000
70 0 0 0
105 0 0 0
}
FAN_PROFILE cool {
0 0 255 6000
35 0 255 6000
70 0 0 0
105 0 0 0
}
THERMAL_GROUP 0 {
GROUP_MAX_TEMP 105
CPU-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
GPU-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC0-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC1-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC2-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
}
FAN_DEFAULT_CONTROL close_loop
FAN_DEFAULT_PROFILE quiet
FAN_DEFAULT_GOVERNOR cont
KICKSTART_PWM 64
There are two fan profiles defined, "quiet" (which is set as the default in the line):
FAN_DEFAULT_PROFILE quiet
and a "cool" profile, which may be set as the default by modifying the above line.
2. How Fan Profiles Work [^]
The way that these profiles work is not exactly intuitive so read carefully:
The line
TMARGIN ENABLED means that the profiles use thermal margins in their definitions.
The thermal margin is defined as the difference between the maximum temperature and the current temperature:
$$T_{\text{margin}} = T_{\text{max}} - T_{\text{current}}$$
where the maximum temperature is defined in the line:
GROUP_MAX_TEMP 105
What this means is that the first line in both the fan profiles:
0 0 255 6000
Will set the fan speed to 6000 RPM when the thermal margin is 0,
(which corresponds to a current temperature of 105c).
Notice that the second line in the cool profile:
35 0 255 6000
Sets a fan speed of 6000 when there is a thermal margin of 35 or less,
which corresponds to any temperature at or above 70c (105-35=70).
We could in theory just force the fans to always run at full speed by creating and activating the following profile:
FAN_PROFILE full_speed {
0 0 255 6000
105 0 255 6000
}
But this is probably not the best idea as it could wear out the fan faster.
3. How to Change the Fan Profile [^]
Changing the default fan profile requires editing the line containing
FAN_DEFAULT_PROFILE
in
/etc/nvfancontrol.conf using sudo via one's editor of choice: vi, vim, nano, etc...
To change the fan settings and apply the changes, the following sequence of commands should be executed:
> sudo systemctl stop nvfancontrol
> sudo vim /etc/nvfancontrol.conf
> sudo rm -f /var/lib/nvfancontrol/status
> sudo systemctl start nvfancontrol
> sudo nvfancontrol -q
4. PWM Column vs Closed-Loop RPM [^]
In the control file, there is a PWM column (Pulse Width Modulation).
This is an alternative means of defining the fan speed and specifies
the speed as a percentage (0-100%) but is defined using an 8 bit integer (0-255).
However since
FAN_CONTROL close_loop is enabled, nvfancontrol will preferentially use
the RPM column. (If open_loop mode was enabled then the PWM column would be used).
5. Thermal Sensors & Group Prioritization [^]
Multiple temperature sensors exist in the Jetson's hardware:
CPU-therm, GPU-therm, SOC0-therm, SOC1-therm, SOC2-therm.
Since all these sensors have been defined in the
THERMAL_GROUP 0 using the same
parameters, nvfancontrol will simply govern the fan control based on whichever sensor
is running the hottest (has the lowest margin).
THERMAL_GROUP 0 {
GROUP_MAX_TEMP 105
CPU-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
GPU-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC0-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC1-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
SOC2-therm 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0
}
6. Temporarily Force Max Fan Speed [^]
To force full fan speed:
> sudo jetson_clocks --fan
To restore:
> sudo jetson_clocks --restore