为什么 fancontrol 无法在启动时启动,但可以通过 sudo 启动?

为什么 fancontrol 无法在启动时启动,但可以通过 sudo 启动?

我已经根据自己的喜好配置了 /etc/fancontrol

# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/platform/it87.552
DEVNAME=hwmon0=it8718
FCTEMPS=hwmon0/device/pwm2=hwmon0/device/temp2_input hwmon0/device/pwm1=hwmon0/device/temp1_input
FCFANS=hwmon0/device/pwm2=hwmon0/device/fan2_input hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm2=20 hwmon0/device/pwm1=20
MAXTEMP=hwmon0/device/pwm2=60 hwmon0/device/pwm1=60
MINSTART=hwmon0/device/pwm2=150 hwmon0/device/pwm1=150
MINSTOP=hwmon0/device/pwm2=100 hwmon0/device/pwm1=100
MAXPWM=hwmon0/device/pwm2=225 hwmon0/device/pwm1=225

sudo fancontrol完美运行。

但它不会在启动时启动。

更新

好的,我想我已经找到问题了。

在 /etc/init.d 中有一个名为:

james@middlepc:/etc/init.d$ ls fan*
fancontrol.dpkg-bak

如果我运行,sudo /etc/init.d/fancontrol.dpkg-bak start风扇控制器就会启动。

应该是这样吗fancontrol?这是安装损坏的证据吗?

更新2

我尝试重命名fancontrol.dpkg-bakfancontrol。它仍然无法在启动时启动

原帖剩余部分

fancontrol如果不运行,sudo我会得到以下输出:

Loading configuration from /etc/fancontrol ...

Common settings:
  INTERVAL=10

Settings for hwmon0/device/pwm2:
  Depends on hwmon0/device/temp2_input
  Controls hwmon0/device/fan2_input
  MINTEMP=20
  MAXTEMP=60
  MINSTART=150
  MINSTOP=100
  MINPWM=0
  MAXPWM=225

Settings for hwmon0/device/pwm1:
  Depends on hwmon0/device/temp1_input
  Controls hwmon0/device/fan1_input
  MINTEMP=20
  MAXTEMP=60
  MINSTART=150
  MINSTOP=100
  MINPWM=0
  MAXPWM=225

Error: file hwmon0/device/pwm2 doesn't exist
Error: file hwmon0/device/pwm1 doesn't exist

At least one referenced file is missing. Either some required kernel
modules haven't been loaded, or your configuration file is outdated.
In the latter case, you should run pwmconfig again.

我尝试更改DEVPATH=hwmon0=devices/platform/it87.552DEVPATH=hwmon0=/sys/devices/platform/it87.552但只产生:

Loading configuration from /etc/fancontrol ...

Common settings:
  INTERVAL=10

Settings for hwmon0/device/pwm2:
  Depends on hwmon0/device/temp2_input
  Controls hwmon0/device/fan2_input:
  MINTEMP=20
  MAXTEMP=60
  MINSTART=150
  MINSTOP=100
  MINPWM=0
  MAXPWM=225

Settings for hwmon0/device/pwm1:
  Depends on hwmon0/device/temp1_input
  Controls hwmon0/device/fan1_input
  MINTEMP=20
  MAXTEMP=60
  MINSTART=150
  MINSTOP=100
  MINPWM=0
  MAXPWM=225

Device path of hwmon0 has changed
Configuration appears to be outdated, please run pwmconfig again

如果我跑步sudo find / | grep it87.552我会得到:

