You are not logged in.

#1 2017-04-20 09:56:39

farc
Member
Registered: 2014-03-05
Posts: 17

[SOLVED] fancontrol via echo > and hwmon / pwm / fan

Hey,
one of my fans became noisy and I want to figure out which one. Since I have all the rpm readings and interfaces available I can just switch them off one by one via software, must be an easy task right?

# cd /sys/class/hwmon/hwmon4/
# ls
beep_enable     in10_min    in3_beep   in9_max                   pwm2_auto_point1_temp       pwm3_auto_point3_temp     temp2_max_hyst
device          in11_alarm  in3_input  in9_min                   pwm2_auto_point2_pwm        pwm3_auto_point4_pwm      temp2_offset
fan1_alarm      in11_beep   in3_max    intrusion0_alarm          pwm2_auto_point2_temp       pwm3_auto_point4_temp     temp2_type
fan1_beep       in11_input  in3_min    intrusion0_beep           pwm2_auto_point3_pwm        pwm3_auto_point5_pwm      temp3_input
fan1_input      in11_max    in4_alarm  intrusion1_alarm          pwm2_auto_point3_temp       pwm3_auto_point5_temp     temp3_label
fan1_min        in11_min    in4_beep   intrusion1_beep           pwm2_auto_point4_pwm        pwm3_crit_temp_tolerance  temp3_offset
fan1_pulses     in12_alarm  in4_input  name                      pwm2_auto_point4_temp       pwm3_enable               temp3_type
fan1_target     in12_beep   in4_max    power                     pwm2_auto_point5_pwm        pwm3_floor                temp4_input
fan1_tolerance  in12_input  in4_min    pwm1                      pwm2_auto_point5_temp       pwm3_mode                 temp4_label
fan2_alarm      in12_max    in5_alarm  pwm1_auto_point1_pwm      pwm2_crit_temp_tolerance    pwm3_start                temp4_offset
fan2_beep       in12_min    in5_beep   pwm1_auto_point1_temp     pwm2_enable                 pwm3_step_down_time       temp4_type
fan2_input      in13_alarm  in5_input  pwm1_auto_point2_pwm      pwm2_floor                  pwm3_step_up_time         temp5_input
fan2_min        in13_beep   in5_max    pwm1_auto_point2_temp     pwm2_mode                   pwm3_stop_time            temp5_label
fan2_pulses     in13_input  in5_min    pwm1_auto_point3_pwm      pwm2_start                  pwm3_target_temp          temp5_offset
fan2_target     in13_max    in6_alarm  pwm1_auto_point3_temp     pwm2_step_down_time         pwm3_temp_sel             temp5_type
fan2_tolerance  in13_min    in6_beep   pwm1_auto_point4_pwm      pwm2_step_up_time           pwm3_temp_tolerance       temp6_input
fan3_alarm      in14_alarm  in6_input  pwm1_auto_point4_temp     pwm2_stop_time              subsystem                 temp6_label
fan3_beep       in14_beep   in6_max    pwm1_auto_point5_pwm      pwm2_target_temp            temp10_input              temp6_offset
fan3_input      in14_input  in6_min    pwm1_auto_point5_temp     pwm2_temp_sel               temp10_label              temp6_type
fan3_min        in14_max    in7_alarm  pwm1_crit_temp_tolerance  pwm2_temp_tolerance         temp1_alarm               temp7_input
fan3_pulses     in14_min    in7_beep   pwm1_enable               pwm2_weight_duty_base       temp1_beep                temp7_label
fan3_target     in1_alarm   in7_input  pwm1_floor                pwm2_weight_duty_step       temp1_input               temp8_input
fan3_tolerance  in1_beep    in7_max    pwm1_mode                 pwm2_weight_temp_sel        temp1_label               temp8_label
in0_alarm       in1_input   in7_min    pwm1_start                pwm2_weight_temp_step       temp1_max                 temp9_input
in0_beep        in1_max     in8_alarm  pwm1_step_down_time       pwm2_weight_temp_step_base  temp1_max_hyst            temp9_label
in0_input       in1_min     in8_beep   pwm1_step_up_time         pwm2_weight_temp_step_tol   temp1_offset              uevent
in0_max         in2_alarm   in8_input  pwm1_stop_time            pwm3                        temp1_type
in0_min         in2_beep    in8_max    pwm1_target_temp          pwm3_auto_point1_pwm        temp2_alarm
in10_alarm      in2_input   in8_min    pwm1_temp_sel             pwm3_auto_point1_temp       temp2_beep
in10_beep       in2_max     in9_alarm  pwm1_temp_tolerance       pwm3_auto_point2_pwm        temp2_input
in10_input      in2_min     in9_beep   pwm2                      pwm3_auto_point2_temp       temp2_label
in10_max        in3_alarm   in9_input  pwm2_auto_point1_pwm      pwm3_auto_point3_pwm        temp2_max

