hspak / simpfand

Simple ThinkPad fan control daemon
Other
12 stars 4 forks source link

BASE_LVL cannot be 0 #1

Closed LiohMoeller closed 10 years ago

LiohMoeller commented 10 years ago

On low temperature, fan should be off. I tried to set BASE_LVL = 0 but that lead to a segfault on startup.

hspak commented 10 years ago

Can you post the full config? If you're using systemd, can you post the output of journalctl -u simpfand?

The odd thing is that a fan level of 0 shouldn't be possible at all because I revert it to level 1 when I'm parsing the options. Code

I would not recommend using a fan level of 0 with simpfand. Because the default polling rate is 10 seconds, the CPU could easily ramp up and overheat within those 10 seconds. Maybe I can put in some logic to allow a fan level of 0 if the polling rate is set to something low like 1 or 2.

LiohMoeller commented 10 years ago

I personaly do not see that big problem with overheating when only BASE_LVL is set to 0 (not the other levels). In default BIOS config fan is also off, most of the time.

Here is the full config (Levels are not yet configured propably):

#
# Config file file for simpfand
#
# File is read from etc/simpfand.conf
# Defaults can be found in /usr/share/doc/simpfand/simpfand.conf
#
# Values will not be updated unless the daemon is restarted

# These speed levels range from 0 (not spinning) to 7 (max)
# Different ThinkPad models will have different RPM's for each level
# Use a tool like lm_sensors to check them.

# Example RPM Table: ThinkPad T420
#  Level 1: 2000
#  Level 2: 3200
#  Level 3: 3400
#  Level 4: 3600
#  Level 5: 3900
#  Level 6: 4500
#  Level 7: 5800

# set polling interval (seconds)
# POLLING       = 10

# Base fan speed level
# Fan speed when lower than low_temp bound
BASE_LVL      = 0

# -----------------------------------------------------
# If temperature is greater than INC_LOW_TEMP,
# fan speed is set to INC_LOW_LVL

# If temperature is less than or equal to DEC_LOW_TEMP,
# fan speed is set to BASE_LVL
# -----------------------------------------------------

# Lower bounds when temperature is rising (celcius)
INC_LOW_TEMP  = 65
INC_LOW_LVL   = 1

INC_HIGH_TEMP = 75
INC_HIGH_LVL  = 3 

INC_MAX_TEMP  = 80 
INC_MAX_LVL   = 7 

# Lower bounds when temperature is falling (celcius)
DEC_LOW_TEMP  = 65
DEC_LOW_LVL   = 1

DEC_HIGH_TEMP = 75
DEC_HIGH_LVL  = 3

DEC_MAX_TEMP  = 80
DEC_MAX_LVL   = 7
hspak commented 10 years ago

I've allowed fan levels of 0 now. I'm still not sure what caused the segfault though... I'm going to assume a false alarm until it happens again.