Jetpack 5.1.2 (L4T 35.4.1) pwm-fan attributes missing

Related to Read Xavier Fan Speed on Jetpack 5.1

Several of the previously available pwm-fan attributes are no longer present, JP 4.6 vs JP 5.1 outputs below.

Have these attributes been depreciated / moved, if so can someone please let me know how to retrieve similar information?

JP 4.6 L4T 34.6.1

test@linux:~$ find /sys/devices -name '*pwm*'
/sys/devices/generic_pwm_tachometer
...
/sys/devices/pwm-fan
/sys/devices/pwm-fan/target_pwm
/sys/devices/pwm-fan/pwm_cap
/sys/devices/pwm-fan/hwmon/hwmon2/target_pwm
/sys/devices/pwm-fan/hwmon/hwmon2/pwm_cap
/sys/devices/pwm-fan/hwmon/hwmon2/cur_pwm
/sys/devices/pwm-fan/hwmon/hwmon2/pwm_rpm_table
/sys/devices/pwm-fan/hwmon/hwmon2/pwm_state_map
/sys/devices/pwm-fan/cur_pwm
/sys/devices/pwm-fan/pwm_rpm_table
/sys/devices/pwm-fan/pwm_state_map
...

JP 5.1.2 L4T 35.4.1

test@edgeai-ts1:~$ find /sys/devices -name '*pwm*'
/sys/devices/platform/39c0000.tachometer/pwm
/sys/devices/platform/39c0000.tachometer/pwm/pwmchip5
/sys/devices/platform/39c0000.tachometer/pwm/pwmchip5/npwm
/sys/devices/platform/3280000.pwm
/sys/devices/platform/3280000.pwm/pwm
/sys/devices/platform/3280000.pwm/pwm/pwmchip0
/sys/devices/platform/3280000.pwm/pwm/pwmchip0/npwm
/sys/devices/platform/32d0000.pwm
/sys/devices/platform/32d0000.pwm/pwm
/sys/devices/platform/32d0000.pwm/pwm/pwmchip3
/sys/devices/platform/32d0000.pwm/pwm/pwmchip3/npwm
/sys/devices/platform/32d0000.pwm/consumer:platform:pwm-fan
/sys/devices/platform/c340000.pwm
/sys/devices/platform/c340000.pwm/pwm
/sys/devices/platform/c340000.pwm/pwm/pwmchip1
/sys/devices/platform/c340000.pwm/pwm/pwmchip1/npwm
/sys/devices/platform/32f0000.pwm
/sys/devices/platform/32f0000.pwm/pwm
/sys/devices/platform/32f0000.pwm/pwm/pwmchip4
/sys/devices/platform/32f0000.pwm/pwm/pwmchip4/npwm
/sys/devices/platform/pwm-fan
/sys/devices/platform/pwm-fan/supplier:platform:32d0000.pwm
/sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1
/sys/devices/platform/32c0000.pwm
/sys/devices/platform/32c0000.pwm/pwm
/sys/devices/platform/32c0000.pwm/pwm/pwmchip2
/sys/devices/platform/32c0000.pwm/pwm/pwmchip2/npwm
/sys/devices/virtual/devlink/platform:32d0000.pwm--platform:pwm-fan

(additional info requested in the ‘related’ ticket)

test@edgeai-ts1:~$ ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon0 -> ../../devices/virtual/thermal/thermal_zone5/hwmon0
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon1 -> ../../devices/platform/d280000.soctherm-oc-event/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon2 -> ../../devices/platform/39c0000.tachometer/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon3 -> ../../devices/platform/3520000.xusb_padctl/usb2-0/3520000.xusb_padctl:ports:usb2-0:connector/power_supply/usb-charger/hwmon3
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon4 -> ../../devices/platform/pwm-fan/hwmon/hwmon4
lrwxrwxrwx 1 root root 0 Nov  1 12:08 hwmon5 -> ../../devices/platform/c250000.i2c/i2c-7/7-0040/hwmon/hwmon5

Hi VenomousWyvern241,

Are you using the devkit or custom board for AGX Xavier?

This is used to get the rpm of the fan.

It is used to configure the pwm for the fan.

Hi KevinFFF,

Thank you for responding so quickly.

It is a custom board containing the AGX Xavier.

hwmon2 is not reporting correctly though - I can see the fan is spinning, but it reports 0?

test@edgeai-ts1:~$ cat /sys/devices/platform/39c0000.tachometer/hwmon/hwmon2/
device/    name       of_node/   power/     rpm        subsystem/ uevent    
test@edgeai-ts1:~$ cat /sys/devices/platform/39c0000.tachometer/hwmon/hwmon2/name 
pwm_tach
test@edgeai-ts1:~$ cat /sys/devices/platform/39c0000.tachometer/hwmon/hwmon2/rpm 
0

Thats the reason we were using the other values - specifically curr_pwm, but alsorpm_measured, tach_enable that all used to exist in 4.6 under /sys/devices/pwm-fan/hwmon/hwmon2/ (derived from this post Read the PWM fan RPM in Jetson NX).

Edit: probably relevant to note that I have the fan set on ‘quiet’ mode not ‘cool’.

Hello KevinFFF,

Thank you! With your comments, I was able to figure out what I needed for testing/verifying the fan speeds:

(first way)

$ cat /sys/devices/platform/pwm-fan/hwmon/hwmon4/power/control                                                                           
auto   
// Switch to manual fan control.
$ sudo bash -c 'echo on >/sys/devices/platform/pwm-fan/hwmon/hwmon4/power/control'
// Set fan speed to max (pwm).
$ sudo bash -c 'echo 255 >/sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1'
// Verify fan speed (pwm).
$ cat /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 
255
// Verify rpm.
$ cat /sys/devices/platform/39c0000.tachometer/hwmon/hwmon2/rpm   
6214

(second way)

// Set fan speed to max (pwm).
$ sudo jetson_clocks --fan        
// Verify fan speed (pwn).                                                                                                       
$ cat /sys/devices/platform/pwm-fan/hwmon/hwmon4/pwm1 
255
// Verify rpm.
$ cat /sys/devices/platform/39c0000.tachometer/hwmon/hwmon2/rpm                                                                          
6199      
1 Like

Maybe you could disable the nvfancontrol service before configure the pwm for fan manually.

$ systemctl stop nvfancontrol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.