TX2, error when max out the clock frequencies: n command: -max, please try again or see --help

Below command is provided by nvidia l4t documents.

To max out the clock frequencies
•On the target, execute the following command:
sudo /home/ubuntu/tegrastats -max
which forces all runtime-modifiable clock frequencies to their maximum values. When run this way, tegrastats quits immediately after setting the clocks.

However I failed to run it on my machine, the error message is:
n command: -max, please try again or see --help

Any idea about this?

BTW, sudo /home/ubuntu/tegrastats is totally good, I can see correct status, just argument “-max” doesn’t work.

Thanks in advance!

Hi heyworld, to max out the clocks, please run jetson_clocks script like so:

$ sudo ~/jetson_clocks.sh

Alternatively, you can use the nvpmodel tool.

Additional note: it is not obvious how nvpmodel and jetson_clocks interact.

jeston_clocks.sh boosts the clocks for you current config, that depends on last nvpmodel selected.

nvpmodel tries to use a preset of online cores / clocks for optimizing performance/power on different profiles (you may check the details in /etc/nvpmodel.conf).

The bad thing (at least on R28.2-DP) is that if you are running high speed clocks and then select a low power mode with nvpmodel, it can fail. For example, if I select MAXN mode and boost clocks (max performance), then it fails to properly switch to MAXP_CORE_DENVER mode:

sudo nvpmodel -m0
sudo ./jetson_clocks.sh 

sudo nvpmodel -m4
NVPM WARN: write PARAM GPU: ARG MAX_FREQ: PATH: /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/max_freq VAL: 1134750000
	- probably failed due to it is less than current min value 1300500000
NVPM ERROR: Error writing to /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/max_freq: 22
NVPM ERROR: failed to write PARAM GPU: ARG MAX_FREQ: PATH: /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/max_freq VAL: 1134750000
NVPM ERROR: failed to set power mode!
NVPM ERROR: Failed to exec option requests!

So it is better to store the default (slow) clocks after boot with:

sudo ./jetson_clocks.sh --store

that will save the current config into ~/l4t_dfs.conf and you can restore later with:

sudo ./jetson_clocks.sh --restore

In a similar way, if you change the nvpmodel for a performance mode from low power mode, you may have to relaunch jetson_clocks to get max boost.