I did on a terminal sudo cat /dev/char/10:130, which in the uevent has name of watchdog, and it outputs a message from the kernel saying that watchdog did not stop !, and after a couple of second it powers off, why?

What am I exactly doing?

I'm running Raspbian lite on a Raspberry 3b+.

  • In general a watchdog timer is used to detect when you've hit some kind of problem, such as an infinite loop. If you don't periodically reset the watchdog timer (or turn it off), the timer indicates to the processor that you've entered some problem, and resets. I would guess either 1. you're not supposed to do what you did, or 2. cat starts the watchdog but does not reset it, which is seen as a problem by the watchdog. Jul 17 '18 at 21:46

/dev/char/10:130 is a character device with major device number 10 and minor number 130. In non-embedded Linux systems it is more commonly named /dev/watchdog.

When you open a watchdog device, a timer (often a hardware-level timer) starts ticking down. The program that opened the watchdog device is expected to periodically write something (anything, really) to the opened device, to indicate that the system is still alive and well. This will reset the hardware timer, which will then start ticking down towards zero again.

If this does not happen, e.g. because the system is hung or overloaded, the hardware timer will reach zero, and then the watchdog mechanism will activate a hardware-level reset signal to perform a hard reboot. It's the equivalent of a dead-man switch for the OS and/or other software running on the system.

If the software minding the watchdog needs to stop, some watchdog drivers require sending a specific character to the watchdog device just before closing the file. Then the watchdog driver in the kernel is supposed to disarm the watchdog timer. Your sudo cat /dev/char/10:130 did not do this.

The problem is, some hardware watchdog timers apparently cannot be stopped without a reboot once activated. And if the kernel has been compiled with the CONFIG_WATCHDOG_NOWAYOUT option, the driver will expect that once the watchdog is activated, there should always be a watchdog-minder process present, and so the watchdog deactivation request will be refused.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.