Change line 28 to
TMP=$(sensors | grep Physical | cut -b 18-19)
It should look like this:
TMP=$(tail /sys/class/hwmon/hwmon1/device/temp1_input | cut -b1-2)
Change line 28 to
TMP=$(sensors | grep Physical | cut -b 18-19)
It should look like this:
TMP=$(tail /sys/class/hwmon/hwmon1/device/temp1_input | cut -b1-2)
Last edited by k3mpaxl; March 3rd, 2013 at 05:22 PM.
The problem is that by me tempos are here:Code:linux@linux:~/4530s/FanControl$ sudo ./fanslow.sh [sudo] password for linux: tail: »/sys/class/hwmon/hwmon1/device/temp1_input“ kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
but temp 1 is always 0./sys/class/hwmon/hwmon0/device/temp1_input
See here too:
So, the temp 8 ist the nearest to CPU temp.Code:linux@linux:~/4530s/FanControl$ sensors acpitz-virtual-0 Adapter: Virtual device temp1: +0.0°C (crit = +127.0°C) temp2: +0.0°C (crit = +127.0°C) temp3: +11.0°C (crit = +128.0°C) temp4: +37.0°C (crit = +127.0°C) temp5: +0.0°C (crit = +115.0°C) temp6: +26.7°C (crit = +128.0°C) temp7: +0.0°C (crit = +128.0°C) temp8: +39.0°C (crit = +128.0°C) temp9: +44.0°C (crit = +128.0°C) temp10: +59.0°C (crit = +128.0°C) coretemp-isa-0000 Adapter: ISA adapter Core 0: +40.0°C (high = +95.0°C, crit = +105.0°C) Core 2: +39.0°C (high = +95.0°C, crit = +105.0°C)
So i change it that it look like here:
But still no change:Code:#!/bin/bash LOGFILE=/var/log/fanspeed.log ECFILE=/home/linux/4530s/FanControl/probook_ec.pl COUNTER=60 ###################################################### initOff() { setFan 80 sleep 2 $ECFILE FANOFF } setFan() { SPEED=$1 $ECFILE := 0x2F $SPEED } getTempAvg() { CUR=0 CPUTEMP=0 MAX=$1 while [ $CUR -lt $MAX ] do TMP=$(tail /sys/class/hwmon/hwmon0/temp8_input | cut -b1-2) let CPUTEMP=$CPUTEMP $TMP let CUR=$CUR+1 sleep 1 done let CPUTEMP=$CPUTEMP/$MAX } detectNewSpeed() { CPUTEMP=$1 CNTMAX=$2 INTERVAL=$3 if [ $CPUTEMP -le 65 ] then if [ $COUNTER -ge $CNTMAX ] then NEWSPEED=FF else NEWSPEED=80 let COUNTER=$COUNTER+$INTERVAL fi else let COUNTER=0 if [ $CPUTEMP -ge 80 ] then NEWSPEED=0 elif [ $CPUTEMP -ge 75 ] then NEWSPEED=49 elif [ $CPUTEMP -ge 70 ] then NEWSPEED=59 elif [ $CPUTEMP -ge 65 ] then NEWSPEED=65 elif [ $CPUTEMP -ge 60 ] then NEWSPEED=74 elif [ $CPUTEMP -gt 55 ] then NEWSPEED=80 fi fi echo $1:$NEWSPEED:$2:$COUNTER setFan $NEWSPEED } ################################################## initOff while [ true ] do INTERVAL=5 getTempAvg $INTERVAL detectNewSpeed $CPUTEMP 180 $INTERVAL done
The fan is few secs off, and than starts again...Code:linux@linux:~/4530s/FanControl$ sudo ./fanslow.sh 0:80:180:65 0:80:180:70 0:80:180:75 0:80:180:80 0:80:180:85 0:80:180:90 0:80:180:95 0:80:180:100 0:80:180:105 0:80:180:110 0:80:180:115 0:80:180:120 0:80:180:125 0:80:180:130
But i think we are near-just i am not expert-in dell i know there is a way to shut off BIOS fan control. It seems that after few secs HP Bios takes control over fan... How to avoid that?
Last edited by vickoxy; March 3rd, 2013 at 05:45 PM.
MacBook Pro7,1, Ubuntu 11.04 64bit
using the following should solve your problem:
TMP=$(sensors | grep Core | cut -b18-22 | sort -n | tail -n 1)
k3mpaxlCode:#!/bin/bash LOGFILE=/var/log/fanspeed.log ECFILE=/home/gregor/.4530s/FanControl/probook_ec.pl COUNTER=100 ###################################################### initOff() { setFan 80 sleep 2 $ECFILE FANOFF } setFan() { SPEED=$1 $ECFILE := 0x2F $SPEED } getTempAvg() { CUR=0 CPUTEMP=0 MAX=$1 while [ $CUR -lt $MAX ] do #TMP=$(sensors | grep Physical | cut -b 18-19) TMP=$(sensors | grep Core | cut -b18-22 | sort -n | tail -n 1) let CPUTEMP=$CPUTEMP+$TMP let CUR=$CUR+1 sleep 1 done let CPUTEMP=$CPUTEMP/$MAX } detectNewSpeed() { CPUTEMP=$1 CNTMAX=$2 INTERVAL=$3 if [ $CPUTEMP -le 55 ] then if [ $COUNTER -ge $CNTMAX ] then NEWSPEED=FF else NEWSPEED=80 let COUNTER=$COUNTER+$INTERVAL fi else let COUNTER=0 if [ $CPUTEMP -ge 80 ] then NEWSPEED=0 elif [ $CPUTEMP -ge 75 ] then NEWSPEED=49 elif [ $CPUTEMP -ge 70 ] then NEWSPEED=59 elif [ $CPUTEMP -ge 65 ] then NEWSPEED=65 elif [ $CPUTEMP -ge 60 ] then NEWSPEED=74 elif [ $CPUTEMP -gt 55 ] then NEWSPEED=80 fi fi echo $1:$NEWSPEED:$2:$COUNTER setFan $NEWSPEED } ################################################## initOff while [ true ] do INTERVAL=5 getTempAvg $INTERVAL detectNewSpeed $CPUTEMP 180 $INTERVAL done
Last edited by k3mpaxl; March 4th, 2013 at 01:03 PM.
Hi. Thanks for answer-i have some error now-and still no change in Fan Behavior.
Code:^Clinux@linux:~/4530s/FanControl$ sudo ./fanslow.sh ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\"). ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\"). ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\"). ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\"). ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\"). 0:80:180:105 ./fanslow.sh: Zeile 30: let: CPUTEMP=0+.0°C: Syntax Fehler: Operator erwartet. (Fehlerverursachendes Zeichen ist \".0°C\").
MacBook Pro7,1, Ubuntu 11.04 64bit
Thanks. So, the fan stops for few secs but than it start again:
So, not sure why. Could you tell me where are temps/fan speed adjustments, where can these be changed?Code:linux@linux:~/4530s/FanControl$ sudo ./fanslow.sh [sudo] password for linux: 0:80:180:65 0:80:180:70
MacBook Pro7,1, Ubuntu 11.04 64bit
Could you please post the output of the following commands:
k3mpaxlCode:sensors | grep Core sensors | grep Core | sed -e "s/ //g" sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 | sort -n sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 | sort -n | tail -n 1
Last edited by k3mpaxl; March 4th, 2013 at 04:09 PM.
Code:linux@linux:~$ sensors | grep Core Core 0: +40.0°C (high = +95.0°C, crit = +105.0°C) Core 2: +37.0°C (high = +95.0°C, crit = +105.0°C)Code:linux@linux:~$ sensors | grep Core | sed -e "s/ //g" Core0:+42.0°C(high=+95.0°C,crit=+105.0°C) Core2:+41.0°C(high=+95.0°C,crit=+105.0°C)Code:linux@linux:~$ sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" +41.0°C(high=+95.0°C,crit=+105.0°C) +39.0°C(high=+95.0°C,crit=+105.0°C)Code:linux@linux:~$ sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 40 38 linux@linux:~$Code:linux@linux:~$ sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 | sort -n 39 41Code:linux@linux:~$ sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 | sort -n | tail -n 1 40
MacBook Pro7,1, Ubuntu 11.04 64bit
The command to check the current cpu temp is correct.
An output like:
should not show up.Code:0:80:180:70 0:80:180:75 0:80:180:80 0:80:180:85
these numbers mean the following:
CPUTEMP:FANSPEED:Slow-Down-Limit:Slow-Down-Clock
I implemented this slow down-mechanism to avoid pulsing, once the timer reaches the limit, your fan will stop.
please check again fanslow.sh produces this output, post your fanslow.sh file here and post the output of this command:
Code:sudo ./probook_ec.pl regs
fanslow.sh:
Code:#!/bin/bash LOGFILE=/var/log/fanspeed.log ECFILE=/home/linux/4530s/FanControl/probook_ec.pl COUNTER=60 ###################################################### initOff() { setFan 80 sleep 2 $ECFILE FANOFF } setFan() { SPEED=$1 $ECFILE := 0x2F $SPEED } getTempAvg() { CUR=0 CPUTEMP=0 MAX=$1 while [ $CUR -lt $MAX ] do TMP=$(sensors | grep Core | sed -e "s/ //g" | cut -f2 -d ":" | cut -b2-3 | sort -n | tail -n 1) let CPUTEMP=$CPUTEMP $TMP let CUR=$CUR+1 sleep 1 done let CPUTEMP=$CPUTEMP/$MAX } detectNewSpeed() { CPUTEMP=$1 CNTMAX=$2 INTERVAL=$3 if [ $CPUTEMP -le 65 ] then if [ $COUNTER -ge $CNTMAX ] then NEWSPEED=FF else NEWSPEED=80 let COUNTER=$COUNTER+$INTERVAL fi else let COUNTER=0 if [ $CPUTEMP -ge 80 ] then NEWSPEED=0 elif [ $CPUTEMP -ge 75 ] then NEWSPEED=49 elif [ $CPUTEMP -ge 70 ] then NEWSPEED=59 elif [ $CPUTEMP -ge 65 ] then NEWSPEED=65 elif [ $CPUTEMP -ge 60 ] then NEWSPEED=74 elif [ $CPUTEMP -gt 55 ] then NEWSPEED=80 fi fi echo $1:$NEWSPEED:$2:$COUNTER setFan $NEWSPEED } ################################################## initOff while [ true ] do INTERVAL=5 getTempAvg $INTERVAL detectNewSpeed $CPUTEMP 180 $INTERVAL doneCode:linux@linux:~/4530s/FanControl$ sudo ./fanslow.sh [sudo] password for linux: 0:80:180:65 0:80:180:70 0:80:180:75 0:80:180:80 0:80:180:85 0:80:180:90 0:80:180:95 0:80:180:100 0:80:180:105 0:80:180:110 0:80:180:115 0:80:180:120 0:80:180:125Code:linux@linux:~/4530s/FanControl$ sudo ./probook_ec.pl regs 00 01 02 03 04 05 06 07 | 08 09 0A 0B 0C 0D 0E 0F __ __ __ __ __ __ __ __ | __ __ __ __ __ __ __ __ 00 | 190 251 146 1 98 129 2 0 | 172 192 78 0 209 147 0 0 10 | 0 0 0 0 144 99 1 0 | 31 15 42 1 213 48 166 128 20 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 30 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 40 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 50 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 60 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 70 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 80 | 0 0 4 1 16 1 0 20 | 15 236 19 255 255 178 19 255 90 | 255 1 1 0 77 48 42 0 | 01 0 255 255 142 5 207 A0 | 5 149 12 17 0 91 44 196 | 14 203 14 202 14 200 0 255 B0 | 255 150 0 255 255 100 255 192 | 0100 0 0 65 0 255 255 C0 | 255 255 255 255 255 255 255 0 | 032 95 211 62 51 51 54 D0 | 54 76 76 76 76 0 0 0 | 2255 255 255 255 255 255 255 E0 | 176 11 255 7 0 212 0 1 | 30 4 0 255 255 255 0 F0 | 0 0 0 0 0 0 0 0 | 00 0 0 0 0 0 0 linux@linux:~/4530s/FanControl$
MacBook Pro7,1, Ubuntu 11.04 64bit
Bookmarks