PREEMPT-RT kernel on Jetson TX2 (JetPack 4.2.1 - L4T 32.2)

Hi,

I compiled a kernel for the Jetson TX2 with the latest sources to date (JetPack 4.2.1 - L4T 32.2) and applying the PREEMPT-RT patches included in the sources. The compilation and flashing process went OK, without any errors. I am able to boot and work with the board:

uname -a
Linux tx2 4.9.140-rt93 #1 SMP PREEMPT RT Thu Aug 22 07:52:08 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux

However, when I try to turn off the board it hangs (the hdmi monitor turns off, but the board remains on), and when I turn on the monitor again the board shows this messages:

[ 1575.609281] systemd-shutdow: 34 output lines suppressed due to ratelimiting
[ 1575.979277] NOHZ: local_softirq_pending 02
[ 1575.979326] NOHZ: local_softirq_pending 02
[ 1575.979371] NOHZ: local_softirq_pending 02
[ 1575.979419] NOHZ: local_softirq_pending 02
[ 1575.979505] NOHZ: local_softirq_pending 02
[ 1575.980322] CPU3: shutdown
[ 1576.006810] max77686-rtc max77620-rtc: _regmap_bulk_write() failed, e -1
[ 1576.013772] max77686-rtc max77620-rtc: Fail to write time reg(-1)
[ 1576.020407] max77686-rtc max77620-rtc: Fail to write update reg(ret=-1, data=0x10)
[ 1576.028320] max77686-rtc max77620-rtc: Fail to write update reg(ret=-1, data=0x10)
[ 1587.162674] tegradc 15210000.nvdisplay: hdmi: edid read failed

After a while hanging in that part it just reboots and never turns off. How can I fix this?

Regards

Could you help to check the message without apply the RT patch?

Hi ShaneCCC

Without applying the PREEMPT-RT patches the board behaves correctly. I have both flashed L4T 32.2 using SDK Manager (JetPack 4.2.1) and flashed a version I compiled from sources without applynig the RT patches. In both cases the TX2 works as expected. The problem appears when I apply the patches.

Best regards

Device hung due to schedutil governor which gives problem with RT Kernel.
By default performance governor is set in kernel. Please skip overriding to the schedutil governor during end of boot.

File: rfs/etc/systemd/nv.sh
@@ -130,6 +130,8 @@ if [ -e /sys/block/mmcblk1/queue/read_ahead_kb ]; then
echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb
fi

+IS_LINUX_RT=uname -rv | grep "PREEMPT RT" | wc -l
+
CPU_INTERACTIVE_GOV=0
CPU_SCHEDUTIL_GOV=0

@@ -146,7 +148,9 @@ if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ]; \

case $governors in
schedutil)

  • CPU_SCHEDUTIL_GOV=1
  • if [ $IS_LINUX_RT -eq 0 ]; then
  • CPU_SCHEDUTIL_GOV=1
  • fi
    ;;
    esac

Hi sumitg
It worked perfectly, thanks!