First, type the sensors
command
sensors
here,
--The system is aware of the module --The system does not recognize the module --When rmp of CPU fan is 0
The following shows each method in the above cases.
sudo pwmconfig
. The configuration file is saved in / etc / fancontrol
.systemctl enable fancontrol
.suspend
. Place the configuration file in / lib / systemd / system-sleep /
Create a shell under system-sleep
of systemd
that specifies the behavior when returning from suspend. (The name can be anything.)/lib/systemd/system-sleep/restart-fancontrol
#!/bin/bash
case "$1" in
post)
exec service fancontrol restart
esac
★ I referred to this ★ https://github.com/lm-sensors/lm-sensors/issues/134#issuecomment-513506723
The solution is to change the Linux boot settings.
Add ʻacpi_enforce_resources = lax after
quiet splash`.
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_enforce_resources=lax"
Apply settings and restart
sudo update-grub
reboot
Confirm again
sensors
--Part 1 Recognize the module ◯
Execute the method.
Since this is a Linux specification, there seems to be no fundamental solution, so it seems that the best way is to duplicate the fancontrol service when the hwmon allocation changes.
Solution
fancontrol-2.service
by duplicating fancontrol.service
set in hwmon2ConditionPathExists
of the newly created service.suspend
setting.fancontrol.Duplicate service
sudo cp /lib/systemd/system/fancontrol.service /lib/systemd/system/fancontrol-2.service
fancontorl-2.edit service
[Unit]
Description=fan speed regulator
# Run pwmconfig to create this file.
ConditionPathExists=/etc/fancontrol-2
After=lm-sensors.service
Documentation=man:fancontrol(8) man:pwmconfig(8)
[Service]
ExecStartPre=/usr/sbin/fancontrol --check
ExecStart=/usr/sbin/fancontrol
PIDFile=/var/run/fancontrol.pid
[Install]
WantedBy=multi-user.target
suspend settings
#!/bin/bash
case "$1" in
post)
exec service fancontrol restart
exec service fancontrol-2 restart
esac