управление кулерами

Обмен опытом по установке Линукс на разные аппаратные конфигурации

Модераторы: Olej, vikos

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 06 фев 2022, 16:17

Olej писал(а):
06 фев 2022, 16:07
Может это и годится... но я настрою Linux механизмы управления температурой....

Код: Выделить всё

olej@ESPRIMO:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20.3
Release:	20.3
Codename:	una
Как оказалось :-o ... в системе работает ещё 1 дополнительный механизм-демон thermald :

Код: Выделить всё

olej@ESPRIMO:~$ systemctl status thermald
● thermald.service - Thermal Daemon Service
     Loaded: loaded (/lib/systemd/system/thermald.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-02-06 12:39:05 EET; 1h 33min ago
   Main PID: 693 (thermald)
      Tasks: 2 (limit: 14183)
     Memory: 4.0M
     CGroup: /system.slice/thermald.service
             └─693 /usr/sbin/thermald --systemd --dbus-enable --adaptive

фев 06 12:39:05 ESPRIMO thermald[693]: Polling mode is enabled: 4
фев 06 12:39:05 ESPRIMO thermald[693]: sensor id 7 : No temp sysfs for reading raw temp
фев 06 12:39:05 ESPRIMO thermald[693]: sensor id 7 : No temp sysfs for reading raw temp
фев 06 12:39:05 ESPRIMO thermald[693]: sensor id 7 : No temp sysfs for reading raw temp
фев 06 12:39:05 ESPRIMO thermald[693]: I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
фев 06 12:39:05 ESPRIMO thermald[693]: error: could not parse file /etc/thermald/thermal-conf.xml
фев 06 12:39:05 ESPRIMO thermald[693]: I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
фев 06 12:39:05 ESPRIMO thermald[693]: error: could not parse file /etc/thermald/thermal-conf.xml
фев 06 12:39:05 ESPRIMO thermald[693]: I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
фев 06 12:39:05 ESPRIMO thermald[693]: error: could not parse file /etc/thermald/thermal-conf.xml

Код: Выделить всё

olej@ESPRIMO:~$ systemctl is-enabled thermald
enabled
Причём он стартует при загрузке системы + стартует в обломанном виде, ... для него вообще нет конфигурационного XML файла:

Код: Выделить всё

[code]
olej@ESPRIMO:~$ ls -l /etc/thermald
итого 4
-rw-r--r-- 1 root root 508 авг 31 11:36 thermal-cpu-cdev-order.xml
Это слишком много: наперегонки работают 1)/ механизмы управления BIOS + 2). thermald + 3). (планирую) fancontrol :!: :evil:
Поэтому пока так:

Код: Выделить всё

root@ESPRIMO:/usr/share/doc# systemctl stop thermald

Код: Выделить всё

root@ESPRIMO:~# systemctl disable thermald
Removed /etc/systemd/system/dbus-org.freedesktop.thermald.service.
Removed /etc/systemd/system/multi-user.target.wants/thermald.service.

root@ESPRIMO:~# systemctl is-enabled thermald
disabled

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 06 фев 2022, 16:44

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)
Вот как выглядит картинка (обороты-температура) после установления такого авторегулирования:
Вложения
Снимок экрана от 2022-02-06 15-48-59.png
Снимок экрана от 2022-02-06 15-48-59.png (238.01 КБ) 761 просмотр

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 14:17

Olej писал(а):
05 фев 2022, 13:48
в Linux по этому поводу много понаписано
Но! :oops: Fedora:

Код: Выделить всё

[olej@xenix ~]$ lsb_release -a
LSB Version:   :core-4.1-amd64:core-4.1-noarch
Distributor ID:     Fedora
Description:   Fedora release 35 (Thirty Five)
Release:  35
Codename: ThirtyFive
Ищем пакеты:

Код: Выделить всё

[olej@xenix ~]$ dnf search psensor
Последняя проверка окончания срока действия метаданных: 3:20:32 назад, Пт 03 июн 2022 11:17:46.
Нет совпадений.

Код: Выделить всё

[olej@xenix ~]$ dnf search fancontrol
Последняя проверка окончания срока действия метаданных: 2:50:23 назад, Пт 03 июн 2022 11:17:46.
================================================================ Имя совпадение: fancontrol ================================================================
hddfancontrol.noarch : Control system fan speed by monitoring hard drive temperature
Но тогда:

Код: Выделить всё

[olej@xenix ~]$ dnf provides fancontrol
Последняя проверка окончания срока действия метаданных: 2:50:45 назад, Пт 03 июн 2022 11:17:46.
lm_sensors-3.6.0-10.fc35.x86_64 : Hardware monitoring tools
Репозиторий        : @System
Совпадения с:
Имя файла   : /usr/sbin/fancontrol

