Controlare viteza cooler

6 posts / 0 new
Last post
username
Controlare viteza cooler

Am un laptop care se cam incinge, vara fiind si cu o gramada de aplicatii deschise, folosesc mandriva 2009.0, intentionez sa dau viteza la maxim. please help

N3o
N3o's picture
Re: Controlare viteza cooler

1. Verifica in BIOS, cred ca e posibil sa controlezi turatia de acolo;
2. Curata-l de praf;
3. Vezi daca te ajuta pwmconfig.

ing. Patkos Csaba
ing. Patkos Csaba's picture
Re: Controlare viteza cooler

NOTA: Cei care vor doar turatie maxima, fara control asupra marjelor de temperatura la care sa reactioneze intr-un fel sau altul sistemul, sa execute doar comanda:echo "255" > /sys/class/hwmon/hwmon0/device/pwm1
NOTA2: Referitor la ventilator, pot exista si altele decat "pwm1" intr-un sistem, poate aveti 2-3-4 ventilatoare. Comanda se executa pentru toate.
NOTA3: Daca totul e OK adaugati comenzile de mai sus in fisierul /etc/rc.d/rc.local

Nah ... acest post m-a facut curios si fiind si o caldura insuportabila in casa ... si in computer, am zis ca trebuie si eu sa fac o astfel de setare, sa controlez mai bine ce si cum cu temperaturile. Va spunde acum ca nu e usor pentru un incepator, adica cunostinte de engleza obligatorii pentru ca programul te intreaba diferite chestii.
INAINTE SA VA APUCATI DE TREABA ASTA ASIGURATI-VA CA AVETI UN LMSENSORS FUNCTIONAL SI CARE REFLECTA VITEZA DE ROTATIE A VENTILATOARELEOR CORECT!
DE ASEMENEA, INCHIDETI ORICE PROGRAM INUTIL ASTFEL INCAT SA AVETI UTILIZARE DE PROCESOR MINIM. URMATOARE CONFIGURARE VA OPRI, PE PERIOADE SCURTE, VENTILATOARELE!!!
IN CAZ DE SUPRAINCALIRE RULATI COMANDA DE URGENTA EXPLICATA MAI JOS!!!

Pasul 1: deschideti 3 console (ma voi referi la ele de acum incolo ca si: C1, C2, C3) si le aranjati in asa fel incat sa le vedeti pe toate pe ecran si va faceti root cu comanda "su"
Pasul 2: in C3 setam afisearea sensorilor:watch -n 1 sensors
Pasul 3: in C2 pregatim comanda de urgenta:echo "255" > /sys/class/hwmon/hwmon0/device/pwm1oricand vedeti ca procesoarele se supraincalzesc, dati comanda aia si asteptati pana ce se racesc lucrurile.
Pasul 4: rulati pwmconfig in C1 si urmati toate instructiunile:

[root@localhost EF2]# pwmconfig                                                                                                                       
This program will search your sensors for pulse width modulation (pwm)                                                                                
controls, and test each one to see if it controls a fan on                                                                                            
your motherboard. Note that many motherboards do not have pwm                                                                                         
circuitry installed, even if your sensor chip supports pwm.                                                                                           

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed      
after testing. However, it is ** very important ** that you     
physically verify that the fans have been to full speed         
after the program has completed.                                

Found the following devices:
   hwmon0/device is w83627dhg
   hwmon1/device is coretemp 
   hwmon2/device is coretemp 

Found the following PWM controls:
   hwmon0/device/pwm1            
   hwmon0/device/pwm2            
hwmon0/device/pwm2 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as      
it is more efficient and it reacts faster. Are you sure that      
you want to setup this output for manual control? (n) y           
   hwmon0/device/pwm3                                             
   hwmon0/device/pwm4                                             
hwmon0/device/pwm4 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as      
it is more efficient and it reacts faster. Are you sure that      
you want to setup this output for manual control? (n) y           

Giving the fans some time to reach full speed...
Found the following fan sensors:                
   hwmon0/device/fan1_input     current speed: 0 ... skipping!
   hwmon0/device/fan2_input     current speed: 4687 RPM       
   hwmon0/device/fan3_input     current speed: 0 ... skipping!
   hwmon0/device/fan4_input     current speed: 3924 RPM       
   hwmon0/device/fan5_input     current speed: 0 ... skipping!

