无法使用 pwmconfig 配置风扇速度

Joã*_*avo 6 fan sensors asus fancontrol lm-sensors

我有一台带双启动的华硕 TP301UJ 笔记本电脑,我的风扇一直很响。我正在尝试在 Ubuntu 中配置我的风扇速度(我在 Windows 10 中很容易做到),但我遇到了问题。

这是我所做的:

  1. 我安装了lm-sensorspsensorfancontrolpsensor运行良好,并读取风扇速度和所有温度。

  2. Ransudo sensors-detect只说我需要将coretemp添加到/etc/modules. coretemp已经在模块中,所以我什么也没做。

  3. 重新启动。Ran sudo pwmconfig,它输出:

    找到以下设备:
    hwmon0 是 acpitz
    hwmon1 是 coretemp
    hwmon2 是 asus

    找到以下 PWM 控件:
    hwmon2/pwm1 当前值:0

    hwmon2/pwm1 当前设置为自动速度控制。
    一般来说,自动模式比手动模式更受欢迎,因为它更有效,反应更快。您确定要将此输出设置为手动控制吗?(n)

  4. 输入“y”,输出为:

    给球迷一些时间来达到全速......

    找到以下风扇传感器:
    hwmon2/fan1_input current speed: 0 ... 跳过!
    没有工作风扇传感器,所有读数均为 0。

    确保连接了 3 线风扇。
    您可能还需要增加风扇除数。
    有关更多信息,请参阅 doc/fan-divisors。

所以我的风扇进入“手动模式”并开始全速运行但pwmconfig退出,让我的风扇全速运行。将输入的数字/sys/class/hwmon/hwmon2/pwm1_enable从 1 改回 2,使其再次自动

这是我的问题(我认为):当我的风扇处于“手动模式”时sensors显示-1为它的速度。它没有被检测到!但是在自动模式下,完全没有问题。这使我无法配置风扇pwmconfig

我已经尝试添加acpi_enforce_resources=laxGRUB_CMDLINE_LINUX_DEFAULTgrub 文件中的变量。结果是一样的。

我该怎么办?

rta*_*aft 4

首先了解一下man fancontrol可以在 中使用哪些变量/etc/fancontrol。构建配置时您将需要以下内容:INTERVAL、FCTEMPS、FCFANS、MINTEMP、MAXTEMP、MINSTART、MINSTOP。

# Checks the temperature every 10 seconds.
INTERVAL=10
# Maps a fan to a temp sensor, each separated by a space 
FCTEMPS=fanpath=temppath fanpath2=temppath2
# Maps a fan to the fan speed sensor
FCFANS=fanpath=fanspeedpath fanpath2=fanspeedpath2
# The temperature below which the fan gets switched to minimum speed.
MINTEMP=fanpath=degreesC fanpath2=degreesC2
# The temperature over which the fan gets switched to maximum speed.
MAXTEMP=fanpath=degreesC fanpath2=degreesC2
# Sets the minimum speed at which the fan begins spinning.
MINSTART=fanpath=minspeed fanpath2=minspeed2
#The minimum speed at which the fan still spins.
MINSTOP=fanpath=minspeed fanpath2=minspeed2
Run Code Online (Sandbox Code Playgroud)

实际样品:

INTERVAL=10
FCTEMPS=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=/sys/devices/platform/coretemp.0/hwmon/hwmon[[:print:]]*/temp3_input /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=/sys/devices/platform/coretemp.0/hwmon/hwmon[[:print:]]*/temp3_input /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=/sys/devices/platform/coretemp.0/hwmon/hwmon[[:print:]]*/temp3_input
FCFANS=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/fan5_input /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/fan4_input /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=
MINTEMP=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=55 /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=50 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=55
MAXTEMP=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=60 /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=60 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=60
MINSTART=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=70 /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=70 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=70
MINSTOP=/sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm5=90 /sys/devices/platform/nct6775.656/hwmon/hwmon[[:print:]]*/pwm4=90 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon[[:print:]]*/pwm1=90
Run Code Online (Sandbox Code Playgroud)

[[:print:]] 代表 hwmon 编号。您可以使用实际编号或 [[:print:]],有时引导之间的编号会发生变化,并且 [[:print:]] 允许它找到正确的 hwmon 编号。

问题是 FCFANS,fan1_input 是否有有效数据,如果没有,fancontrol 是否会在没有数据的情况下继续工作。

或者,您可以尝试编写自己的脚本来设置 hwmon2/pwm1 的值,其范围在 0 到 255 之间。

  • pwmconfig 基本上会为您进行检查,因此除非您可以看到风扇旋转,否则很难知道使用什么来获取确切的值。只需以不同的速度监控您的温度,并确保它可以保持合理的温度。您可以让乐趣运行得稍微快一些,以达到其最小值,这可能有助于减少它增加到更高速度的次数。 (2认同)