How to set up fan configuration?

Hi:

hardware: DevelopKit/Custom board

software version: JetPack5.1.3/JetPack5.1.5

Here is /etc/nvfancontrol.conf:

root@tegra-ubuntu:/etc# vi nvfancontrol.conf 
root@tegra-ubuntu:/etc# cat nvfancontrol.conf 
#
# Copyright (c) 2022, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#

POLLING_INTERVAL 2

<FAN 1>
	TMARGIN ENABLED
	FAN_GOVERNOR cont {
		STEP_SIZE 10
	}
	FAN_CONTROL close_loop {
		RPM_TOLERANCE 100
	}
	FAN_PROFILE quiet {
		#TEMP 	HYST	PWM	RPM
		0	0	255	6000
		10	0	255	6000
		11	0	187	4000
		31	0	187	7000
		70	0 	255	10000
		105	0 	0 	0
	}
	FAN_PROFILE cool {
		#TEMP 	HYST	PWM	RPM
		0	0	255	6000
		35	0	255	6000
		70	0 	0	0
		105	0 	0 	0
	}
	THERMAL_GROUP 0 {
		GROUP_MAX_TEMP 105
		#Thermal-Zone Coeffs Max-Temp
		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

I want to set the fan speed to 10000 after one of the CPU/GPU temperatures exceeds 70 ° C. When running according to the configuration file above, I found the following problem:

  1. After the GPU temperature rises, the fan does not increase its speed.
  2. After the CPU exceeds 70 ° C, the fan does not run at maximum speed. After restarting the device, the fan runs at maximum speed.

How should I set up the fan configuration?

*** Please note that this reply is generated by LLM automatically ***

To set up the fan configuration on your Jetson Orin NX device, you need to modify the nvfancontrol.conf file. The file is located at /etc/nvfancontrol.conf.

First, you need to understand the basic elements of the nvfancontrol service, which include:

  1. Tmargin: This is the temperature margin that determines when the fan speed should be increased or decreased.
  2. Kickstart PWM: This is the initial PWM value that is applied to the fan when it is started.
  3. Fan profile: This is the temperature-to-fan-speed mapping table that determines the fan speed based on the temperature.
  4. Fan control: This is the mechanism that controls the fan speed based on the temperature.
  5. Fan governor: This is the algorithm that determines the fan speed based on the temperature.

To set the fan speed to 10000 after one of the CPU/GPU temperatures exceeds 70°C, you need to modify the fan profile in the nvfancontrol.conf file.

Here is an example of how you can modify the fan profile:

[Fan Profile]
Temp=0, PWM=0
Temp=50, PWM=50
Temp=60, PWM=70
Temp=70, PWM=100
Temp=80, PWM=10000

In this example, the fan speed will be increased to 10000 when the temperature exceeds 70°C.

You also need to make sure that the nvfancontrol service is enabled and running. You can check the status of the service using the following command:

sudo systemctl status nvfancontrol

If the service is not running, you can start it using the following command:

sudo systemctl start nvfancontrol

You also need to make sure that the nvfancontrol service is configured to start automatically on boot. You can do this by running the following command:

sudo systemctl enable nvfancontrol

After modifying the nvfancontrol.conf file and restarting the nvfancontrol service, you should see the fan speed increase to 10000 when the temperature exceeds 70°C.

Regarding the issues you encountered:

  1. After the GPU temperature rises, the fan does not increase its speed: This could be due to the fact that the nvfancontrol service is not configured to monitor the GPU temperature. You need to make sure that the nvfancontrol service is configured to monitor the GPU temperature and adjust the fan speed accordingly.
  2. After the CPU exceeds 70°C, the fan does not run at maximum speed: This could be due to the fact that the fan profile is not configured correctly. You need to make sure that the fan profile is configured to increase the fan speed to 10000 when the temperature exceeds 70°C.
  3. After restarting the device, the fan runs at maximum speed: This could be due to the fact that the nvfancontrol service is not configured to start automatically on boot. You need to make sure that the nvfancontrol service is configured to start automatically on boot and that the fan profile is configured correctly.

In summary, to set up the fan configuration on your Jetson Orin NX device, you need to modify the nvfancontrol.conf file to configure the fan profile, enable and start the nvfancontrol service, and configure the service to start automatically on boot.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

hello jack.yan,

it looks something wrong with your settings.

please refer to Fan Profile Table for the TMARGIN.
TMARGIN is the temperature the difference between the maximum allowable temperature and the current thermal zone temperature.
according to developer guide,
if the maximum allowable temperature of CPU-therm is 105 degree Celsius, and the current temperature of CPU-therm is 45 degree Celsius, the current TMARGIN temperature of CPU-therm is 60 degree Celsius (105 - 45), and, here’s the settings for 60 degree Celsius.

FAN_PROFILE cool {
        #TEMP   HYST    PWM     RPM
        60      0       66      750

Hi, JerryChang:

Thank for your reply.

Reference document description,Modify config file:


POLLING_INTERVAL 2

<FAN 1>
	TMARGIN ENABLED
	FAN_GOVERNOR cont {
		STEP_SIZE 10
	}
	FAN_CONTROL close_loop {
		RPM_TOLERANCE 100
	}
	FAN_PROFILE quiet {
		#TEMP 	HYST	PWM	RPM
		0	0	255	10000
		20	0	255	10000
		35	0 	255	8000
		55	0	187	6000
		70	0	187	4000
		105	0 	0 	0
	}
	FAN_PROFILE cool {
		#TEMP 	HYST	PWM	RPM
		0	0	255	10000
		20	0	255	10000
		35	0	255	8000
		55	0	255	8000
		70	0	187	6000
		105	0 	0 	0
	}
	THERMAL_GROUP 0 {
		GROUP_MAX_TEMP 105
		#Thermal-Zone Coeffs Max-Temp
		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

The function I hope to achieve is to set the fan speed to 8000 when one of the CPU/GPU temperatures exceeds 70 ° C, and to 10000 when the CPU/GPU temperature exceeds 85 ° C. Can my configuration be fully implemented?

hello jack.yan,

ideally yes, but.. 8000 or even 10000 were such high fan speed, you may double check your fan device support that.