Skip to content

Commit d28a7ac

Browse files
committed
watchdog: Describe the new kernel_watchdog parameters
1 parent e9ae797 commit d28a7ac

File tree

1 file changed

+27
-0
lines changed
  • documentation/asciidoc/computers/config_txt

1 file changed

+27
-0
lines changed

documentation/asciidoc/computers/config_txt/boot.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,33 @@ This property could be used to debug different xref:raspberry-pi.adoc#BOOT_ORDER
208208

209209
Default: ``
210210

211+
[[kernel_watchdog_timeout]]
212+
==== `kernel_watchdog_timeout`
213+
214+
If set to a non-zero value (in seconds), this property enables a hardware watchdog timer that is handed over to the operating system (OS) at boot. If the OS does not regularly "kick" or reset the watchdog, the system will be reset after the specified timeout.
215+
216+
This property sets the `systemd` `watchdog.open_timeout` parameter, which controls how long the OS has to initialize and start servicing the watchdog. The value is passed to the OS via the kernel command line. For ongoing operation, the OS must also regularly reset the watchdog, typically controlled by the `RuntimeWatchdogSec` parameter in `systemd`. For more information, see https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#RuntimeWatchdogSec=[systemd watchdog documentation].
217+
218+
[NOTE]
219+
====
220+
On Raspberry Pi OS Bookworm, the `RuntimeWatchdogSec` parameter is **not set by default**. This means that, unless you explicitly configure it in `/etc/systemd/system.conf` or a drop-in, the kernel watchdog will only be active during system startup (open timeout), and not during normal runtime.
221+
222+
If both `BOOT_WATCHDOG` (EEPROM/bootloader setting, only supported on Raspberry Pi 4 and 5) and `kernel_watchdog_timeout` are set, the bootloader will seamlessly hand over from the bootloader watchdog to the kernel watchdog at the point the OS is started. This provides continuous watchdog coverage from power-on through to OS runtime.
223+
224+
It is preferred to use `kernel_watchdog_timeout` rather than `dtparam=watchdog` because `kernel_watchdog_timeout` explicitly sets the `open_timeout` parameter, ensuring the watchdog is active until systemd takes over.
225+
====
226+
227+
This is useful for ensuring that the system can recover from OS hangs or crashes after the boot process has completed.
228+
229+
Default: `0` (disabled)
230+
231+
[[kernel_watchdog_partition]]
232+
==== `kernel_watchdog_partition`
233+
234+
If the kernel watchdog triggers (i.e., the OS fails to reset the watchdog within the timeout), this property specifies the partition number to boot from after the reset. This allows for automatic failover to a recovery or alternate partition.
235+
236+
Default: `0` (default partition)
237+
211238

212239
[[eeprom_write_protect]]
213240
==== `eeprom_write_protect`

0 commit comments

Comments
 (0)