Testing the RT Kernel and Troubleshooting RT Kernel Package Dependencies on Orin NX 8GB (Jetpack 6.2, L4T 36.4)

Good afternoon everyone

Config:

  • Jetpack 6.2
  • Orin Nano NX 8GB @ 20W
  • R36.4
  • PREEMPT_RT

I have one question further down the post, I’ll send my updates on flashing my board with RT-Kernel and some tests. My question is related to the naming of the debian that we populate our rootfs using ./apply_binaries.sh .

When doing the OTA you would do:

sudo apt install nvidia-l4t-rt-kernel nvidia-l4t-rt-kernel-headers nvidia-l4t-rt-kernel-oot-modules nvidia-l4t-display-rt-kernel

But since i’m working on a custom kernel build to be able to flash on NVMe i can’t use the OTA.

I folowed the steps for the custom RT Kernel. Both kernel build and board flashing were successful, and my system is running in RT mode as verified by:

$ cat /sys/kernel/realtime
1
$ uname -r
5.15.148-rt-tegra
$ zcat /proc/config.gz | grep PREEMPT_RT
CONFIG_PREEMPT_RT=y
$ zcat /proc/config.gz | grep CONFIG_HZ
# CONFIG_HZ_PERIODIC is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250

Yes, I left it on 250 Hz, no 1000Hz ticks for now.

Tests with Cyclictest

Under stress and with jetson_clocks activated, 20W (@ 6cores).

For those wondering the script to create the image was:
"mklatencyplot.bash "

sudo /usr/bin/jetson_clocks
stress-ng --cpu 4 --io 2 --vm 1 --vm-bytes 1G --timeout 60s
# Then run the script which has this inside: 
cyclictest -l60000 -m -Sp90 -i5000 -h1000 -q >output 

The Issue

I’m encountering dependency errors when installing a custom Debian package that depends on either nvidia-l4t-kernel or nvidia-l4t-rt-kernel. I use this .deb as a check to confirm if the RT kernel is installed.

Currently, after flashing, the package manager shows:

$ apt list nvidia-l4t-kernel
nvidia-l4t-kernel/stable,now 5.15.148-tegra-36.4.3-20250107174145 arm64 [installed]
$ apt list nvidia-l4t-rt-kernel
Listing... Done

So, only nvidia-l4t-kernel is installed and recognized, not nvidia-l4t-rt-kernel, which makes sense since I did not rename it.

My Questions

  • What changes are needed in the Debian package names or in the apply_binaries.sh process to rename the RT kernel package to (nvidia-l4t-rt-kernel)
  • Is it normal that on a 5 minutes test (60k samples over 200Hz) i got a maximum latency of 358 us? I’ll reflash on a normal Jetpack 6.2 and see the difference under the same test.
  • Is there any test for me to know that everything went down properly?

Hi,
Please not to run apply_binaries.sh after you have the customized kernel. The script is only execute while preparing required files under Linux_for_Tegra.

You may refer to

Jetson/L4T/r36.4.x patches - eLinux.org
[Jetpack 6.1/r36.4.0] Self-built kernel is overwritten after sudo apt update && sudo apt upgrade
Enable RT kernel and CONFIG_HZ_1000

Hi @DaneLLL

I did run ./apply_binaries.sh before doing my customization.

It’s more about the naming of the debian package than anything else, and from the references that you send I just discovered another potential issue that could emerge with apt update && apt upgrade thanks for that.

Which leads to my question again, shouldn’t we have some way to change the debian package names to a customized one when we customize the kernel, this way even the apt update && apt upgrade would be solved too.

The rest of the post was just to create a forum post to other developers to have a reference.

:)

Hi,
The proposal is for example, nvidia-l4t-kernel can be separated to nvidia-l4t-kernel-r36.4.0 and nvidia-l4t-kernel-r36.4.3. Is this understanding correct?

Hello,

The proposal is: when flashing a board with a kernel customization, to be able to change the .deb names (have a script to do that).

nvidia-l4t-<custom>-kernel
nvidia-l4t-<custom>-kernel-headers
nvidia-l4t-<custom>-kernel-oot-modules
nvidia-l4t-display-<custom>-kernel

This would avoid the need for the apt-mark hold, and also in my case I would be able to create my other debians that depend on this custom kernel to work.

The proposal that you gave could be useful in other situations, but for me I wanted to know how to customize those names with a custom tag to say that it’s custom, and if that is possible at all.

Thanks for your time.

Adding to the post, same test under 5min. but now we see a much higher max time of 2.1ms when flashed on non-rt (this time under 15W just saw that i had 4 cores).