IT87 watchdog timer driver not working

Bug #932381 reported by Cinquero
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The watchdog daemon resets the driver via /dev/watchdog, but the machine nonetheless resets after 60 seconds.

$ modprobe it87_wdt
$ dmesg | tail -n 1
[173619.473716] IT87 WDT: Chip IT8720 revision 8 initialized. timeout=60 sec (nowayout=0 testmode=0 exclusive=1 nogameport=0)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-15-generic 3.2.0-15.24
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.0-15-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 BEN. PID ZUGR. BEFEHL
 /dev/snd/controlC0: mark 4945 F.... pulseaudio
 /dev/snd/pcmC0D7p: mark 4945 F...m pulseaudio
 /dev/snd/controlC1: mark 4945 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xfaffc000 irq 17'
   Mixer name : 'Nvidia GPU 0d HDMI/DP'
   Components : 'HDA:10de000d,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Card1.Amixer.info:
 Card hw:1 'CA0106'/'Audigy SE [SB0570] at 0xce00 irq 16'
   Mixer name : 'CA0106'
   Components : ''
   Controls : 35
   Simple ctrls : 18
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Keine Berechtigung
 dmesg: write failed: Datenübergabe unterbrochen (broken pipe)
Date: Tue Feb 14 23:14:02 2012
EcryptfsInUse: Yes
MachineType: Gigabyte Technology Co., Ltd. P55-USB3
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 LANGUAGE=de:en
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-15-generic root=/dev/mapper/hostnamevg-hostnameroot ro ipv6.disable=1 ip=dhcp ISCSI_INITIATOR=iqn.1993-08.org.debian:01:95384da15332 ISCSI_TARGET_NAME=iqn.mstier.de:desktop64.img ISCSI_TARGET_IP=192.168.0.4 ISCSI_TARGET_PORT=3260
RfKill:

SourcePackage: linux
UpgradeStatus: Upgraded to precise on 2012-02-12 (2 days ago)
WifiSyslog:

dmi.bios.date: 02/11/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F4
dmi.board.name: P55-USB3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF4:bd02/11/2010:svnGigabyteTechnologyCo.,Ltd.:pnP55-USB3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnP55-USB3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: P55-USB3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 BEN. PID ZUGR. BEFEHL
 /dev/snd/controlC0: mark 4945 F.... pulseaudio
 /dev/snd/pcmC0D7p: mark 4945 F...m pulseaudio
 /dev/snd/controlC1: mark 4945 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xfaffc000 irq 17'
   Mixer name : 'Nvidia GPU 0d HDMI/DP'
   Components : 'HDA:10de000d,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Card1.Amixer.info:
 Card hw:1 'CA0106'/'Audigy SE [SB0570] at 0xce00 irq 16'
   Mixer name : 'CA0106'
   Components : ''
   Controls : 35
   Simple ctrls : 18
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Keine Berechtigung
 dmesg: write failed: Datenübergabe unterbrochen (broken pipe)
DistroRelease: Ubuntu 12.04
EcryptfsInUse: Yes
MachineType: Gigabyte Technology Co., Ltd. P55-USB3
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 LANGUAGE=de:en
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-15-generic root=/dev/mapper/hostnamevg-hostnameroot ro ipv6.disable=1 ip=dhcp ISCSI_INITIATOR=iqn.1993-08.org.debian:01:95384da15332 ISCSI_TARGET_NAME=iqn.mstier.de:desktop64.img ISCSI_TARGET_IP=192.168.0.4 ISCSI_TARGET_PORT=3260
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
RfKill:

Tags: precise
Uname: Linux 3.2.0-15-generic x86_64
UpgradeStatus: Upgraded to precise on 2012-02-12 (2 days ago)
UserGroups: admin fuse
WifiSyslog:

dmi.bios.date: 02/11/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F4
dmi.board.name: P55-USB3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF4:bd02/11/2010:svnGigabyteTechnologyCo.,Ltd.:pnP55-USB3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnP55-USB3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: P55-USB3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Cinquero (cinquero) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 932381

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Cinquero (cinquero) wrote :

It seems the kernel driver does not update using the correct order.

Here is what ITE sent me (including the two attachments):

1. If you wanted WDT to stop, you will need to set ¡§index 74(HWB)¡¨ and
¡§index 73h(LSB)¡¨ to 00h

2. If you wanted WDT to restart. You will need to first set ¡§index
74h(HWB)¡¨ values then set ¡§index 73h(LSB)¡¨afterwards.

Example

           writeport ( 0x72 , 0xD0)

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x0F)

/ / ¡K

1. WDT to stop

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x00)

2. WDT to restart

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x0F)

Watch Dog Timer Spec

IT8720 LDN 07 about WDT

Register Detail Spec

Revision history for this message
Cinquero (cinquero) wrote :
Revision history for this message
Cinquero (cinquero) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Cinquero (cinquero) wrote : AlsaDevices.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : AplayDevices.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : ArecordDevices.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card0.Codecs.codec.1.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card0.Codecs.codec.2.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card0.Codecs.codec.3.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Card1.Amixer.values.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : IwConfig.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Lspci.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : Lsusb.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : PciMultimedia.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : ProcModules.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : PulseSinks.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : PulseSources.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : UdevDb.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote : UdevLog.txt

apport information

Revision history for this message
Cinquero (cinquero) wrote :

apport crashes here:

