pwmconfig generates a blank values /etc/fancontrol

Bug #485899 reported by Kurt Kraut
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
lm-sensors (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: lm-sensors

I'm trying to use pwmconfig and here is the output:

### BEGINING OF PASTE ###

root@ktk7:~# pwmconfig
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.

Found the following devices:
   hwmon0/device is it8718
   hwmon1/device is coretemp
   hwmon2/device is coretemp

Found the following PWM controls:
   hwmon0/device/pwm1
   hwmon0/device/pwm2
   hwmon0/device/pwm3

Giving the fans some time to reach full speed...
Found the following fan sensors:
   hwmon0/device/fan1_input current speed: 4326 RPM
   hwmon0/device/fan2_input current speed: 2227 RPM
   hwmon0/device/fan3_input current speed: 0 ... skipping!

Warning!!! This program will stop your fans, one at a time,
for approximately 5 seconds each!!!
This may cause your processor temperature to rise!!!
If you do not want to do this hit control-C now!!!
Hit return to continue:

Testing pwm control hwmon0/device/pwm1 ...
  hwmon0/device/fan1_input ... speed was 4326 now 4354
    no correlation
  hwmon0/device/fan2_input ... speed was 2227 now 2235
    no correlation

No correlations were detected.
There is either no fan connected to the output of hwmon0/device/pwm1,
or the connected fan has no rpm-signal connected to one of
the tested fan sensors. (Note: not all motherboards have
the pwm outputs connected to the fan connectors,
check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? n

Testing pwm control hwmon0/device/pwm2 ...
  hwmon0/device/fan1_input ... speed was 4326 now 4354
    no correlation
  hwmon0/device/fan2_input ... speed was 2227 now 0
    It appears that fan hwmon0/device/fan2_input
    is controlled by pwm hwmon0/device/pwm2
Would you like to generate a detailed correlation (y)? y
Would you like to generate a graphical plot using gnuplot (y)? y
    PWM 255 FAN 2257
    PWM 240 FAN 2250
    PWM 225 FAN 2070
    PWM 210 FAN 1912
    PWM 195 FAN 1735
    PWM 180 FAN 1569
    PWM 165 FAN 1391
    PWM 150 FAN 1247
    PWM 135 FAN 1078
    PWM 120 FAN 934
    PWM 105 FAN 770
    PWM 90 FAN 620
    PWM 75 FAN -1
    Fan Stopped at PWM = 75
    Hit return to continue...

Testing pwm control hwmon0/device/pwm3 ...
  hwmon0/device/fan1_input ... speed was 4326 now 1541
    It appears that fan hwmon0/device/fan1_input
    is controlled by pwm hwmon0/device/pwm3
Would you like to generate a detailed correlation (y)?
Would you like to generate a graphical plot using gnuplot (y)?
    PWM 255 FAN 4326
    PWM 240 FAN 4299
    PWM 225 FAN 4066
    PWM 210 FAN 3901
    PWM 195 FAN 3571
    PWM 180 FAN 3308
    PWM 165 FAN 3013
    PWM 150 FAN 2777
    PWM 135 FAN 2509
    PWM 120 FAN 2280
    PWM 105 FAN 2027
    PWM 90 FAN 1819
    PWM 75 FAN 1654
    PWM 60 FAN 1577
    PWM 45 FAN 1548
    PWM 30 FAN 1544
    PWM 28 FAN 1541
    PWM 26 FAN 1544
    PWM 24 FAN 1541
    PWM 22 FAN 1541
    PWM 20 FAN 1541
    PWM 18 FAN 1544
    PWM 16 FAN 1544
    PWM 14 FAN 1544
    PWM 12 FAN 1544
    PWM 10 FAN 1544
    PWM 8 FAN 1544
    PWM 6 FAN 1541
    PWM 4 FAN 1544
    PWM 2 FAN 1544
    PWM 0 FAN 1544
    Hit return to continue...

  hwmon0/device/fan2_input ... speed was 2227 now 2242
    no correlation

Testing is complete.
Please verify that all fans have returned to their normal speed.

The fancontrol script can automatically respond to temperature changes
of your system by changing fanspeeds.
Do you want to set up its configuration file now (y)?
What should be the path to your fancontrol config file (/etc/fancontrol)?

Select fan output to configure, or other action:
1) hwmon0/device/pwm3 3) Change INTERVAL 5) Save and quit
2) hwmon0/device/pwm2 4) Just quit 6) Show configuration
select (1-n): 5

Saving configuration to /etc/fancontrol...
Configuration saved

### END OF PASTE ###

I though everything was okay when I checked /etc/fancontrol:

### BEGINING OF PASTE ###

root@ktk7:~# cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
FCTEMPS=
FCFANS=
MINTEMP=
MAXTEMP=
MINSTART=
MINSTOP=
root@ktk7:~#

### END OF PASTE ###

So pwmconfig is generating a blank values /etc/fancontrol, what is very unexpected. After running pwmconfig it left me with all fans speeding in max speed. I belive this is a bug.

Chuck Short (zulcss)
Changed in lm-sensors (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Darxus (darxus) wrote :

I tried a couple things that didn't work.

I'm running Precise.

I downloaded the tarball of the latest version of lm_sensors - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.5.tar.bz2
and ran pwmconfig directly from there (sudo bash prog/pwm/pwmconfig). No same results.

Then I downloaded lm-sensors from trusty: http://packages.ubuntu.com/trusty/amd64/lm-sensors/download
Installing it via dpkg -i gave me an error about a dependency for the uninstalled package init-system-helpers. So I forced it (which I do not recommend): dpkg --force-depends -i lm-sensors_3.3.4-2ubuntu1_amd64.deb

That didn't work either. I'm pretty curious what's broken here. I'm starting to suspect that there's some other program the pwmconfig script uses that's somehow broken or missing in a way that's not being detected.

Revision history for this message
Darxus (darxus) wrote :

Ugh, the bug here is that this program is amazingly misleading, even with step by step instructions. I went through the pwmconfig script probably for hours trying to figure out how these values are supposed to be set before I figured this out.

At the end, it says:

Do you want to set up its configuration file now (y)?
What should be the path to your fancontrol config file (/etc/fancontrol)?

Select fan output to configure, or other action:
1) hwmon0/device/pwm2 3) Change INTERVAL 5) Save and quit
2) hwmon0/device/pwm1 4) Just quit 6) Show configuration
select (1-n): 2

What we've been doing wrong is failing to select a fan output to configure. In my case, I needed to type "2" and hit enter, and then accept all the defaults. Before doing this, "show configuration" is blank. After doing this, "show configuration" contains stuff as you might expect.

The directions I was trying to follow the whole time are here: http://ubuntuforums.org/showthread.php?t=42737

My mistake was thinking all the automatically determined fan speed relationships were a new feature, the script was more automated, and I didn't need to follow all of the instructions on that page.

I'd say there's absolutely a bug here, but it's not that the script doesn't work. It's that it's far from obvious how to use it, and it doesn't give you any hint when you skip the necessary last step.

Revision history for this message
Darxus (darxus) wrote :

I also found it useful to give my fain 10 seconds between each speed change, to get a more accurate reading:

$ diff pwmconfig.0 pwmconfig
64c64
< DELAY=5 # 3 seconds delay is too short for large fans, thus I increased it to 5
---
> DELAY=10 # 3 seconds delay is too short for large fans, thus I increased it to 5
320c320,322
< PDELAY=2
---
> PDELAY=10

Revision history for this message
Phillip Susi (psusi) wrote :

Closing due to PEBKAC error ;)

Changed in lm-sensors (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Darxus (darxus) wrote :

To be a little clearer, the thing that was done wrong in the initial report was here:

Select fan output to configure, or other action:
1) hwmon0/device/pwm3 3) Change INTERVAL 5) Save and quit
2) hwmon0/device/pwm2 4) Just quit 6) Show configuration
select (1-n): 5

Instead of hitting 5 to save, you needed to hit 1 or 2 and configure one of those PWM controls. From the rest of the output, it looks like you'd want to do both. Then save. (I did this same thing, lots of times.)

Honestly, I think this bug should be kept open as a UI bug.

Revision history for this message
Darxus (darxus) wrote :

I posted to the lm-sensors mailing list about it: http://lists.lm-sensors.org/pipermail/lm-sensors/2015-January/043356.html

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.