Skip to content

Commit 25cf0f7

Browse files
committed
watchdog: Describe the new kernel_watchdog parameters
1 parent 47c6c96 commit 25cf0f7

File tree

1 file changed

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

1 file changed

+29
-0
lines changed

documentation/asciidoc/computers/config_txt/boot.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,35 @@ 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 and earlier, the `RuntimeWatchdogSec` parameter is **not enabled by default** and this setting must be configured first in `/etc/systemd/system.conf` before the firmware kernel watchdog can be used.
221+
222+
If both `BOOT_WATCHDOG_TIMEOUT` (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+
You can use this in conjunction with the xref:config_txt.adoc#the-expression-filter[expression filter] to apply different settings or select a different boot flow when the watchdog triggers a reboot to a specific partition.
237+
238+
Default: `0` (default partition)
239+
211240

212241
[[eeprom_write_protect]]
213242
==== `eeprom_write_protect`

0 commit comments

Comments
 (0)