Warning!!! This program will stop your fans, one at a time,
for approximately 5 seconds each!!!                        
This may cause your processor temperature to rise!!!       
If you do not want to do this hit control-C now!!!         
Hit return to continue:                                    

Testing pwm control hwmon0/device/pwm1 ...
  hwmon0/device/fan2_input ... speed was 4687 now 4687
    no correlation                                    
  hwmon0/device/fan4_input ... speed was 3924 now 3924
    no correlation                                    

No correlations were detected.
There is either no fan connected to the output of hwmon0/device/pwm1,
or the connected fan has no rpm-signal connected to one of           
the tested fan sensors. (Note: not all motherboards have             
the pwm outputs connected to the fan connectors,                     
check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? 

Testing pwm control hwmon0/device/pwm2 ...
  hwmon0/device/fan2_input ... speed was 4687 now 860
    It appears that fan hwmon0/device/fan2_input     
    is controlled by pwm hwmon0/device/pwm2          
Would you like to generate a detailed correlation (y)? 
    PWM 255 FAN 4687                                   
    PWM 240 FAN 4687                                   
    PWM 225 FAN 4687                                   
    PWM 210 FAN 4560                                   
    PWM 195 FAN 4440                                   
    PWM 180 FAN 4218                                   
    PWM 165 FAN 3835                                   
    PWM 150 FAN 3515                                   
    PWM 135 FAN 3183                                   
    PWM 120 FAN 2860                                   
    PWM 105 FAN 2518                                   
    PWM 90 FAN 2220                                    
    PWM 75 FAN 1854                                    
    PWM 60 FAN 1854                                    
    PWM 45 FAN 1480                                    
    PWM 30 FAN 1095                                    
    PWM 28 FAN 912                                     
    PWM 26 FAN 874                                     
    PWM 24 FAN 847                                     
    PWM 22 FAN 819                                     
    PWM 20 FAN 792                                     
    PWM 18 FAN 774                                     
    PWM 16 FAN 746                                     
    PWM 14 FAN 730                                     
    PWM 12 FAN 730                                     
    PWM 10 FAN 727                                     
    PWM 8 FAN 718                                      
    PWM 6 FAN 700                                      
    PWM 4 FAN 706                                      
    PWM 2 FAN 706                                      
    PWM 0 FAN 694                                      

  hwmon0/device/fan4_input ... speed was 3924 now 3924
    no correlation                                    

Testing pwm control hwmon0/device/pwm3 ...
  hwmon0/device/fan2_input ... speed was 4687 now 4687
    no correlation                                    
  hwmon0/device/fan4_input ... speed was 3924 now 3924
    no correlation                                    

No correlations were detected.
There is either no fan connected to the output of hwmon0/device/pwm3,
or the connected fan has no rpm-signal connected to one of           
the tested fan sensors. (Note: not all motherboards have             
the pwm outputs connected to the fan connectors,                     
check out the hardware database on http://www.almico.com/forumindex.php)

Did you see/hear a fan stopping during the above test (n)? 

Testing pwm control hwmon0/device/pwm4 ...
  hwmon0/device/fan2_input ... speed was 4687 now 4821
    no correlation                                    
  hwmon0/device/fan4_input ... speed was 3924 now 0   
    It appears that fan hwmon0/device/fan4_input      
    is controlled by pwm hwmon0/device/pwm4           
Would you like to generate a detailed correlation (y)? 
    PWM 255 FAN 4017                                   
    PWM 240 FAN 3835                                   
    PWM 225 FAN 3668                                   
    PWM 210 FAN 3375                                   
    PWM 195 FAN 3125                                   
    PWM 180 FAN 3013                                   
    PWM 165 FAN 2721                                   
    PWM 150 FAN 2410                                   
    PWM 135 FAN 2163                                   
    PWM 120 FAN 2163                                   
    PWM 105 FAN 1917                                   
    PWM 90 FAN 1534                                    
    PWM 75 FAN 1171                                    
    PWM 60 FAN 1562                                    
    PWM 45 FAN 0                                       
    Fan Stopped at PWM = 45                            


Testing is complete.
Please verify that all fans have returned to their normal speed.

The fancontrol script can automatically respond to temperature changes
of your system by changing fanspeeds.                                 
Do you want to set up its configuration file now (y)?                 
What should be the path to your fancontrol config file (/etc/fancontrol)? 
/etc/fancontrol does not exist, shall I create it now (y)?                
Loading configuration from /etc/fancontrol ...                            

Select fan output to configure, or other action:
1) hwmon0/device/pwm4  3) Change INTERVAL     5) Save and quit
2) hwmon0/device/pwm2  4) Just quit           6) Show configuration

