mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-17 19:30:26 +00:00
When looking for pwm/fan correlations, sample all fans before returning
a given PWM output to full speed. The code used to only sample the first fan before doing so, so correlation with other fans could be missed. Problem reported by Charles Pillar. This closes ticket #2380. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5855 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d163984ca6
commit
eb40756d74
2 files changed
+8
-3
No files matched your search
@@ -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
|
||||
|
||||
+7
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user