Nvidia_kernel_display_driver_source.tbz2 not support real-time kernels

I want to recompile the nvidia_kernel_display_driver_source code to support the real-time kernel.
I have executed the ‘./kernel-5.10/scripts/rt-patch.sh apply-patches’ command to apply the rt-patch.
When I recompile the nvidia_kernel_display_driver_source code in orin, the following error is generated

Because I used rt-patch, now it can’t be displayed properly。
How should this problem be solved?

We don’t see other topics reporting issues about rt kernel patch. Could you share your steps for reference?

Hi 417383384,

We can’t reproduce your issue on r35.1 public sources.
Share our steps for you reference:

export kernel_out=/home/carol/Desktop/JEP/R35.1_Build/out-0920-RTPatch
export CROSS_COMPILE_AARCH64_PATH=~/Desktop/JEP/CROSS_COMPILE/Toolchain_gcc_9.3/
export CROSS_COMPILE_AARCH64=~/Desktop/JEP/CROSS_COMPILE/Toolchain_gcc_9.3/bin/aarch64-buildroot-linux-gnu-
cd ../Linux_for_Tegra/source/public/kernel/kernel-5.10/
sudo ./scripts/rt-patch.sh apply-patches
./nvbuild.sh -o $kernel_out 
cd out-0920-RTPatch/arch/arm64/boot
scp Image to Orin and replace /boot/Image

After reboot and check:

$ uname -a
Linux tegra-ubuntu 5.10.104-rt63-tegra #1 SMP PREEMPT RT Tue Sep 20 10:28:05 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

I have performed these operations and rt-patch has compiled successfully.
However, after replacing Image with /boot/Image, HDMI is not displayed properly, nvidia.ko related module files are not loaded, so I need to recompile the nvidia_kernel_display_driver_source code,Then an error is generated.

So it is an issue specific to your custom board? Since there is no HDMI out on Orin developer kit.

yes,my custom board,
But the display needs to load the nvidia.ko and nvidia-modest.ko files, after using rt-patch, nvidia.ko and nvidia-modest.ko will show loading failure,Need to recompile the nvidia.ko file corresponding to the real-time kernel,
If the nvidia_kernel_display_driver_source code is recompiled successfully, the corresponding nvidia.ko will be generated, but now the error indicates that the real-time kernel is not supported.

I may have the same problem. After i applied the rt-patch, kernel version became 5.10.104-rt63-tegra, but lsmod got nothing. Before i applied the rt-patch, lsmod was normal.

Hi carolyuu, the following steps are for me to apply the rt patch. Can you help me confirm whether there is a problem. I don’t know why lsmod got nothing, Thank you.

  1. Apply RT patch
    ./kernel-5.10/scripts/rt-patch.sh apply-patches

  2. rebuild and full flash

export ARCH=arm64
export LOCALVERSION=-tegra
export CROSS_COMPILE=~/local/nvidia/orin/toolchain/aarch64–glibc–stable-final/bin/aarch64-buildroot-linux-gnu-
export TEGRA_TOP=~/l4t
export TEGRA_KERNEL_OUT=~/l4t/kernel_out

make CROSS_COMPILE=${CROSS_COMPILE} O=${TEGRA_KERNEL_OUT} -j$(nproc) defconfig
make CROSS_COMPILE=${CROSS_COMPILE} O=${TEGRA_KERNEL_OUT} -j$(nproc) menuconfig

sudo ./apply_binaries.sh

cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image $TEGRA_TOP/kernel/Image
sudo cp $TEGRA_KERNEL_OUT/drivers/gpu/nvgpu/nvgpu.ko $TEGRA_TOP/rootfs/usr/lib/modules/$KERN_VER/kernel/drivers/gpu/nvgpu/nvgpu.ko
cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/nvidia/* $TEGRA_TOP/kernel/dtb/

cd $TEGRA_TOP/rootfs
sudo tar --owner root --group root -cjf kernel_supplements.tbz2 lib/modules
cp kernel_supplements.tbz2 $TEGRA_TOP/kernel/kernel_supplements.tbz2

sudo ./apply_binaries.sh --t
sudo ./flash.sh --no-flash jetson-agx-orin-devkit mmcblk0p1
sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1

Doe it work for you to only overwrite

scp Image to Orin and replace /boot/Image

in your use-case? Or you must rebuild kernel driver?

Yes, i am working on custom carrier board, i have to rebuild kernel driver.

We have confirmed the issue. The display driver fails to be compiled after applying RT kernel patch. It is under debugging. Will update.