Olej писал(а): ↑06 фев 2022, 16:17
3). (планирую) fancontrol
Делаем (генерируем) конфиг-файл...
Код: Выделить всё
root@ESPRIMO:/etc# pwmconfig
# pwmconfig version 3.6.0
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 is acpitz
hwmon1 is coretemp
hwmon2/device is w83667hg
hwmon3 is pch_haswell
Found the following PWM controls:
hwmon2/device/pwm1 current value: 55
hwmon2/device/pwm1 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)
hwmon2/device/pwm2 current value: 207
hwmon2/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
hwmon2/device/pwm3 current value: 1
hwmon2/device/pwm3 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)
Giving the fans some time to reach full speed...
Found the following fan sensors:
hwmon2/device/fan1_input current speed: 0 ... skipping!
hwmon2/device/fan2_input current speed: 4218 RPM
hwmon2/device/fan3_input current speed: 0 ... skipping!
hwmon2/device/fan4_input current speed: 0 ... skipping!
hwmon2/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 hwmon2/device/pwm2 ...
hwmon2/device/fan2_input ... speed was 4218 now 1240
It appears that fan hwmon2/device/fan2_input
is controlled by pwm hwmon2/device/pwm2
Would you like to generate a detailed correlation (y)?
PWM 255 FAN 4017
PWM 240 FAN 4017
PWM 225 FAN 3835
PWM 210 FAN 3835
PWM 195 FAN 3245
PWM 180 FAN 2721
PWM 165 FAN 2721
PWM 150 FAN 2280
PWM 135 FAN 1875
PWM 120 FAN 1875
PWM 105 FAN 1506
PWM 90 FAN 1140
PWM 75 FAN 937
PWM 60 FAN 937
PWM 45 FAN 852
PWM 30 FAN 843
PWM 28 FAN 843
PWM 26 FAN 843
PWM 24 FAN 852
PWM 22 FAN 852
PWM 20 FAN 843
PWM 18 FAN 843
PWM 16 FAN 843
PWM 14 FAN 843
PWM 12 FAN 843
PWM 10 FAN 843
PWM 8 FAN 852
PWM 6 FAN 843
PWM 4 FAN 843
PWM 2 FAN 843
PWM 0 FAN 852
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)?
Loading configuration from /etc/fancontrol ...
Select fan output to configure, or other action:
1) hwmon2/device/pwm2
2) Change INTERVAL
3) Just quit
4) Save and quit
5) Show configuration
select (1-n): 1
Devices:
hwmon0 is acpitz
hwmon1 is coretemp
hwmon2/device is w83667hg
hwmon3 is pch_haswell
Current temperature readings are as follows:
hwmon0/temp1_input 27
hwmon0/temp2_input 29
hwmon1/temp1_input 79
hwmon1/temp2_input 77
hwmon1/temp3_input 78
hwmon1/temp4_input 77
hwmon1/temp5_input 74
hwmon2/device/temp1_input 41
hwmon2/device/temp2_input 79
hwmon2/device/temp3_input -128
hwmon3/temp1_input 54
Select a temperature sensor as source for hwmon2/device/pwm2:
1) hwmon0/temp1_input 5) hwmon1/temp3_input 9) hwmon2/device/temp2_input
2) hwmon0/temp2_input 6) hwmon1/temp4_input 10) hwmon2/device/temp3_input
3) hwmon1/temp1_input 7) hwmon1/temp5_input 11) hwmon3/temp1_input
4) hwmon1/temp2_input 8) hwmon2/device/temp1_input 12) None (Do not affect this PWM output)
select (1-n): 3
Enter the low temperature (degree C)
below which the fan should spin at minimum speed (20): 45
Enter the high temperature (degree C)
over which the fan should spin at maximum speed (60): 75
Enter the PWM value (0-255) to use when the temperature
is over the high temperature limit (255):
Select fan output to configure, or other action:
1) hwmon2/device/pwm2
2) Change INTERVAL
3) Just quit
4) Save and quit
5) Show configuration
select (1-n): 4
Saving configuration to /etc/fancontrol...
Configuration saved
Вот он:
Код: Выделить всё
root@ESPRIMO:/etc# ls -l /etc/fancontrol
-rw-r--r-- 1 root root 424 фев 6 15:35 /etc/fancontrol
Код: Выделить всё
root@ESPRIMO:/etc# cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon1=devices/platform/coretemp.0 hwmon2=devices/platform/w83627ehf.2560
DEVNAME=hwmon1=coretemp hwmon2=w83667hg
FCTEMPS= hwmon2/device/pwm2=hwmon1/temp1_input
FCFANS= hwmon2/device/pwm2=hwmon2/device/fan2_input
MINTEMP= hwmon2/device/pwm2=45
MAXTEMP= hwmon2/device/pwm2=75
MINSTART= hwmon2/device/pwm2=150
MINSTOP= hwmon2/device/pwm2=0
И запускаю fancontrol как сервис (но его можно запускать и как команда!):
Код: Выделить всё
root@ESPRIMO:/etc# systemctl start fancontrol
Код: Выделить всё
root@ESPRIMO:/etc# systemctl status fancontrol
● fancontrol.service - fan speed regulator
Loaded: loaded (/lib/systemd/system/fancontrol.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-02-06 15:37:04 EET; 6s ago
Docs: man:fancontrol(8)
man:pwmconfig(8)
Process: 10938 ExecStartPre=/usr/sbin/fancontrol --check (code=exited, status=0/SUCCESS)
Main PID: 11040 (fancontrol)
Tasks: 2 (limit: 14183)
Memory: 4.1M
CGroup: /system.slice/fancontrol.service
├─11040 /bin/bash /usr/sbin/fancontrol
└─11180 sleep 10
фев 06 15:37:04 ESPRIMO fancontrol[11040]: Controls hwmon2/device/fan2_input
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MINTEMP=45
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MAXTEMP=75
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MINSTART=150
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MINSTOP=0
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MINPWM=0
фев 06 15:37:04 ESPRIMO fancontrol[11040]: MAXPWM=255
фев 06 15:37:04 ESPRIMO fancontrol[11040]: AVERAGE=1
фев 06 15:37:04 ESPRIMO fancontrol[11040]: Enabling PWM on fans...
фев 06 15:37:04 ESPRIMO fancontrol[11040]: Starting automatic fan control...
Код: Выделить всё
root@ESPRIMO:/etc# systemctl is-enabled fancontrol
enabled
В итоге:
Код: Выделить всё
olej@ESPRIMO:~$ sensors coretemp-isa-0000
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +72.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +71.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +71.0°C (high = +80.0°C, crit = +100.0°C)
Core 2: +71.0°C (high = +80.0°C, crit = +100.0°C)
Core 3: +67.0°C (high = +80.0°C, crit = +100.0°C)
Вот как выглядит картинка (обороты-температура) после установления такого авторегулирования: