Package: qcontrol Version: 0.4.2+svn-r40-3 Severity: wishlist Dear Maintainer,
The current fanspeed control script causes the fan to jump back and forth between two speed quite easily, at least on my system (419P). I've modified the base temp() function to implement a hysteresis loop to prevent that. The threshold values are completely arbitrary, I've adjusted all values downward because my machine rarely ever reaches 40 degrees. Also, I've never written Lua before so there may be easier ways to do it. However, I hope that the attached function can find its way into the package (as an example?) so that others can use it too. Regards, Arno -- System Information: Debian Release: 7.0 APT prefers stable APT policy: (990, 'stable'), (600, 'testing'), (300, 'unstable') Architecture: armel (armv5tel) Kernel: Linux 3.2.0-4-kirkwood Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages qcontrol depends on: ii libc6 2.13-38 ii liblua5.1-0 5.1.5-4 ii udev 175-7.2 qcontrol recommends no packages. qcontrol suggests no packages. -- Configuration Files: /etc/qcontrol/ts41x.lua changed [not included] -- no debconf information
-- hysteresis implementation: -- - - > 35 > - - - > 40 > - - - > 50 > - - - > 65 > - - - -- silence -- low -- medium -- high -- full | -- - - < 32 < - - - < 35 < - - - < 45 < - - - < 55 < - - - function temp( temp ) logtemp(temp) if last_fan_setting == "full" then if temp < 55 then setfan("high") end elseif last_fan_setting == "high" then if temp > 65 then setfan("full") elseif temp < 45 then setfan("medium") end elseif last_fan_setting == "medium" then if temp > 50 then setfan("high") elseif temp < 35 then setfan("low") end elseif last_fan_setting == "low" then if temp > 40 then setfan("medium") elseif temp < 32 then setfan("silence") end elseif last_fan_setting == "silence" if temp > 35 then setfan("low") end else setfan("high") end end