What I tried so far:

# cat pwm1
153
[root@cray hwmon4]# cat pwm1_mode 
1
[root@cray hwmon4]# cat pwm1_start 
1
[root@cray hwmon4]# echo 0 > pwm1_start  // does nothing
[root@cray hwmon4]# cat pwm1_start      
1
[root@cray hwmon4]# cat fan1_target 
0
[root@cray hwmon4]# echo 0 > fan1_input 
bash: fan1_input: Permission denied
[root@cray hwmon4]# cat pwm1_enable 
5
[root@cray hwmon4]# echo 0 > pwm1_enable // sets fan to max rpm
[root@cray hwmon4]# echo 1 > pwm1_enable   // sets fan to max rpm
[root@cray hwmon4]# echo 2 > pwm1_enable   // sets fan to max rpm
[root@cray hwmon4]# echo 3 > pwm1_enable   // sets fan to max rpm
[root@cray hwmon4]# echo 4 > pwm1_enable  
bash: echo: write error: Invalid argument
[root@cray hwmon4]# echo 5 > pwm1_enable 
[root@cray hwmon4]# echo 0 > pwm1_start  // does nothing
[root@cray hwmon4]# cat fan1_min 
0
[root@cray hwmon4]# cat pwm1_floor 
1

So yeah I'm lost here, can someon enlighten me what I need to echo to actually disable the fan????
Ty

PS:
Already tried pwmconfig, which rans fine but doesn't help me here. 'fancontrol' only reports the usual "Error: Can't read configuration file".

Last edited by farc (2017-04-22 13:27:24)

Offline

#2 2017-04-20 13:59:26

Tétrapyle
Member
Registered: 2014-01-03
Posts: 61

Re: [SOLVED] fancontrol via echo > and hwmon / pwm / fan

Did you run pwmconfig with superuser privileges (with sudo)?
If so, look in the file /etc/fancontrol .

Offline

#3 2017-04-20 15:52:14

Gosi
Member
From: Vienna, Austria
Registered: 2010-02-25
Posts: 103

Re: [SOLVED] fancontrol via echo > and hwmon / pwm / fan

The easy solution is to block the fans manually one after another for a short period of time(!) to find out which is the noisy one.

Or you can find out which sensor chip you have and check the meaning and allowed values in the appropriate sub directory of the kernel documentation:
https://www.kernel.org/doc/Documentation/hwmon

Offline

#4 2017-04-20 23:01:04

farc
Member
Registered: 2014-03-05
Posts: 17

Re: [SOLVED] fancontrol via echo > and hwmon / pwm / fan

Yes, I ran pwmconfig with sudo.

Stopping by fans is not really the easy solution. First of all I need to open the chassis, which changes the sound already. And then I would also be right next to it, as to normally on my table. (The Noise is very subtle).

pwmconfig list these sensors:
Found the following devices:
   hwmon4 is nct6791

and https://www.kernel.org/doc/Documentation/hwmon/nct6775

sysfs attributes
----------------

pwm[1-5] - this file stores PWM duty cycle or DC value (fan speed) in range:
       0 (lowest speed) to 255 (full)

pwm[1-5]_enable - this file controls mode of fan/temperature control:
    * 0 Fan control disabled (fans set to maximum speed)
    * 1 Manual mode, write to pwm[0-5] any value 0-255
    * 2 "Thermal Cruise" mode
    * 3 "Fan Speed Cruise" mode
    * 4 "Smart Fan III" mode (NCT6775F only)
    * 5 "Smart Fan IV" mode

pwm[1-5]_mode - controls if output is PWM or DC level
        * 0 DC output
        * 1 PWM output

Ah, there we go, so lets see...

Offline

#5 2017-04-22 13:26:54

farc
Member
Registered: 2014-03-05
Posts: 17

Re: [SOLVED] fancontrol via echo > and hwmon / pwm / fan

Yep, that works, ty

Offline

Board footer

Powered by FluxBB