Hi,
I am trying to use the API that Jetson has provided to control the CPU and GPU frequency of TX2 to work at a static frequency.
$ sudo echo <cpu_freq> > /sys/devices/system/cpu/cpu/cpufreq/scaling_min_freq
$ sudo echo <cpu_freq> > /sys/devices/system/cpu/cpu/cpufreq/scaling_max_freq
$ sudo echo <gpu_freq> > /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/min_freq
$ sudo echo <gpu_freq> > /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/max_freq
However, when I tested it, the CPU and GPU frequency seems cannot be set to all arbitrary values. For example, I can find a lot of material related to the maximum CPU and GPU frequency, but there’s no too much information related to the minimum CPU and GPU frequency. I see this question and know that the minimum GPU frequency is 114MHZ.
https://forums.developer.nvidia.com/t/what-is-the-minimum-gpus-clock-frequency-for-all-the-nvpmodel-modes/157934
Is that the real minimum value we can set through the API that I showed before?
Also, I tried to set the CPU frequency by myself and found the minimum value I can get is 345600 kHz
And after I set the CPU frequency to a static value and check the results using ‘nvpmodel -q --verbose’, I found that the maximum CPU frequency is not always what I have set. For example, if I try to set both the minimum and maximum value to be 500000KHz, I got the minimum frequency = 500000KHz, but the maximum frequency is 652800KHz.
One more thing is that if we try to change the static frequency to another static value, the order is important.
For example: if I try to increase the GPU frequency from 1000MHz to 1200MHz, then I need to increase the maximum frequency first and then the minimum frequency.
If I try to decrease the GPU frequency from 1200MHz to 1000MHz, then I need to decrease the minimum frequency first and then the maximum frequency.
Is this normal and we need to handle the order by ourselves?
The last point: Currently I have to use sudo to change the CPU&GPU frequency, is it possible that we get rid of sudo privilege?
Looking forward to your reply!
Thanks