Pasul 5: Faceti modificarile din meniul de mai sus. Asignarea ventilator/temperatura trebuie facuta pe incercate ca systemul nu stie de la sine care e ventilatorul pe procesor si care e pe cutie (daca aveti mai multe ventilatoare). De asemenea tot acolo setati marjele de temperatura minime si maxim si rotatiile minime si maxime. Procedeul e ceva de genul:

Select fan output to configure, or other action:
1) hwmon0/device/pwm4  3) Change INTERVAL     5) Save and quit
2) hwmon0/device/pwm2  4) Just quit           6) Show configuration
select (1-n): 3                                                    

Current interval is 10 seconds.
Enter the interval at which fancontrol should update PWM values (in s):10
select (1-n): 6                                                          

Common Settings:
INTERVAL=10     

Settings of hwmon0/device/pwm4:
  Depends on                   
  Controls                     
  MINTEMP=                     
  MAXTEMP=                     
  MINSTART=                    
  MINSTOP=                     

Settings of hwmon0/device/pwm2:
  Depends on                   
  Controls                     
  MINTEMP=                     
  MAXTEMP=                     
  MINSTART=                    
  MINSTOP=                     

select (1-n): 1

Devices:
hwmon0/device is w83627dhg
hwmon1/device is coretemp 
hwmon2/device is coretemp 

Current temperature readings are as follows:
hwmon0/device/temp1_input       36          
hwmon0/device/temp2_input       44          
hwmon0/device/temp3_input       34          
hwmon1/device/temp1_input       43          
hwmon2/device/temp1_input       44          

Select a temperature sensor as source for hwmon0/device/pwm4:
1) hwmon0/device/temp1_input                                 
2) hwmon0/device/temp2_input                                 
3) hwmon0/device/temp3_input                                 
4) hwmon1/device/temp1_input                                 
5) hwmon2/device/temp1_input                                 
6) None (Do not affect this PWM output)                      
select (1-n): 2                                              

Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 

Enter the high temperature (degree C)
over which the fan should spin at maximum speed (60): 

Enter the minimum PWM value (0-255)
at which the fan STARTS spinning (press t to test) (150): t

Now we increase the PWM value in 10-unit-steps.
Let the fan stop completely, then press return until the
fan starts spinning. Then enter 'y'.                    
We will use this value +20 as the starting speed.       
Setting hwmon0/device/pwm4 to 10...                     
Setting hwmon0/device/pwm4 to 20...                     
Setting hwmon0/device/pwm4 to 30...                     
Setting hwmon0/device/pwm4 to 40...                     
Setting hwmon0/device/pwm4 to 50...                     
Setting hwmon0/device/pwm4 to 60...                     
Setting hwmon0/device/pwm4 to 70...                     
Setting hwmon0/device/pwm4 to 80...                     
Setting hwmon0/device/pwm4 to 90...                     
Setting hwmon0/device/pwm4 to 100...                    
Setting hwmon0/device/pwm4 to 110...                    
Setting hwmon0/device/pwm4 to 120...                    
Setting hwmon0/device/pwm4 to 130...                    
Setting hwmon0/device/pwm4 to 140...                    
Setting hwmon0/device/pwm4 to 150...                    
Setting hwmon0/device/pwm4 to 160...                    
Setting hwmon0/device/pwm4 to 170...                    
Setting hwmon0/device/pwm4 to 180...                    
Setting hwmon0/device/pwm4 to 190...                    
Setting hwmon0/device/pwm4 to 200...                    
Setting hwmon0/device/pwm4 to 210...^[[A^[[A^[[Bn       
OK, using 230                                           

Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100): 100

Enter the PWM value (0-100) to use when the temperature
is below the low temperature limit (0): 50             

Enter the PWM value (100-255) to use when the temperature
is over the high temperature limit (255): 200            

select (1-n): 1

Devices:
hwmon0/device is w83627dhg
hwmon1/device is coretemp 
hwmon2/device is coretemp 

Current temperature readings are as follows:
hwmon0/device/temp1_input       35          
hwmon0/device/temp2_input       43          
hwmon0/device/temp3_input       34          
hwmon1/device/temp1_input       42          
hwmon2/device/temp1_input       44          

Select a temperature sensor as source for hwmon0/device/pwm4:
1) hwmon0/device/temp1_input                                 
2) hwmon0/device/temp2_input                                 
3) hwmon0/device/temp3_input                                 
4) hwmon1/device/temp1_input                                 
5) hwmon2/device/temp1_input                                 
6) None (Do not affect this PWM output)                      
select (1-n): 1                                              

Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 20

