Disable nowayout for tegra-wdt watchdog

I’d like to use the tegra-wdt with nowayout=0. I’ve tried adding tegra-wdt.nowayout=0 to /boot/extlinux/extlinux.conf, but it still boots with the message:

[    1.863267] tegra-wdt 60005100.watchdog: initialized (timeout = 120 sec, nowayout = 1)

Is there a way to set nowayout=0 without recompiling the kernel?

I haven’t tried working on this, so I have no testing, but here is a URL you might find useful:
https://www.kernel.org/doc/html/latest/watchdog/watchdog-parameters.html

FYI, there are some earlier boot stages which could get kernel command line from the device tree, and you can check. If you look at the “APPEND” key/value pair in extlinux.conf you’ll see it inherits part of this from the environment via the “${cbootargs}” environment variable, and then it appends the rest from the APPEND line of extlinux.conf. If you run the command “cat /proc/cmdline”, then you will see what arguments the kernel sees. The part at the end of that output which matches the extlinux.conf file occurring after the “${cbootargs}” is from extlinux.conf, and that which comes before is from the device tree.

You can see what the device tree original input was (it can be edited by boot stages prior to passing to the kernel, but mostly this will be verbatim) via:
cat /proc/device-tree/chosen/bootargs

With a bit of bookkeeping, does your cmdline match bootargs plus the extlinux.conf APPEND?

Most command line options are designed such that if the argument appears twice only the last argument is used. There are exceptions, and I am thinking perhaps nowayout is one of those. Can you post the content of the “chosen->bootargs” (and the APPEND and the cmdline)?

Thanks! And, sure. I do note that on that page, the name tegra-wdt (module name reported in the kernel log) is listed as tegra_wdt. I decided to put both in there, until I find the one that works.

At any rate, it doesn’t appear any other arguments are getting passed to that module; it just seems to be ignoring the ones I’m passing in.

So, the new boot parameters:

/proc/device-tree/chosen/bootargs:

tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize 
usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb 
no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,2 
earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 
lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  
earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 
console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet root=/dev/mmcblk0p1 
rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 
tegra_wdt.nowayout=0 tegra-wdt.nowayout=0

/proc/cmdline:

tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize 
usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb 
no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,2 
earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 
lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  
earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 
console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet root=/dev/mmcblk0p1 
rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 
tegra_wdt.nowayout=0 tegra-wdt.nowayout=0

/boot/extlinux/extlinux.conf (APPEND line):

APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 
console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 tegra_wdt.nowayout=0 
tegra-wdt.nowayout=0

I’m not sure if prefixing with “tegra_wdt” (or “tegra-wdt”) is valid. It might be just “nowayout=0” without any prefix.

Toradex has good documentation, just adding this URL in case it seems useful:
https://developer.toradex.com/knowledge-base/watchdog-linux

The idea of using multiple formats on command line to make sure it finds it is actually a good idea. Parameters not understood by drivers are simply ignored anyway. Not all parameters prefix with the module/driver name though, it is a case-by-case basis. From what I can see the “with” and “without” hyphen cases would have worked if that was actually the correct parameter.

Does it work with just “nowayout=0”?

Maybe need to enable CONFIG_WATCHDOG_NOWAYOUT

Doesn’t work with nowayout=0, either. I tried injecting it earlier in the boot process, by setting it from U-Boot. No luck there. Found a thread at Toradex that suggested setting it in the U-Boot environment, but none of the three variants worked there, either. Also tried adding to /etc/modprobe.djust for good measure; same lack of results.

It’s starting to look like @ShaneCCC 's answer is the only way to make this work. I did manage to disable it by compiling a custom kernel with that option set to n. Still not sure why no command line options seem to work.

I couldn’t say for certain, but some settings can only change on initial load, and others may not be overridden when using a kernel with a compiled in feature (versus something like a loadable module which can choose to not load).

1 Like