Overclocking Jetson Nano's CPU and GPU

Hello, is it possible to overclock the CPU and GPU of that board to any extent? I tried experimenting with it through the linux files in /dev (and nvpmodel/jetson_clocks) but couldn’t change the max CPU clock above 1.428 GHz.
Any ideas if it’s possible, or is the kernel locked? Using the default Ubuntu image nvidia provides for the board.

Hi c5439374, the available clocks in L4T include the maximums, and it isn’t possible to exceed these. You can obtain the maximum performance by running these commands:

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

Hello, thanks for the answer. Is this not possible even with a custom kernel? Is it a hardware lock?

Custom clocks outside of the specified range aren’t configurable by the user, even with custom kernel. The maximum stable frequencies are already unlocked. For more info, see this topic:

https://devtalk.nvidia.com/default/topic/1008034/jetson-tx1/dvfs-/

I need more information please. The maximum clock speed isn’t 1.5GHz. it’s 2.0 on the tegra x1, same cpu. So what makes 1.5 the max clock speed here? And why could I not create a custom kernel to increase cpu? It doesn’t seem the cores are at max clock speed or max power, and 1.5ghz is a bit on the light side, more would help tremendously. I understand this is going outside the scope of general support, but I’d like a detailed answer as to why this is not possible? Asus said this about their tinkerboard, and I got it up from 1.8 to 2.1 without instability. That being said I’m familiar with the process of needing to determine max power provided to cpu vs max allowable and working out the math to add the additional clock speeds inside that power range. The only thing I can think is the gpu is powerful and required a downclock to the cpu. But can I not resolve that by downclocking the gpu instead of the cpu?

Another thread for the jetson tk1 suggest that overclocking require recompiling the kernel: https://devtalk.nvidia.com/default/topic/939240/jetson-tk1/jetson-tk1-overclock/

I’m no kernel developer, but I’ve downloaded the kernel sources for jetson nano (using JetPack) and one of the files that caught my attention was Linux_for_Tegra/sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-cpufreq.dtsi. This file apparently contains a list of all available frequencies for the tegra:

/ {
	cpufreq {
		compatible = "nvidia,tegra210-cpufreq";
		cpu-scaling-data {
			freq-table = <
				102000
				204000
				307200
				403200
				518400
				614400
				710400
				825600
				921600
				1036800
				1132800
				1224000
				1326000
				1428000
				1479000
				1530000
				1632000
				1734000
				1836000
				1912500
				2014500
			>;
			preserve-across-suspend;
		};

These frequencies are what you see in jetson nano when you type in the terminal:

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

Except that all frequencies after 1479000 are missing. Another file (Linux_for_Tegra/sources/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dts) contains this line:

nvidia,dfll-max-freq-khz = <1479000>;

This is exactly the max cpu frequency displayed in the scaling_available_frequencies list. Maybe unlocking the additional frequencies is simply a matter of recompiling the kernel with the proper max frequency set in the kernel sources?

I’ve added a fan to my jetson nano and did a bunch of stress tests, and it seems 1.479 ghz is barely enough to make the fan spin. In fact, I only managed to make the fan spin by using jetson_clocks command which starts the fan regardless of SOC temperature. Apparently the nano has enough room for higher frequencies.

1 Like

tarruda,

Did you end up recompiling the kernel with the higher frequencies? What were the results of that?

There’s definitely overclocking potential, I managed to get 2 GHz on CPU and 1 GHz on GPU (5V 8A power supply and using a fan) which appears stable for now. Attached kernel patch I used.

0001-Overclock-CPU-to-2-GHz-GPU-to-1-GHz.patch.txt (3.9 KB)

1 Like

Was able to squeeze a bit more: 2.2 GHz on CPU and 1.15 GHz on GPU (remove the txt from attachments).

Use at your own risk.

Kernel patch: 0001-Enable-2.2-GHz-on-CPU-and-1.15-GHz-on-GPU.patch.txt (4.8 KB)
DTB (changed files only): tegra210-porg-cpufreq.dtsi.txt (1.1 KB) tegra210-porg-p3448-common.dtsi.txt (20.7 KB)

Changes in DTB are removing of the max specified frequencies and adding 2.2 GHz to cpufreq frequencies.

1 Like

@skrilax I tried you patch for 2,0ghz working ok but the patch for 2,2ghz only detected 2,014 max speed also change the changes in DTB the max scaling only set detected 2014500 ¿What I Miss with this?
Thanks .

I’m guessing you forgot to update the DTB and add 2.2 GHz in “tegra210-porg-cpufreq.dtsi” and add “2218500” to the list? Would suggest checking what available frequencies is saying in cpufreq as well (should see 2218500 as the max).

I tried this patch, and indeed it works - however i found it to be unstable. My workload makes heavy usage of the CPU and GPU, and i am experiencing frequent crashes. Situation improved when i reduced the board power usage by disconnecting some USB devices, but crashes continued when i started writing to M.2 SSD. I am using production module with Auvidea JN30B carrier board powered over PoE.

Maybe this is just a power issue - but anyways -clearly- this is not a low hanging fruit!
Today it makes more sense to just migrate to the Xavier…

I’m trying it on the B01 dev kit and don’t have stability issues (not using power hungry USB devices though) and have SATA SSD drive connected via PCI-E to SATA adapter.

I’d actually be a little more careful with using it on 3rd-party / custom boards with production module (you’d typically find power management to have excess capacity on dev kits). Also, I believe PoE supplies around 15W max which is not enough for OC’d Nano (won’t be enough for Xavier NX either).

Sorry i was unclear, actually power is over PoE+(30W). We are drawing additional 10W from the carrier board, so the total power usage is around 20W.
Also, thanks for providing the patch - it was quite a fun experiment :)

@skrilax I applied this

and changes dts

but scaling_available_frequencies in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies max is 2014500

wow, more than 30% more performance - but how do i apply those patches?

ok,
build the kernel image with make / make install and copy it to its location /boot/Image
just tested 2 GHz and seems stable so far

I had no problem applying any frequency above 2 GHz if I updated the cpufreq entry under devtree with that frequency when testing what works (DVFS would under the specified voltage limit scale up to 2.2 GHz max).

well done…
I’m curious to rerun Deep Learning Inference Benchmarks
to see how much they improve…
perhaps you could also optimize frequency of the ddr

Could you clarify? I’m not exactly sure which files/directories you mean and how specifically to modify them…
I’m new to Linux in general(lots of time spent overclocking windows machines)

I could gather data on reasonable limits/constraints and compile it all if I can figure this out…