Using hardware watchdog under Ubuntu 16.04.1

janjan New Member Posts: 2
edited January 2017 in Others
Hey, does anyone know how to enable the hardware watchdog under Ubuntu 16.04? There is no /dev/watchdog* device present. I tried loading some IPMI modules, but obviously there is no IPMI support available. I also browsed through the whole BIOS (advanced mode after password unlock), but I saw neither something watchdog related nor any IPMI entries.

Kernel version: 4.4.0-1-upboard
BIOS version: UPC1BM0X

Comments

  • Dan O'DonovanDan O'Donovan Emutex Posts: 227 mod
    Sorry for the delayed reply. Just saw this post now.

    Interesting, didn't realise that /dev/watchdog* wasn't available under Ubuntu with kernel 4.4.0-1-upboard.
    Its there on ubilinux. I'll look into that.
  • David HuntDavid Hunt New Member Posts: 7
    Same here. My board is locking up every few days, and I'd like to enable the watchdog. I've got Ubuntu with the 4.2.0-3-upboard kernel. No "/dev/watchdog" present.
    Lots and lots of the following message in syslog:
    "sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock"
    Rgds,
    Dave.
  • janjan New Member Posts: 2
    I found out how to get the watchdog working on Ubuntu 16.04. The kernel module you need to load is named iTCO_wdt, but on Ubuntu, all watchdog kernel modules are blacklisted. For some reason, though, it doesn't suffice to remove it from the blacklist in /etc/modprobe.d/ (not sure about exact filename) and adding it to /etc/modules didn't work for some reason. So I added it to /etc/rc.local with modprobe iTCO_wdt. Once the module is loaded, the watchdog appears and also reacts to writing it. I've noticed a kernel panic about an unhandled interrupt before the watchdog triggers a reboot, not sure if this is a bug or if the interrupt is left unhandled intentionally.
  • David HuntDavid Hunt New Member Posts: 7
    Thanks, Jan.
    That worked nicely. I tried as you did, with un-blacklisting it and adding to modules, but I ended up with a modprobe in /etc/rc.local.

    When I kill the watchdog daemon, I get the following, but it does reboot the board successfully.

    Feb 4 12:57:55 lazarus kernel: [ 356.031405] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.0-2-upboard #12-Ubuntu
    Feb 4 12:57:55 lazarus kernel: [ 356.031409] Hardware name: AAEON UP-CHT01/UP-CHT01, BIOS UPC1BM0S 06/04/2016
    Feb 4 12:57:55 lazarus kernel: [ 356.031413] 0000000000000086 8967efd21ebfb7bc ffff88005ac83e60 ffffffff814113d5
    Feb 4 12:57:55 lazarus kernel: [ 356.031420] ffff88005782fa00 0000000000000000 ffff88005ac83e88 ffffffff810e225c
    Feb 4 12:57:55 lazarus kernel: [ 356.031425] ffff88005782fa00 0000000000000000 0000000000000009 ffff88005ac83ec0
    Feb 4 12:57:55 lazarus kernel: [ 356.031431] Call Trace:
    Feb 4 12:57:55 lazarus kernel: [ 356.031434] <IRQ> [<ffffffff814113d5>] dump_stack+0x63/0x8e
    Feb 4 12:57:55 lazarus kernel: [ 356.031452] [<ffffffff810e225c>] __report_bad_irq+0x2c/0xc0
    Feb 4 12:57:55 lazarus kernel: [ 356.031458] [<ffffffff810e2612>] note_interrupt+0x252/0x2a0
    Feb 4 12:57:55 lazarus kernel: [ 356.031463] [<ffffffff810df76d>] handle_irq_event_percpu+0x16d/0x1d0
    Feb 4 12:57:55 lazarus kernel: [ 356.031467] [<ffffffff810df80f>] handle_irq_event+0x3f/0x60
    Feb 4 12:57:55 lazarus kernel: [ 356.031472] [<ffffffff810e2b99>] handle_fasteoi_irq+0x99/0x150
    Feb 4 12:57:55 lazarus kernel: [ 356.031478] [<ffffffff810322ca>] handle_irq+0x1a/0x30
    Feb 4 12:57:55 lazarus kernel: [ 356.031484] [<ffffffff8189a61c>] do_IRQ+0x4c/0xd0
    Feb 4 12:57:55 lazarus kernel: [ 356.031490] [<ffffffff81898702>] common_interrupt+0x82/0x82
    Feb 4 12:57:55 lazarus kernel: [ 356.031493] <EOI> [<ffffffff8171479f>] ? cpuidle_enter_state+0x11f/0x2c0
    Feb 4 12:57:55 lazarus kernel: [ 356.031504] [<ffffffff81714977>] cpuidle_enter+0x17/0x20
    Feb 4 12:57:55 lazarus kernel: [ 356.031511] [<ffffffff810c93fc>] cpu_startup_entry+0x2fc/0x360
    Feb 4 12:57:55 lazarus kernel: [ 356.031517] [<ffffffff811019fb>] ? clockevents_register_device+0xdb/0x140
    Feb 4 12:57:55 lazarus kernel: [ 356.031523] [<ffffffff81053626>] start_secondary+0x156/0x190
    Feb 4 12:57:55 lazarus kernel: [ 356.031527] handlers:
    Feb 4 12:57:55 lazarus kernel: [ 356.031532] [<ffffffff814af3ad>] acpi_irq
    Feb 4 12:57:55 lazarus kernel: [ 356.031535] Disabling IRQ #9


    Rgds & Thanks,
    Dave.
  • Xishan SunXishan Sun New Member Posts: 1
    it turns out a bug from systemd, it affects not only upboard.

    https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1535840

    right now it seems rc.local is the best way to enable watchdog until the official patch comes out.
  • Pieter JordaanPieter Jordaan New Member Posts: 5
    Has this issue made any progress yet?
  • ccaldeccalde Administrator, Moderator, Emutex Posts: 331 admin

    Hi all,

    That issue is still present for the Linux kernel 4.15, so for a temporary workaround you could remove the WDT from the black list and then, load the module iTCO_wdt via modprobe. You should see the /dev/watchdog available and ready.

Sign In or Register to comment.