Does watchdog is hardward watchdog or software watchdog?

Dear all
When we use jetpack6.2 with Orin nx in our customed board, we found watchdog is enabled

ps -aux |grep watchdog
root     105    0.0     0  0    ?    S    09:53  0:00 [watchdog]

and run follow command, watchdog work normally,

echo c >/proc/sysrq-trigger 

Q1: So, this is hardware watchdog or software watchdog ?

Q2: If it is software watchdog, how to close it . Because there is a hardware watchdog in our custom board.

Thank you very much!!!

Best regards.

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, I will attempt to answer your questions.

Q1: Is this a hardware watchdog or software watchdog?

The Jetson Orin NX series has a built-in watchdog timer, which can be either hardware or software-based. However, without specific information about the watchdog implementation in Jetpack 4.6.2, it’s difficult to determine whether it’s a hardware or software watchdog.

In general, a hardware watchdog is a dedicated hardware component that monitors the system’s activity and resets the system if it detects any anomalies or hangs. On the other hand, a software watchdog is a program that runs in the background and checks the system’s status periodically.

To determine whether the watchdog is hardware or software-based, you can check the kernel logs or system messages for any information related to the watchdog. You can also try to disable the watchdog using software commands (more on this below) to see if it’s a software-based watchdog.

Q2: If it’s a software watchdog, how to close it?

If the watchdog is software-based, you can try to disable it using the following methods:

  1. Check the kernel command line: You can check the kernel command line to see if the watchdog is enabled. You can do this by running the command cat /proc/cmdline. If the watchdog is enabled, you should see a parameter like wdt_timeout=<timeout_value>.
  2. Use the wdt command: You can try to disable the watchdog using the wdt command. Run the command wdt -d to disable the watchdog. If the watchdog is software-based, this command should disable it.
  3. Modify the watchdog configuration: You can modify the watchdog configuration file to disable the watchdog. The configuration file is usually located at /etc/watchdog.conf. You can edit this file to set the watchdog_timeout parameter to 0 or a very large value to effectively disable the watchdog.
  4. Use the sysctl command: You can use the sysctl command to disable the watchdog. Run the command sysctl -w dev.watchdog.0.timeout=0 to disable the watchdog.

Keep in mind that disabling the watchdog may not be recommended, as it can leave your system vulnerable to hangs or crashes. If you have a hardware watchdog on your custom board, it’s recommended to use that instead of disabling the software watchdog.

In summary, to determine whether the watchdog is hardware or software-based, you can check the kernel logs or system messages. If it’s a software watchdog, you can try to disable it using the methods mentioned above. However, it’s recommended to use the hardware watchdog on your custom board instead of disabling the software watchdog.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

1 Like

1: cat /proc/cmdline did not have watchdog

2: wdt does not exist

3: /etc/watchdog.conf does not exist

4: sysctl -w dev.watchdog.0.timeout=0 can not run.

Have below step to disable it.
Disable the CONFIG_WATCHDOG_NOWAYOUT in …/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig to build the kernel Image and replace it.
Then reference to below code to implement WDIOC_SETOPTIONS to disable it.

https://code.woboq.org/linux/linux/tools/testing/selftests/watchdog/watchdog-test.c.html

1: it is kernel-jammy-src with jetpack6.2 rather than kernel-4.9

2: the file you provide does not exist: kernel-4.9/arch/arm64/configs/tegra_defconfig, and ker-jammy-src did not have CONFIG_WATCHDOG_NOWAYOUT.

You can add it manually to try on K5.x

it is not work.

Could you tell me, this is software watchdog or hardware watchdog in system now.

And there are any other way to disable default watchdogd?

It’s HW watchdog.

You can set the status to disable in the timer@2080000 {} of system device tree.

Thanks

Now, timer@2080000 is disabled, but watchdogd is running.

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks
~0204

Could you share the message by below command.

sudo dmesg | grep -i watch