Can't set Max Power mode with Jetson Orin AGX Devkit

Hi Balena team,

This device has the following power models available:

root@8f87931:~# nvpmodel --verbose --parse | grep POWER_MODEL
NVPM VERB: POWER_MODEL: ID=0 NAME=MAXN
NVPM VERB: POWER_MODEL: ID=1 NAME=MODE_15W
NVPM VERB: POWER_MODEL: ID=2 NAME=MODE_30W
NVPM VERB: POWER_MODEL: ID=3 NAME=MODE_50W

However when we try to switch the Power Model we get the following error (the same happens for mode 0 (MAXN)):

root@8f87931:~# nvpmodel -m 3
NVPM ERROR: Error writing 0 to /sys/devices/gpu.0/tpc_pg_mask: 19
NVPM WARN: Reboot required for changing to this power mode: 3
NVPM WARN: DO YOU WANT TO REBOOT NOW? enter YES/yes to confirm:

The changes are not applied in /sys/devices/gpu.0/tpc_pg_mask so the previously selected Power Model will not be used after reboot.

root@8f87931:~# ls -lah /sys/devices/gpu.0/tpc_pg_mask
-rwxr--r-- 1 root root 4.0K Feb 28 03:00 /sys/devices/gpu.0/tpc_pg_mask

root@8f87931:~# cat /sys/devices/gpu.0/tpc_pg_mask
240

Hi @rmpt, what you are describing seems similar to this question nvpmodel default mode - #3 by waterbear - Jetson AGX Xavier - NVIDIA Developer Forums and I’ve noticed that if the path /etc/ in the rootfs is writable, some power model transitions get applied with nvpmodel -m without needing a restart.

So, if you want your device to start with a specific power model at boot time you can do the following steps in the Host:

root@ab0702b:~# mount -o remount,rw /
root@ab0702b:~# vi /etc/nvpmodel.conf

scroll down to the end of the file and set PM_CONFIG_DEFAULT to the default power model you want to be used on startup:

# mandatory section to configure the default power mode
< PM_CONFIG DEFAULT=2 >  

and then sync && reboot to confirm the power model was applied.

1 Like

Is there a way to make this change as post boot configuration change? For Xavier NX the max mode is 8 and Orin AGX and Orin NX it is 3 so need to add some logic to set this properly based on build or device time boot.