lm_sensors-3.6.0-10.fc35.x86_64 : Hardware monitoring tools
Репозиторий        : fedora
Совпадения с:
Имя файла   : /usr/sbin/fancontrol

[olej@xenix ~]$ dnf search psensor
Последняя проверка окончания срока действия метаданных: 2:52:32 назад, Пт 03 июн 2022 11:17:46.
Нет совпадений.
[olej@xenix ~]$ lsb_release -a
LSB Version:   :core-4.1-amd64:core-4.1-noarch
Distributor ID:     Fedora
Description:   Fedora release 35 (Thirty Five)
Release:  35
Codename: ThirtyFive

Код: Выделить всё

[olej@xenix 2022]$ dnf provides pwmconfig
Последняя проверка окончания срока действия метаданных: 2:53:42 назад, Пт 03 июн 2022 11:17:46.
lm_sensors-3.6.0-10.fc35.x86_64 : Hardware monitoring tools
Репозиторий        : @System
Совпадения с:
Имя файла   : /usr/sbin/pwmconfig

lm_sensors-3.6.0-10.fc35.x86_64 : Hardware monitoring tools
Репозиторий        : fedora
Совпадения с:
Имя файла   : /usr/sbin/pwmconfig
Они их устанавливают в составе lm_sensors!
И устанавливаются вот сюда:

Код: Выделить всё

[root@xenix ~]# which pwmconfig
/usr/sbin/pwmconfig

[root@xenix ~]# which fancontrol
/usr/sbin/fancontrol

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 14:37

Olej писал(а):
03 июн 2022, 14:17
Но! Fedora:

Код: Выделить всё

Процессор:
[olej@xenix 2022]$ inxi -Cxxx
CPU:
  Info: quad core model: Intel Core i7-4870HQ bits: 64 type: MT MCP
    smt: enabled arch: Haswell rev: 1 cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 3242 high: 3293 min/max: 800/3700 cores: 1: 3286
    2: 3193 3: 3225 4: 3293 5: 3211 6: 3193 7: 3252 8: 3289 bogomips: 39911
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Загрузка близкая к предельной, 100%, 4 (физических) ядра:

Код: Выделить всё

[olej@xenix 2022]$ uptime
 14:25:51 up  3:28,  1 user,  load average: 4,36, 4,45, 4,38

Код: Выделить всё

Температура ядер:
[olej@xenix 2022]$ sensors coretemp-isa-0000
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +98.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:        +88.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:        +93.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:        +98.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:        +90.0°C  (high = +84.0°C, crit = +100.0°C)
Кулер:

Код: Выделить всё

[olej@xenix 2022]$ sensors w83667hg-isa-0000 | grep fan2
fan2:         3835 RPM  (min =  426 RPM, div = 16)
Но ... что мне странно:

Код: Выделить всё

[root@xenix ~]# systemctl status fancontrol
○ fancontrol.service - Start fan control, if configured
     Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 14:47

Olej писал(а):
05 фев 2022, 17:07
Меня пока интересует ручное управление, чтобы посмотреть (послушать) как шум конкретного кулера зависит оборотов, и как температура зависит от оборотов....
Но сначала сбросить 100% нагрузку с процессоров...

Код: Выделить всё

[olej@xenix 2022]$ uptime
 14:45:49 up  3:48,  1 user,  load average: 1,49, 3,45, 4,00
Процесс пошёл...
Процессоры остывают:

Код: Выделить всё

[olej@xenix 2022]$ sensors coretemp-isa-0000
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +53.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:        +52.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:        +50.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:        +50.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:        +50.0°C  (high = +84.0°C, crit = +100.0°C)

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 15:01

Первейшее дело - выяснить какие термальные зоны отвечают за что? (у меня есть сильное подозрение, что в разных дистрибутивах? системах? конфигурациях железа? - их нумерация отличается!)
Термальные зоны (видимые в sensors):

Код: Выделить всё

[olej@xenix xmrig-6.15.2-static]$ ls -l /sys/class/hwmon/hwmon*
lrwxrwxrwx 1 root root 0 июн  3 11:34 /sys/class/hwmon/hwmon0 -> ../../devices/virtual/thermal/thermal_zone0/hwmon0
lrwxrwxrwx 1 root root 0 июн  3 11:34 /sys/class/hwmon/hwmon1 -> ../../devices/virtual/thermal/thermal_zone2/hwmon1
lrwxrwxrwx 1 root root 0 июн  3 13:20 /sys/class/hwmon/hwmon2 -> ../../devices/platform/coretemp.0/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 июн  3 13:20 /sys/class/hwmon/hwmon3 -> ../../devices/platform/w83627ehf/hwmon/hwmon3
Интересующая меня зона кулера - 3 (почему так не знаю):