Enter the high temperature (degree C)
over which the fan should spin at maximum speed (60): 40

Enter the minimum PWM value (0-255)
at which the fan STARTS spinning (press t to test) (150): t

Now we increase the PWM value in 10-unit-steps.
Let the fan stop completely, then press return until the
fan starts spinning. Then enter 'y'.                    
We will use this value +20 as the starting speed.       
Setting hwmon0/device/pwm4 to 10...                     
Setting hwmon0/device/pwm4 to 20...                     
Setting hwmon0/device/pwm4 to 30...                     
Setting hwmon0/device/pwm4 to 40...                     
Setting hwmon0/device/pwm4 to 50...                     
Setting hwmon0/device/pwm4 to 60...                     
Setting hwmon0/device/pwm4 to 70...                     
Setting hwmon0/device/pwm4 to 80...y                    
OK, using 100                                           

Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100): t

Now we decrease the PWM value in 10-unit-steps.
Let the fan reach full speed, then press return until the
fan stops spinning. Then enter 'y'.                      
We will use this value +20 as the minimum speed.         
Setting hwmon0/device/pwm4 to 245...                     
Setting hwmon0/device/pwm4 to 235...                     
Setting hwmon0/device/pwm4 to 225...                     
Setting hwmon0/device/pwm4 to 215...                     
Setting hwmon0/device/pwm4 to 205...                     
Setting hwmon0/device/pwm4 to 195...                     
Setting hwmon0/device/pwm4 to 185...                     
Setting hwmon0/device/pwm4 to 175...                     
Setting hwmon0/device/pwm4 to 165...                     
Setting hwmon0/device/pwm4 to 155...                     
Setting hwmon0/device/pwm4 to 145...                     
Setting hwmon0/device/pwm4 to 135...                     
Setting hwmon0/device/pwm4 to 125...                     
Setting hwmon0/device/pwm4 to 115...                     
Setting hwmon0/device/pwm4 to 105...                     
Setting hwmon0/device/pwm4 to 95...                      
Setting hwmon0/device/pwm4 to 85...                      
Setting hwmon0/device/pwm4 to 75...                      
Setting hwmon0/device/pwm4 to 65...                      
Setting hwmon0/device/pwm4 to 55...                      
Setting hwmon0/device/pwm4 to 45...y                     
OK, using 65                                             

Enter the PWM value (0-65) to use when the temperature
is below the low temperature limit (0): 60            

Enter the PWM value (65-255) to use when the temperature
is over the high temperature limit (255): 200           

select (1-n): 2

Devices:
hwmon0/device is w83627dhg
hwmon1/device is coretemp 
hwmon2/device is coretemp 

Current temperature readings are as follows:
hwmon0/device/temp1_input       35          
hwmon0/device/temp2_input       45          
hwmon0/device/temp3_input       34          
hwmon1/device/temp1_input       43          
hwmon2/device/temp1_input       45          

Select a temperature sensor as source for hwmon0/device/pwm2:
1) hwmon0/device/temp1_input                                 
2) hwmon0/device/temp2_input                                 
3) hwmon0/device/temp3_input                                 
4) hwmon1/device/temp1_input                                 
5) hwmon2/device/temp1_input                                 
6) None (Do not affect this PWM output)                      
select (1-n): 2                                              

Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 30

Enter the high temperature (degree C)
over which the fan should spin at maximum speed (60): 

Enter the minimum PWM value (0-255)
at which the fan STARTS spinning (press t to test) (150): t

Now we increase the PWM value in 10-unit-steps.
Let the fan stop completely, then press return until the
fan starts spinning. Then enter 'y'.                    
We will use this value +20 as the starting speed.       
Setting hwmon0/device/pwm2 to 10...                     
Setting hwmon0/device/pwm2 to 20...                     
Setting hwmon0/device/pwm2 to 30...                     
Setting hwmon0/device/pwm2 to 40...                     
Setting hwmon0/device/pwm2 to 50...y                    
OK, using 70                                            

Enter the minimum PWM value (0-255)
at which the fan STOPS spinning (press t to test) (100): t

Now we decrease the PWM value in 10-unit-steps.
Let the fan reach full speed, then press return until the
fan stops spinning. Then enter 'y'.                      
We will use this value +20 as the minimum speed.         
Setting hwmon0/device/pwm2 to 245...                     
Setting hwmon0/device/pwm2 to 235...                     
Setting hwmon0/device/pwm2 to 225...                     
Setting hwmon0/device/pwm2 to 215...                     
Setting hwmon0/device/pwm2 to 205...                     
Setting hwmon0/device/pwm2 to 195...                     
Setting hwmon0/device/pwm2 to 185...                     
Setting hwmon0/device/pwm2 to 175...                     
Setting hwmon0/device/pwm2 to 165...                     
Setting hwmon0/device/pwm2 to 155...                     
Setting hwmon0/device/pwm2 to 145...                     
Setting hwmon0/device/pwm2 to 135...                     
Setting hwmon0/device/pwm2 to 125...                     
Setting hwmon0/device/pwm2 to 115...                     
Setting hwmon0/device/pwm2 to 105...                     
Setting hwmon0/device/pwm2 to 95...                      
Setting hwmon0/device/pwm2 to 85...                      
Setting hwmon0/device/pwm2 to 75...                      
Setting hwmon0/device/pwm2 to 65...                      
Setting hwmon0/device/pwm2 to 55...                      
Setting hwmon0/device/pwm2 to 45...^[[A                  
OK, using 65                                             

Enter the PWM value (0-65) to use when the temperature
is below the low temperature limit (0): 40            

Enter the PWM value (65-255) to use when the temperature
is over the high temperature limit (255): 200           

select (1-n): 5

Saving configuration to /etc/fancontrol...
Configuration saved  

Pasul 6: testati setarile cu comanda:fancontrolAr trebui sa primiti un rezultat de genul:

Loading configuration from /etc/fancontrol ...

Common settings:
  INTERVAL=10   

Settings for hwmon0/device/pwm4:
  Depends on hwmon0/device/temp1_input
  Controls hwmon0/device/fan4_input
  MINTEMP=20
  MAXTEMP=40
  MINSTART=100
  MINSTOP=65
  MINPWM=60
  MAXPWM=200

Settings for hwmon0/device/pwm2:
  Depends on hwmon0/device/temp2_input
  Controls hwmon0/device/fan2_input
  MINTEMP=30
  MAXTEMP=60
  MINSTART=70
  MINSTOP=65
  MINPWM=40
  MAXPWM=200

Enabling PWM on fans...
Starting automatic fan control...

Pasul 6: daca totul este in regula, activati serviciul la pornirea sistemul. De exemplu punandu-l in /etc/rc.d/rc.local

Csabi's BLOG

Linux registered user # 457717

mandi
mandi's picture
Re: Controlare viteza cooler

Excelent tutorial, interesant. Plăcile mai noi cam fac asta automat, dacă nu greşesc – ajustează doar tensiunea (pe conectori 3 pin ai ventilatorului, fără pwm) în funcţie de temperatură.
Dacă tot ai săpat în direcţia asta, revin şi eu cu întrebarea de-acum un an, poate cineva dă din întâmplare peste vreo soluţie: cum setez cpu_governor pe ondemand în loc de performance, la pornire? (n-am nevoie de screensaver, etc)
Acelaşi CPU Core2 Quad Q6600 2.40GHz, fiecare core sare de la 2,4 la 1,6 în funcţie de cât îl forjez, cu mare influenţă pt. temperatură.
Azi mi s-a oprit de vreo 3 ori. In KDE am powerdevil, dar pe cooker, am doar LXDE, merge doar la max. (2.4GHz)
(Intre timp am pus şi aer cu condiţie – dar dacă dau drumu' la toate, pot să las toată scara blocului fără curent :D )

ing. Patkos Csaba
ing. Patkos Csaba's picture
Re: Controlare viteza cooler

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Daca nu ti se salveaza intre restarturi, baga comanda in /etc/rc.d/rc.local.
Mai multe aici: http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling

Csabi's BLOG

Linux registered user # 457717

mandi
mandi's picture
Re: Controlare viteza cooler

Merge perfect, mii multe mulţumiri!
/sys/devices/system/cpu/cpu1(,2,3)/cpufreq sunt doar symlink'uri la cpu0. Băgat în rc.local; am scăpat şi de poverdevil! Voi avea sub 150MB la pornire în KDE 4.2.4, mă apropii de LXDE ~130 (ambele cu compiz/emerald, icon volum, etc). Merci!