/sys/devices/platform/it87.552
/sys/devices/platform/it87.552/uevent
/sys/devices/platform/it87.552/modalias
/sys/devices/platform/it87.552/subsystem
/sys/devices/platform/it87.552/power
/sys/devices/platform/it87.552/power/async
/sys/devices/platform/it87.552/power/runtime_status
/sys/devices/platform/it87.552/power/runtime_usage
/sys/devices/platform/it87.552/power/runtime_active_kids
/sys/devices/platform/it87.552/power/runtime_enabled
/sys/devices/platform/it87.552/power/control
/sys/devices/platform/it87.552/power/runtime_suspended_time
/sys/devices/platform/it87.552/power/runtime_active_time
/sys/devices/platform/it87.552/power/autosuspend_delay_ms
/sys/devices/platform/it87.552/driver
/sys/devices/platform/it87.552/in0_input
/sys/devices/platform/it87.552/in1_input
/sys/devices/platform/it87.552/in2_input
/sys/devices/platform/it87.552/in3_input
/sys/devices/platform/it87.552/in4_input
/sys/devices/platform/it87.552/in5_input
/sys/devices/platform/it87.552/in6_input
/sys/devices/platform/it87.552/in7_input
/sys/devices/platform/it87.552/in8_input
/sys/devices/platform/it87.552/in0_min
/sys/devices/platform/it87.552/in1_min
/sys/devices/platform/it87.552/in2_min
/sys/devices/platform/it87.552/in3_min
/sys/devices/platform/it87.552/in4_min
/sys/devices/platform/it87.552/in5_min
/sys/devices/platform/it87.552/in6_min
/sys/devices/platform/it87.552/in7_min
/sys/devices/platform/it87.552/in0_max
/sys/devices/platform/it87.552/in1_max
/sys/devices/platform/it87.552/in2_max
/sys/devices/platform/it87.552/in3_max
/sys/devices/platform/it87.552/in4_max
/sys/devices/platform/it87.552/in5_max
/sys/devices/platform/it87.552/in6_max
/sys/devices/platform/it87.552/in7_max
/sys/devices/platform/it87.552/in0_alarm
/sys/devices/platform/it87.552/in1_alarm
/sys/devices/platform/it87.552/in2_alarm
/sys/devices/platform/it87.552/in3_alarm
/sys/devices/platform/it87.552/in4_alarm
/sys/devices/platform/it87.552/in5_alarm
/sys/devices/platform/it87.552/in6_alarm
/sys/devices/platform/it87.552/in7_alarm
/sys/devices/platform/it87.552/temp1_input
/sys/devices/platform/it87.552/temp2_input
/sys/devices/platform/it87.552/temp3_input
/sys/devices/platform/it87.552/temp1_max
/sys/devices/platform/it87.552/temp2_max
/sys/devices/platform/it87.552/temp3_max
/sys/devices/platform/it87.552/temp1_min
/sys/devices/platform/it87.552/temp2_min
/sys/devices/platform/it87.552/temp3_min
/sys/devices/platform/it87.552/temp1_type
/sys/devices/platform/it87.552/temp2_type
/sys/devices/platform/it87.552/temp3_type
/sys/devices/platform/it87.552/temp1_alarm
/sys/devices/platform/it87.552/temp2_alarm
/sys/devices/platform/it87.552/temp3_alarm
/sys/devices/platform/it87.552/alarms
/sys/devices/platform/it87.552/intrusion0_alarm
/sys/devices/platform/it87.552/name
/sys/devices/platform/it87.552/in0_beep
/sys/devices/platform/it87.552/in1_beep
/sys/devices/platform/it87.552/in2_beep
/sys/devices/platform/it87.552/in3_beep
/sys/devices/platform/it87.552/in4_beep
/sys/devices/platform/it87.552/in5_beep
/sys/devices/platform/it87.552/in6_beep
/sys/devices/platform/it87.552/in7_beep
/sys/devices/platform/it87.552/temp1_beep
/sys/devices/platform/it87.552/temp2_beep
/sys/devices/platform/it87.552/temp3_beep
/sys/devices/platform/it87.552/fan1_input
/sys/devices/platform/it87.552/fan1_min
/sys/devices/platform/it87.552/fan1_alarm
/sys/devices/platform/it87.552/fan1_beep
/sys/devices/platform/it87.552/fan2_input
/sys/devices/platform/it87.552/fan2_min
/sys/devices/platform/it87.552/fan2_alarm
/sys/devices/platform/it87.552/fan2_beep
/sys/devices/platform/it87.552/fan3_input
/sys/devices/platform/it87.552/fan3_min
/sys/devices/platform/it87.552/fan3_alarm
/sys/devices/platform/it87.552/fan3_beep
/sys/devices/platform/it87.552/fan4_input
/sys/devices/platform/it87.552/fan4_min
/sys/devices/platform/it87.552/fan4_alarm
/sys/devices/platform/it87.552/fan4_beep
/sys/devices/platform/it87.552/pwm1_enable
/sys/devices/platform/it87.552/pwm1
/sys/devices/platform/it87.552/pwm1_freq
/sys/devices/platform/it87.552/pwm1_auto_channels_temp
/sys/devices/platform/it87.552/pwm2_enable
/sys/devices/platform/it87.552/pwm2
/sys/devices/platform/it87.552/pwm2_freq
/sys/devices/platform/it87.552/pwm2_auto_channels_temp
/sys/devices/platform/it87.552/pwm3_enable
/sys/devices/platform/it87.552/pwm3
/sys/devices/platform/it87.552/pwm3_freq
/sys/devices/platform/it87.552/pwm3_auto_channels_temp
/sys/devices/platform/it87.552/vrm
/sys/devices/platform/it87.552/cpu0_vid
/sys/devices/platform/it87.552/in3_label
/sys/devices/platform/it87.552/in8_label
/sys/devices/platform/it87.552/hwmon
/sys/devices/platform/it87.552/hwmon/hwmon0
/sys/devices/platform/it87.552/hwmon/hwmon0/uevent
/sys/devices/platform/it87.552/hwmon/hwmon0/subsystem
/sys/devices/platform/it87.552/hwmon/hwmon0/device
/sys/devices/platform/it87.552/hwmon/hwmon0/power
/sys/devices/platform/it87.552/hwmon/hwmon0/power/async
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_status
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_usage
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_active_kids
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_enabled
/sys/devices/platform/it87.552/hwmon/hwmon0/power/control
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_suspended_time
/sys/devices/platform/it87.552/hwmon/hwmon0/power/runtime_active_time
/sys/devices/platform/it87.552/hwmon/hwmon0/power/autosuspend_delay_ms
/sys/bus/platform/devices/it87.552
/sys/bus/platform/drivers/it87/it87.552

答案1

我找到了解决方案。

安装已损坏。

启动脚本被命名为一些部分安装的备份名称,我猜 rc.d 链接被破坏了,因为它需要这个才能让它再次工作:

sudo apt-get --reinstall install fancontrol

答案2

我注意到你已经自己修复了这个问题 - 如果问题是 rc.d 链接损坏,你可以尝试

sudo update-rc.d fancontrol defaults

相关内容