Bug 145294

Summary: pwmconfig fails to find pwm capable sensor modules
Product: [Fedora] Fedora Reporter: Mace Moneta <moneta.mace>
Component: lm_sensorsAssignee: Phil Knirsch <pknirsch>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: mattdm, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-10 22:49:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mace Moneta 2005-01-17 03:09:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
When running pwmconfig to setup fan control, the script reports:

/usr/sbin/pwmconfig: No sensors found! (modprobe sensor modules?)

The pwm entries exist:

# ls /sys/bus/i2c/devices/2-0290/
alarms        fan2_div    in2_min    in5_max    in8_input    temp1_max
beep_enable   fan2_input  in3_input  in5_min    in8_max     
temp1_max_hyst
beep_mask     fan2_min    in3_max    in6_input  in8_min      temp1_type
detach_state  in0_input   in3_min    in6_max    name         temp2_input
driver        in0_max     in4_input  in6_min    power        temp2_max
fan1_div      in0_min     in4_max    in7_input  pwm1        
temp2_max_hyst
fan1_input    in2_input   in4_min    in7_max    pwm2         temp2_type
fan1_min      in2_max     in5_input  in7_min    temp1_input

Examining the pwmconfig script, it appears that a test is inverted. 
Instead of:


if [ "$SYSFS" = "1" ]
then
	MATCH='*/fan[1-9]_pwm'
else
	MATCH='*/pwm[1-9]'
fi


The code should read:


if [ "$SYSFS" = "1" ]
then
	MATCH='*/pwm[1-9]'
else
	MATCH='*/fan[1-9]_pwm'
fi


A patch is attached.  With this patch, the configuration completes
successfully.

Version-Release number of selected component (if applicable):
lm_sensors-2.8.7-2

How reproducible:
Always

Steps to Reproduce:
1.run pwmconfig
2.observe incorrect error notification
3.
    

Actual Results:  /usr/sbin/pwmconfig: No sensors found! (modprobe
sensor modules?)

Expected Results:  Successful configuration

Additional info:

Patch:

--- pwmconfig   2005-01-16 20:54:28.698230161 -0500
+++ pwmconfig.orig      2005-01-16 21:51:36.222988000 -0500
@@ -65,9 +65,9 @@
 
 if [ "$SYSFS" = "1" ]
 then
-       MATCH='*/pwm[1-9]'
-else
        MATCH='*/fan[1-9]_pwm'
+else
+       MATCH='*/pwm[1-9]'
 fi
 PWM=`echo $MATCH`
 if [ "$MATCH" = "$PWM" ]

Comment 1 Filip Tsachev 2005-03-15 12:25:20 UTC
how to apply this patch and is it applicable for lm 2.0.9?

Comment 2 Edwin Olson 2005-04-13 15:54:40 UTC
I can confirm the bug and that the patch seems to do the right thing on my
x86_64/nforce4 system.

On nforce4, with the retail CPU fan/heatsink, the default pwm step size of 15 is
too large; the fan is at full speed at pwm values > 15. Interesting values of
pwm are between [0, 10], so the step size of 15 misses all of that. Also, PDELAY
is a bit too fast for the big fan on this CPU.



Comment 3 Phil Knirsch 2005-10-10 12:36:40 UTC
The later versions of lm_sensors /usr/sbin/pwmconfig contain a more
sophisticated method of finding out the correct MATCH and should work in ever
secenario.

Please retest with FC4 or newer versions of lm_sensors.

Thanks,

Read ya, Phil

Comment 4 Mace Moneta 2005-10-23 23:20:13 UTC
This problem was reported in FC3, not FC4.

Comment 5 Matthew Miller 2006-07-10 22:38:46 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!