diff --git a/CHANGES b/CHANGES index eae6b521..c361d40d 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ SVN HEAD sensors: Clarify what option -u is good for pwmconfig: Print the initial PWM values Raise the detection threshold to 3/4 + Properly deal with multiple fan control sensors-detect: Add detection of AMD family 16h power sensors Map IT8771E, IT8772E, IT8782F and IT8783F to it87 Use /sys/module instead of /proc/modules where available diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index 2848fe33..1d5d9174 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -444,6 +444,7 @@ do let pwmactivecount=0 let count=1 + S_MIN= for j in $GOODFAN do OS=`echo $SPEEDS | cut -d' ' -f$count` @@ -462,7 +463,6 @@ do let pwmactivecount=1 pwmactive="$i ${pwmactive}" fanactive="$j ${fanactive}" - fanactive_min="$S ${fanactive_min}" # Give all correlated fans time to return to full speed sleep $DELAY @@ -473,8 +473,14 @@ do fi else fanactive="$j+${fanactive}" - fanactive_min="$S+${fanactive_min}" fi + + # Keep track of the slowest fan controlled by one PWM + if [ -z "$S_MIN" ] || [ $S -lt $S_MIN ] + then + S_MIN=$S + fi + S=`cat $j` if [ $S -lt $threshold ] then @@ -507,8 +513,11 @@ do if [ "$X" = "y" -o "$X" = "Y" ] then pwmactive="$i ${pwmactive}" + fanactive_min="0 $fanactive_min" fi echo + else + fanactive_min="$S_MIN $fanactive_min" fi done