thinkfan
我正在尝试在 Ubuntu 22.04.2 上进行配置。
但我想知道配置文件中的“级别”(三列数字中的第一列)实际上对应哪些速度thinkfan
?
例如:
$ grep -A10 levels: /etc/thinkfan.conf
levels:
- [0, 0, 45]
- [1, 43, 48]
- [2, 46, 51]
- [3, 49, 54]
- [4, 51, 60]
- [5, 58, 65]
- [6, 63, 72]
- [7, 70, 82]
- ["level full-speed", 77, 32767]
从man thinkfan.conf
:
levels: Maps temperatures to fan speeds. A “simple mapping” just specifies one temperature as
the lower and upper bound (respectively) for a given fan speed.
In a “detailed mapping”, the upper and lower bounds are specified for each driver/sensor
configured under sensors:. This mode should be used when thinkfan is monitoring multiple
devices that can tolerate different amounts of heat.
和:
FAN SPEEDS
The levels: section specifies a list of fan speeds with associated lower and upper
temperature bounds. If temperature(s) drop below the lower bound, thinkfan switches
to the previous level, and if the upper bound is reached, thinkfan switches to the
next level.
Simple Syntax
In the simplified form, only one temperature is specified as an upper/lower limit
for a given fan speed. In that case, the lower-bound and upper-bound are compared
only to the highest temperature found among all configured sensors. All other
temperatures are ignored. This mode is suitable for small systems (like laptops)
where there is only one device (e.g. the CPU) whose temperature needs to be
controlled, or where the required fan behaviour is similar enough for all
heat-generating devices.
levels:
- [ fan-speed, lower-bound, upper-bound ]
- ...
Detailed Syntax
This mode is suitable for more complex systems, with devices that have different
temperature ratings. For example, many modern CPUs and GPUs can deal with
temperatures above 80°C on a daily basis, whereas a hard disk will die quickly
if it reaches such temperatures. In detailed mode, upper and lower temperature
limits are specified for each sensor individually:
levels:
- speed: fan-speed
lower_limit: [ l1, l2, ... ]
upper_limit: [ u1, u2, ... ]
- ...
Values
fan-speed The possible speed values are different depending on which fan driver
is used.
For a hwmon fan, fan-speed is a numeric value ranging from 0 to 255,
corresponding to the PWM values accepted by the various kernel drivers.
For a tpacpi fan on Lenovo/IBM ThinkPads and some other Lenovo laptops
(see SENSORS & FAN DRIVERS above), numeric values and strings can be used.
The numeric values range from 0 to 7.
The string values take the form "level lvl-id", where lvl-id may be a
value from 0 to 7, auto, full-speed or disengaged. The numeric values
0 to 7 correspond to the regular fan speeds used by the firmware,
although many firmwares don't even use level 7. The value "level auto"
gives control back to the firmware, which may be useful if the fan
behavior only needs to be changed for certain specific temperature
ranges (usually at the high and low end of the range). The values
"level full-speed" and "level disengaged" take the fan speed control
away from the firmware, causing the fan to slowly ramp up to an absolute
maximum that can be achieved within electrical limits. Note that this
will run the fan out of specification and cause increased wear,
though it may be helpful to combat thermal throttling.
l1, l2, ...
u1, u2, ... The lower and upper limits refer to the sensors in the same order in
which they were found when processing the sensors: section (see SENSOR
& FAN DRIVERS above). For the first level entry, the lower_limit may
be omitted, and for the last one, the upper_limit may be omitted.
For all levels in between, the lower limits must overlap with the upper
limits of the previous level, to make sure the entire temperature range
is covered and that there is some hysteresis between speed levels.
尤其是这句话:The numeric values 0 to 7 correspond to the regular fan speeds used by the firmware
我如何知道风扇转速(单位:每分钟转数)对应这个0-7的数值?
答案1
那些对应于数值 0 到 7 的值不是标准化的,因此您可以在系统固件文档中查看,或者可以使用传感器之类的工具来查看风扇速度和温度。
您可以安装该lm-sensors
包然后运行sensors
以获取这些信息,甚至修改它们然后监控结果