Код: Выделить всё

[olej@xenix xmrig-6.15.2-static]$ ls -l /sys/class/hwmon/hwmon3/fan2*
-r--r--r-- 1 root root 4096 июн  3 13:20 /sys/class/hwmon/hwmon3/fan2_alarm
-r--r--r-- 1 root root 4096 июн  3 13:20 /sys/class/hwmon/hwmon3/fan2_div
-r--r--r-- 1 root root 4096 июн  3 13:20 /sys/class/hwmon/hwmon3/fan2_input
-rw-r--r-- 1 root root 4096 июн  3 13:20 /sys/class/hwmon/hwmon3/fan2_min

Код: Выделить всё

[olej@xenix xmrig-6.15.2-static]$ ls -l /sys/class/hwmon/hwmon3/pwm2*
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_enable
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_max_output
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_mode
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_start_output
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_step_output
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_stop_output
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_stop_time
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_target
-rw-r--r-- 1 root root 4096 июн  3 14:42 /sys/class/hwmon/hwmon3/pwm2_tolerance

Код: Выделить всё

[olej@xenix hwmon3]$ sensors w83667hg-isa-0000 | grep fan2
fan2:         1259 RPM  (min =  426 RPM, div = 16)

Код: Выделить всё

[olej@xenix hwmon3]$ cat /sys/class/hwmon/hwmon3/fan2_input 
1240

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 15:04

Olej писал(а):
03 июн 2022, 15:01
Интересующая меня зона кулера - 3 (почему так не знаю):
А зона процессоров - 2 (из 0, 1, 2, 3)

Код: Выделить всё

[olej@xenix hwmon2]$ cat /sys/class/hwmon/hwmon2/name
coretemp

Код: Выделить всё

[olej@xenix hwmon2]$ sensors coretemp-isa-0000
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +45.0°C  (high = +84.0°C, crit = +100.0°C)
Core 0:        +45.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:        +44.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:        +45.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:        +43.0°C  (high = +84.0°C, crit = +100.0°C)

Код: Выделить всё

[olej@xenix hwmon2]$ cat /sys/class/hwmon/hwmon2/temp*_input 
46000
44000
44000
46000
43000

Код: Выделить всё

[olej@xenix hwmon2]$ ls /sys/class/hwmon/hwmon2/temp*_label
/sys/class/hwmon/hwmon2/temp1_label  /sys/class/hwmon/hwmon2/temp3_label  /sys/class/hwmon/hwmon2/temp5_label
/sys/class/hwmon/hwmon2/temp2_label  /sys/class/hwmon/hwmon2/temp4_label

Код: Выделить всё

[olej@xenix hwmon2]$ cat /sys/class/hwmon/hwmon2/temp*_label
Package id 0
Core 0
Core 1
Core 2
Core 3

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 19:29

Olej писал(а):
03 июн 2022, 14:47
Процессоры остывают:
Включаю автоматическое управление кулером!
Olej писал(а):
03 июн 2022, 14:37
[root@xenix ~]# systemctl status fancontrol
○ fancontrol.service - Start fan control, if configured
Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Вот здесь оно было отключено.

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 19:30

Olej писал(а):
03 июн 2022, 19:29
Включаю автоматическое управление кулером!
Тестирование и связывание...
Тут важно ответы которые отвечаем:

Код: Выделить всё

[root@xenix ~]# 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 pch_haswell
   hwmon2 is coretemp
   hwmon3 is w83667hg

Found the following PWM controls:
   hwmon3/pwm1           current value: 75
hwmon3/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) y
   hwmon3/pwm2           current value: 102
hwmon3/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
   hwmon3/pwm3           current value: 1
hwmon3/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) y

Giving the fans some time to reach full speed...
Found the following fan sensors:
   hwmon3/fan1_input     current speed: 0 ... skipping!
   hwmon3/fan2_input     current speed: 4017 RPM
   hwmon3/fan3_input     current speed: 0 ... skipping!
   hwmon3/fan4_input     current speed: 0 ... skipping!
   hwmon3/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 hwmon3/pwm1 ...
  hwmon3/fan2_input ... speed was 4017 now 4017
    no correlation

No correlations were detected.
There is either no fan connected to the output of hwmon3/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)? n

Testing pwm control hwmon3/pwm2 ...
  hwmon3/fan2_input ... speed was 4017 now 907
    It appears that fan hwmon3/fan2_input
    is controlled by pwm hwmon3/pwm2
