Bug 15797 - it87 with 2.6.33.2: noise
it87 with 2.6.33.2: noise
Status: CLOSED INVALID
Product: Drivers
Classification: Unclassified
Component: Hardware Monitoring
All Linux
: P1 normal
Assigned To: Jean Delvare
:
Depends on:
Blocks: 14885
  Show dependency treegraph
 
Reported: 2010-04-16 15:51 UTC by Maciej Rutecki
Modified: 2010-10-28 18:15 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.33.2
Tree: Mainline
Regression: Yes


Attachments

Description Maciej Rutecki 2010-04-16 15:51:53 UTC
Subject    : it87 with 2.6.33.2: noise
Submitter  : "Frédéric L. W. Meunier" <fredlwm@gmail.com>
Date       : 2010-04-14 21:39
Message-ID : alpine.LNX.2.01.1004141835450.13955@dyndns.pervalidus.net
References : http://marc.info/?l=linux-kernel&m=127128118130024&w=2

This entry is being used for tracking a regression from 2.6.32.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Frédéric L. W. Meunier 2010-04-19 05:25:37 UTC
ALSA isn't the culprit, because I tested without loading any sound modules, including pcspkr. It happens with a single modprobe -a it87. No problem with k8temp, but that one doesn't return voltages.

The motherboard is a Gigabyte GA-MA69VM-S2.
Comment 2 Frédéric L. W. Meunier 2010-06-30 21:45:24 UTC
This is still present with 2.6.34. I also tested unloading the module, and it didn't change anything.

BTW, from 2.6.32 to 2.6.33, I only see these it87 references in the ChnageLog.

Author: Jean Delvare
Date:   Wed Dec 9 20:35:48 2009 +0100

    hwmon: (it87) Check for fan2 and fan3 availability

    The fan2 and fan3 input and output pins can be used as GPIOs. Check
    their function before exposing their sysfs attributes and accessing
    their registers.

commit 895ff267686663afa894314b749d23ac2867434a
Author: Jean Delvare
Date:   Wed Dec 9 20:35:47 2009 +0100

    hwmon: (it87) Verify the VID pin usage

    The VID input pins can alternatively be used as GPIOs. Make sure we
    have at least 4 pins used for VID, otherwise don't bother reading and
    exposing VID.
Comment 3 Jean Delvare 2010-07-01 06:39:31 UTC
Frédéric, please provide the following dumps (as attachments):

# isadump -k 0x87,0x01,0x55,0x55 0x2e 0x2f 4
# isadump 0x22d 0x22e

Both before and after loading the it87 driver with kernel 2.6.33.

Please also provide the output of "sensors -c /dev/null" after the driver is loaded.
Comment 4 Jean Delvare 2010-07-01 06:57:09 UTC
Oh, and I would also be interested in the output of "sensors -c /dev/null" with kernel 2.6.32, for comparison.

Are you sure that the beeping is triggered by loading the it87 driver? I suspect it is instead caused by "sensors -s", which is often run by the lm-sensors initialization script.
Comment 5 Frédéric L. W. Meunier 2010-07-01 14:38:44 UTC
Before:

# isadump -k 0x87,0x01,0x55,0x55 0x2e 0x2f 4

WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address register 0x2e and data register 0x2f.
Probing bank 4 using bank register 0x07.
Continue? [Y/n]

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
20: 87 16 03 00 1a 00 00 00 80 00 00 00 00 00 00 00 
30: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
60: 02 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
70: 00 02 00 00 04 04 00 00 00 00 00 00 00 00 00 00 
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
f0: 80 00 0e 00 08 00 ff 00 00 00 00 00 00 00 00 00 

# isadump 0x22d 0x22e

WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address register 0x22d and data register 0x22e.
Continue? [Y/n]

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 11 10 00 00 ff ff 00 37 ff 87 32 09 07 64 ff 00 
10: fe ff ff 31 d7 82 7f c2 01 ff 00 ff ff ff ff ff 
20: 43 7a cf cf be c8 06 cf ca 2d 2b 20 a3 91 91 91 
30: ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 
40: 5a 7f 7f 7f 7f 7f 5f 74 2d 40 90 22 ff ff ff ff 
50: ff 1c 7f 7f 7f 50 04 04 90 04 03 12 65 00 00 00 
60: ff 14 7f 27 90 03 ff ff 7f 7f 7f 00 00 3f ff ff 
70: ff 14 7f 20 90 03 ff ff ff ff ff ff ff ff ff ff 
80: 00 00 00 00 ff ff ff ff 00 00 ff c0 02 00 99 99 
90: 7f 7f 7f 00 00 7f ff ff 7f 7f 7f 00 00 7f ff ff 
a0: 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ff 
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 

After:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
20: 87 16 03 00 1a 00 00 00 80 00 00 00 00 00 00 00 
30: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
60: 02 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
70: 00 02 00 00 04 04 00 00 00 00 00 00 00 00 00 00 
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
f0: 80 00 0e 00 08 00 ff 00 00 00 00 00 00 00 00 00 

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 11 12 00 00 ff ff 00 37 ff 87 32 09 07 6e ff 00 
10: c2 a3 ff 31 d7 82 7f c2 01 ff 00 01 02 ff ff ff 
20: 43 7a cf cf be c8 06 cf ca 2e 2a 1f a3 91 91 91 
30: ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 
40: 5a 7f 7f 7f 7f 7f 5f 74 2d 40 90 22 ff ff ff ff 
50: ff 1c 7f 7f 7f 50 04 04 90 04 03 12 65 00 00 00 
60: ff 14 7f 27 90 03 ff ff 7f 7f 7f 00 00 3f ff ff 
70: ff 14 7f 20 90 03 ff ff ff ff ff ff ff ff ff ff 
80: 00 00 00 00 ff ff ff ff 00 00 ff c0 02 00 99 99 
90: 7f 7f 7f 00 00 7f ff ff 7f 7f 7f 00 00 7f ff ff 
a0: 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ff 
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 

k8temp-pci-00c3
Adapter: PCI adapter
temp1:       +32.0°C
temp2:       +29.0°C
temp3:       +43.0ºC
temp4:       +34.0ºC

it8716-isa-0228
Adapter: ISA adapter
in0:         +1.07 V  (min =  +0.00 V, max =  +4.08 V)
in1:         +1.95 V  (min =  +0.00 V, max =  +4.08 V)
in2:         +3.31 V  (min =  +0.00 V, max =  +4.08 V)
in3:         +3.31 V  (min =  +0.00 V, max =  +4.08 V)
in4:         +3.04 V  (min =  +0.00 V, max =  +4.08 V)
in5:         +3.20 V  (min =  +0.00 V, max =  +4.08 V)
in6:         +0.10 V  (min =  +0.00 V, max =  +4.08 V)
in7:         +3.31 V  (min =  +0.00 V, max =  +4.08 V)
in8:         +3.23 V
fan1:       1849 RPM  (min = 1500 RPM)
fan2:          0 RPM  (min = 1000 RPM)  ALARM
temp1:       +46.0ºC  (low  = +127.0ºC, high = +90.0ºC)  sensor = thermistor
temp2:       +41.0ºC  (low  = +127.0ºC, high = +127.0ºC)  sensor = thermistor
temp3:       +31.0ºC  (low  = +127.0ºC, high = +127.0ºC)  sensor = thermal diode
cpu0_vid:   +1.100 V

it87: Found IT8716F chip at 0x228, revision 3
it87: Beeping is supported

Well, I see that last line after modprobe, which wasn't present in 2.6.33.2 output.

I don't have 2.6.32 anymore, but here's an output from July 2009:

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +31.0°C
Core0 Temp:  +25.0°C
Core1 Temp:  +41.0°C
Core1 Temp:  +30.0°C

it8716-isa-0228
Adapter: ISA adapter
VCore:       +1.07 V  (min =  +0.00 V, max =  +4.08 V)
VDDR:        +1.95 V  (min =  +0.00 V, max =  +4.08 V)
+3.3V:       +3.31 V  (min =  +0.00 V, max =  +4.08 V)
+5V:         +5.05 V  (min =  +0.00 V, max =  +6.85 V)
+12V:       +12.22 V  (min =  +0.00 V, max = +16.32 V)
Stdby:       +5.05 V  (min =  +0.00 V, max =  +6.85 V)
VBat:        +3.22 V
Cooler:     1650 RPM  (min =    0 RPM)
temp1:       +46.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:       +40.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
cpu0_vid:   +0.538 V

Is 'sensors -s' run automatically after loading the driver ?

I only run 'modprobe -a it87 powernow-k8' at boot time. There's nothing more in my boot scripts.

7522 Aug 19  2009 sensors3.conf

So, it didn't change for a long time.

Anyway, even if the beep was triggered by 'sensors -s', which I didn't run, isn't it supposed to go away after rmmod ? It doesn't, and just stops after I reboot and it's near the GRUB prompt.
Comment 6 Jean Delvare 2010-07-01 15:11:41 UTC
Thanks for the dumps and outputs, I'll look into them. The "Beeping is supported" message is certainly a valuable hint.

Looking at your current sensors output, you have one channel in ALARM state (fan2). This would be the cause for the beeping. If you set fan2_min to 0, I guess (and hope) that the beeping will stop.

Answers to your questions:

> Is 'sensors -s' run automatically after loading the driver ?

No, it's done only if the initialization scripts do it.

> Anyway, even if the beep was triggered by 'sensors -s', which I didn't run,
> isn't it supposed to go away after rmmod ?

No. The driver should change the device settings as little as possible when loaded, and should not touch it when unloaded. It's really only supposed to provide an interface to read the device's registers (and optionally write to the fan speed control registers), it is not supposed to stop monitoring when unloaded (doing this could have nasty effects, up to hardware damage.)
Comment 7 Jean Delvare 2010-07-01 15:18:28 UTC
Hmm, the "Beeping is supported" message was added in kernel 2.6.34. If the problem started in kernel 2.6.33, it can't be related.
Comment 8 Frédéric L. W. Meunier 2010-07-01 15:38:33 UTC
It did go away after 'set fan2_min 0'.

I had these before and thought they'd ignore anything related:

ignore fan2
ignore fan3

And I now see what triggered sensors:

/etc/modprobe.d/modprobe.conf:

install it87 /sbin/modprobe --first-time --ignore-install it87 && { /usr/local/bin/sensors -s; }

So, it wasn't a bug, but the new 2.6.33 "hwmon: (it87) Check for fan2 and fan3
availability" feature ?

Anyway, if I don't 'set fan2_min 0', there's really no way to stop the beeping
without a reboot ? The same with any voltage and temperature alarm ?
Comment 9 Jean Delvare 2010-07-01 16:40:35 UTC
Your last report correlates perfectly with my dump comparison. The relevant difference in the dumps before and after loading the driver sums up to:
* Different limit values for fan1 and fan2
* fan2 alarm flag raised

"ignore" statements in the configuration file only hide the values in monitoring applications. It doesn't affect the hardware.

I can't see how patch "hwmon: (it87) Check for fan2 and fan3 availability" could have triggered the problem for you. Before this patch, fan2 and fan3 were created unconditionally. After the patch, they are created conditionally. But you already had fan2 before and you still have it after, so it shouldn't make any difference.

As for your last question, since kernel 2.6.34, you can control beeping through sysfs attributes in0_beep, fan1_beep and temp1_beep (there's a single control for all voltage channels, one for all fans and one for all temperature channels.) libsensors support for this feature was just added, so you can't set them through sensors3.conf yet, unless you're running the SVN version of lm-sensors.
Comment 10 Frédéric L. W. Meunier 2010-07-01 17:07:52 UTC
Thanks. So, a last question. You mean that with 2.6.32 and earlier, it should also have beeped if I used 'set fan2_min 1000' and the fan wasn't attached or running at >= 1000 ?

Aug 19  2009 sensors3.conf

As I see in my dmesg logs, after the last edit (and I don't recall what I changed), I ran 2.6.30*, .31* and .32* without hearing anything.

All that time, including with .33* and .34, I had lm_sensors 3.1.1 installed.
Comment 11 Jean Delvare 2010-07-01 17:29:29 UTC
Yes, it should have beeped with earlier kernels as well.

Note that the beeping behavior can sometimes be changed in the BIOS. So a BIOS update or configuration change could have enabled the beeping.

This is all unrelated to the lm-sensors version.
Comment 12 Frédéric L. W. Meunier 2010-07-01 18:12:07 UTC
About a BIOS update, it was in november, so it's something else.

In the BIOS, I have:

CPU FAN Fail Warning [Enabled]
SYSTEM FAN Fail Warning [Disabled]

If I enable the second, it starts beeping after BIOS post, so unrelated to Linux.

I'll try 2.6.32* in the weekend. If it doesn't beep with 'set fan2_min 1000', it could be considered a bug ?

Do you want the same output if it misbehaves ?
Comment 13 Jean Delvare 2010-07-01 18:34:43 UTC
There is a single beep flag for all fans, so that's not what the BIOS is setting with these options. More likely, it always enables the beep flag for fans, and additionally sets a non-zero limit for CPU and/or System fans when you select [Enabled] for said fan. Setting the limits in sensors3.conf and running "sensors -s" has exactly the same effect, which explains why beeping starts at this point.

If beeping doesn't work in 2.6.32, this would be a missing feature rather than a bug (but I'm almost certain that you'll get the beeping with this kernel too.) Fixing this wouldn't be in the scope of the 2.6.32-stable branch anyway, unless you can prove that it used to work (and is thus a regression.)

Note You need to log in before you can comment on or make changes to this bug.