The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=WJ21wGmBrhnGSKkBlnNw&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Press any key to continue or wait (5) seconds...

Waiting to hear from Launchpad about your decision...
Kein Paket gefunden, das auf linux passt.
ERROR: hook /usr/share/apport/package-hooks//source_linux-meta.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 758, in add_hooks_info
    symb['add_info'](self, ui)
  File "/usr/share/apport/package-hooks//source_linux-meta.py", line 47, in add_info
    staging_drivers = re.findall("(\w+): module is from the staging directory", report['BootDmesg'])
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'BootDmesg'

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

o you know if this issue happened in a previous version of Ubuntu, or is this a new issue?

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.3 kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed by the mainline kernel, please add the following tag 'kernel-fixed-upstream-KERNEL-VERSION'. For example, if kernel version 3.3-rc2 fixed the issue, the tag would be: 'kernel-fixed-upstream-v3.3-rc2'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc3-precise/

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-da-key
Revision history for this message
Cinquero (cinquero) wrote :

It is not a new issue.

Just tested http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc4-precise/ and it is still ignoring the watchdog daemon.

Looking at

https://github.com/torvalds/linux/blob/v3.3-rc4/drivers/watchdog/it87_wdt.c#L240

could give the answer: LSB (73h) gets updated before MSB (74h), and that is the exact opposite of what ITE is telling.

tags: removed: needs-upstream-testing
Cinquero (cinquero)
tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-17.26)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

You can update to the latest development kernel by simply running the following commands in a terminal window:

    sudo apt-get update
    sudo apt-get upgrade

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-17.26
Cinquero (cinquero)
tags: added: bot-stop-nagging
removed: kernel-request-3.2.0-17.26
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Cinquero (cinquero) wrote :

Tried that patch, but didn't help.

tags: added: patch
Cinquero (cinquero)
tags: removed: patch
tags: added: patch
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Brad Figg (brad-figg) wrote :

@Cinquero,

I removed the "patch" flag on your attachment because it isn't a fix for this issue.

Revision history for this message
Paul Crawford (psc-sat) wrote :

This problem is also showing up with our new PCs using the IT8728 (motherboard is Gigabyte Z87-D3HP). The watchdog is armed and the time-out can be set, but the "refresh" is not working so the machine reboots after the chip's time-out period.

Jul 2 16:57:04 kernel: [ 346.256483] it87_wdt: Chip IT8728 revision 1 initialized. timeout=60 sec (nowayout=0 testmode=0 exclusive=1 nogameport=0)

We are using Ubuntu 12.04.2 32-bit:

3.5.0-34-generic #55~precise1-Ubuntu SMP Fri Jun 7 16:32:06 UTC 2013 i686 i686 i386 GNU/Linux

As far as I can see (e.g. http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/drivers/watchdog/it87_wdt.c) there has been no updates to the it87_wdt driver since the 3.5 kernel, so it is still an open bug.

Revision history for this message
Paul Crawford (psc-sat) wrote :

What is odd is that I can set the time-out OK, and I can stop the watchdog OK and it no longer reboots, but it is the simple "refresh" that appears not to work!

NOTE: Stopping using "pkill watchdog" as that closes the device, where as "service watchdog stop" swaps to the wd_keepalive daemon that performs the same job to the watchdog daemon in terms of actions on /dev/watchdog

Revision history for this message
Paul Crawford (psc-sat) wrote :

Looking through the code in it87_wdt.c it appears that the open/close of the timer is performed by writing to the configuration registers that Cinquero identified, however, that is not how the refresh is performed!

Looking at this part of the code:

/* watchdog timer handling */

static void wdt_keepalive(void)
{
 if (test_bit(WDTS_USE_GP, &wdt_status))
  inb(base);
 else
  /* The timer reloads with around 5 msec delay */
  outb(0x55, CIR_DR(base));
 set_bit(WDTS_KEEPALIVE, &wdt_status);
}

And the page 8.11.6 from the manual (JPEG image posted by Cinquero) it seems that the watchdog, once armed, is supposed to be reset via a "CIR Interrupt" that presumably is generated by writing 0x55 to the CIR's base address (default is from #define CIR_BASE 0x0208).

So has anyone any idea of with the CIR actually is, or how it works?

The alternative seems to be a code change so the wdt_keepalive() call re-writes the timer, but I am guessing there was a good reason for doing this way originally (e.g. time involved in slow I/O register access or similar).

Revision history for this message
Paul Crawford (psc-sat) wrote :

Well I guess no one is going to fix the it87_wdt module any time soon :(

As a work-around, my own version of the watchdog daemon (update #117 or later) now detects if it is reported as "IT87 WDT" when queried and re-sets the time-out on each refresh, rather then writing '\0' to the device. It appears to work OK on the motherboards I have.

Code can be found here:

http://www.sat.dundee.ac.uk/~psc/watchdog/Linux-Watchdog.html

Usual disclaimer about (A) it is not the official version, and (B) check and test the code yourself, as absolutely no warranty!

penalvch (penalvch)
tags: added: bios-outdated-f9
Revision history for this message
Paul Crawford (psc-sat) wrote :

Note the work-around for this bug is not in the GIT repository for the watchdog package as:

http://sourceforge.net/p/watchdog/code/ci/0d156df287656d1031389cac99caa9fa94c2d204/

Hopefully a release of version 5.15 soon will make that more widely available.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.