Would you like to generate a detailed correlation (y)? 
Note: If you had gnuplot installed, I could generate a graphical plot.
    PWM 255 FAN 4017
    PWM 240 FAN 4017
    PWM 225 FAN 4017
    PWM 210 FAN 3835
    PWM 195 FAN 3125
    PWM 180 FAN 3125
    PWM 165 FAN 2721
    PWM 150 FAN 2220
    PWM 135 FAN 2220
    PWM 120 FAN 1875
    PWM 105 FAN 1480
    PWM 90 FAN 1480
    PWM 75 FAN 1110
    PWM 60 FAN 917
    PWM 45 FAN 917
    PWM 30 FAN 878
    PWM 28 FAN 860
    PWM 26 FAN 860
    PWM 24 FAN 869
    PWM 22 FAN 852
    PWM 20 FAN 869
    PWM 18 FAN 869
    PWM 16 FAN 860
    PWM 14 FAN 869
    PWM 12 FAN 869
    PWM 10 FAN 852
    PWM 8 FAN 869
    PWM 6 FAN 869
    PWM 4 FAN 852
    PWM 2 FAN 869
    PWM 0 FAN 869


Testing pwm control hwmon3/pwm3 ...
  hwmon3/fan2_input ... speed was 4017 now 4017
    no correlation

No correlations were detected.
There is either no fan connected to the output of hwmon3/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 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)? 

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

Devices:
hwmon0 is acpitz
hwmon1 is pch_haswell
hwmon2 is coretemp
hwmon3 is w83667hg

Current temperature readings are as follows:
hwmon0/temp1_input	27
hwmon0/temp2_input	29
hwmon1/temp1_input	61
hwmon2/temp1_input	37
hwmon2/temp2_input	36
hwmon2/temp3_input	37
hwmon2/temp4_input	37
hwmon2/temp5_input	36
hwmon3/temp1_input	41
hwmon3/temp2_input	38
hwmon3/temp3_input	117

Select a temperature sensor as source for hwmon3/pwm2:
1) hwmon0/temp1_input			   5) hwmon2/temp2_input		     9) hwmon3/temp1_input
2) hwmon0/temp2_input			   6) hwmon2/temp3_input		    10) hwmon3/temp2_input
3) hwmon1/temp1_input			   7) hwmon2/temp4_input		    11) hwmon3/temp3_input
4) hwmon2/temp1_input			   8) hwmon2/temp5_input		    12) None (Do not affect this PWM output)
select (1-n): 7

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

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

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) hwmon3/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

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: управление кулерами

Непрочитанное сообщение Olej » 03 июн 2022, 19:35

Olej писал(а):
03 июн 2022, 19:30
Тестирование и связывание...
Он здесь оттестировал управляющее воздействие (0-255) на кулер от оборотов + увязал этот кулер с термальной зоной (датчиком температуры, ядром) + создал конфиг файл:

Код: Выделить всё

[root@xenix ~]# cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon2=devices/platform/coretemp.0 hwmon3=devices/platform/w83627ehf
DEVNAME=hwmon2=coretemp hwmon3=w83667hg
FCTEMPS=hwmon3/pwm2=hwmon2/temp4_input
FCFANS= hwmon3/pwm2=hwmon3/fan2_input
MINTEMP=hwmon3/pwm2=40
MAXTEMP=hwmon3/pwm2=80
MINSTART=hwmon3/pwm2=150
MINSTOP=hwmon3/pwm2=0
И теперь можно запустить сервис слежения:

Код: Выделить всё

[root@xenix ~]# systemctl start fancontrol
И результат:

Код: Выделить всё

[root@xenix ~]# systemctl status fancontrol
● fancontrol.service - Start fan control, if configured
     Loaded: loaded (/usr/lib/systemd/system/fancontrol.service; disabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-06-03 16:43:25 EEST; 24s ago
   Main PID: 59584 (fancontrol)
      Tasks: 2 (limit: 9408)
     Memory: 1.4M
     CGroup: /system.slice/fancontrol.service
             ├─ 59584 /usr/bin/bash /usr/sbin/fancontrol
             └─ 59734 sleep 10

июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   Controls hwmon3/fan2_input
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MINTEMP=40
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MAXTEMP=80
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MINSTART=150
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MINSTOP=0
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MINPWM=0
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   MAXPWM=255
июн 03 16:43:25 xenix.localdomain fancontrol[59584]:   AVERAGE=1
июн 03 16:43:25 xenix.localdomain fancontrol[59584]: Enabling PWM on fans...
июн 03 16:43:25 xenix.localdomain fancontrol[59584]: Starting automatic fan control...
И для автостарта:

Код: Выделить всё

[root@xenix ~]# systemctl enable fancontrol
Created symlink /etc/systemd/system/multi-user.target.wants/fancontrol.service → /usr/lib/systemd/system/fancontrol.service.

[root@xenix ~]# systemctl is-enabled fancontrol
enabled

Ответить

Вернуться в «Железо для Linux»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 10 гостей