diff --git a/CHANGES b/CHANGES index 956348a7..e4468a78 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ SVN HEAD libsensors: Increase MAX_SENSORS_PER_TYPE to 24 Map individual beep features Change license to LGPL + pwmconfig: Sample all fan speeds before returning to full speed (#2380) sensors.conf.default: W83667HG config is similar to W83627EHF/DHG sensord: Fix support of multiple chips (#2377) sensors: Properly handle sensor input read errors diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index 2754bb53..3f14b2af 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -437,15 +437,19 @@ do echo '^C received, restoring PWM and aborting...' exit 1 fi + + # Sample all current fan speeds at once, so that we can quickly + # disable PWM and return all fans to full speed + CURRENT_SPEEDS="`cat $GOODFAN`" + pwmdisable $i + let pwmactivecount=0 let count=1 for j in $GOODFAN do OS=`echo $SPEEDS | cut -d' ' -f$count` - # this will return the first field if there's only one (sysfs) - S=`cat $j | cut -d' ' -f2` + S=`echo $CURRENT_SPEEDS | cut -d' ' -f$count` echo " $j ... speed was $OS now $S" - pwmdisable $i let threshold=2*$OS/3 if [ $S -lt $threshold ] then