vmatare / thinkfan Goto Github PK
View Code? Open in Web Editor NEWThe minimalist fan control program
License: GNU General Public License v3.0
The minimalist fan control program
License: GNU General Public License v3.0
The path to my CPU's sensors sometimes changes on restart. Specifically, the digit after "hwmon" varies. This results in the expected error from thinkfan:
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input: No such file or directory
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp4_input: No such file or directory
readconfig: Error getting temperature.
Refusing to run without usable config file!
Does thinkfan support any sort of pattern matching in the config file to accommodate this?
Trying to compile this but it fails when not finding libboost:
In file included from /usr/include/yaml-cpp/node/node.h:16:0,
from /usr/include/yaml-cpp/yaml.h:16,
from /home/ola/Sources/thinkfan/src/yamlconfig.h:9,
from /home/ola/Sources/thinkfan/src/config.cpp:31:
/usr/include/yaml-cpp/node/ptr.h:11:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
However:
apt-get install libboost-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libboost1.58-dev
Suggested packages:
libboost-doc libboost1.58-doc libboost-atomic1.58-dev libboost-chrono1.58-dev libboost-context1.58-dev libboost-coroutine1.58-dev libboost-date-time1.58-dev
libboost-exception1.58-dev libboost-filesystem1.58-dev libboost-graph1.58-dev libboost-graph-parallel1.58-dev libboost-iostreams1.58-dev libboost-locale1.58-dev
libboost-log1.58-dev libboost-math1.58-dev libboost-mpi1.58-dev libboost-mpi-python1.58-dev libboost-program-options1.58-dev libboost-python1.58-dev libboost-random1.58-dev
libboost-regex1.58-dev libboost-serialization1.58-dev libboost-signals1.58-dev libboost-system1.58-dev libboost-test1.58-dev libboost-thread1.58-dev libboost-timer1.58-dev
libboost-wave1.58-dev libboost1.58-tools-dev libmpfrc++-dev libntl-dev
The following NEW packages will be installed
libboost-dev libboost1.58-dev
0 to upgrade, 2 to newly install, 0 to remove and 2 not to upgrade.
Need to get 6,225 kB of archives.
After this operation, 105 MB of additional disk space will be used.
Do you want to continue? [Y/n] HELL NO!
Abort.
A tad excessive, for fan control, isn't it? Also, this dependency isn't listed in the readme.
Hi,
I have some trouble setting up thinkfan using complex mode. I am running the latest version of thinkfan on a T500 which provides 16 sensors. However when using the complex configuration file provided by this repo I get the following error message:
root@tp:/etc# /usr/local/sbin/thinkfan
ERROR: /etc/thinkfan.conf:65: Syntax error:
{ level 0 # the fan level
^
As far as I understand I don't need to adjust the provided config file as the number of sensors is the same (16). Did I miss something?
Thanks for this great tool and the support!
The temperature of the hard disc can be shown by
sudo smartctl -A /dev/sda | grep Temperature
Can it also be read off by a cat /path/to/harddisk's/temp_input
so that thinkfan can avoid overheating ?
Hi there,
Thinkfan wasn't compiling on musl so I've whipped up a patch:
diff --git a/src/globaldefs.h b/src/globaldefs.h
index 75d3f6f..5a72e27 100644
--- a/src/globaldefs.h
+++ b/src/globaldefs.h
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <limits.h>
#include <time.h>
+#include <sys/types.h>
#define VERSION "0.9.1"
thinkfan [ crashed ]
It also does not seem to start at all as it does not show up in ps aux.
Followed http://askubuntu.com/questions/790576/thinkfan-does-not-start-automatically as a guide, namely ran sudo systemctl enable thinkfan.service ; and sudo systemctl enable thinkfan
But now when I try to run
[I] ✘ / sudo /etc/init.d/thinkfan start
/etc/init.d/thinkfan: 10: /etc/default/thinkfan: DAEMON_ARGS: not found
Starting thinkfan (via systemctl): thinkfan.serviceJob for thinkfan.service failed because the control process exited with error code. See "systemctl status thinkfan.service" and "journalctl -xe" for details.
failed!
[I] ✘ / systemctl status thinkfan.service
● thinkfan.service - simple and lightweight fan control program
Loaded: loaded (/lib/systemd/system/thinkfan.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-01-20 21:52:53 CST; 19s ago
Process: 25038 ExecStart=/usr/sbin/thinkfan (code=exited, status=4)
Jan 20 21:52:53 LilArooni systemd[1]: Starting simple and lightweight fan control program...
Jan 20 21:52:53 LilArooni thinkfan[25038]: thinkfan 0.9.1 starting...
Jan 20 21:52:53 LilArooni systemd[1]: thinkfan.service: Control process exited, code=exited status=4
Jan 20 21:52:53 LilArooni systemd[1]: Failed to start simple and lightweight fan control program.
Jan 20 21:52:53 LilArooni systemd[1]: thinkfan.service: Unit entered failed state.
Jan 20 21:52:53 LilArooni systemd[1]: thinkfan.service: Failed with result 'exit-code'.
Feature request:
I'm using thermal_zone
temperatures instead of hwmon
because the paths are more predictable and do not disappear (unlike the temp[0-9]_input
hwmon files). Here are the paths I'm using:
$ cat /sys/devices/virtual/thermal/thermal_zone[0-3]/temp
43000
40500
30000
44000
However they might still change order, so I would like to set each sensor by the name instead of the path. Names are stored in the type
files:
$ cat /sys/devices/virtual/thermal/thermal_zone[0-3]/type
acpitz
pch_skylake
iwlwifi
x86_pkg_temp
This way I would adjust the parameters more accurately, for example if I want to exclude a specific sensor (for example the iwlwifi
that disappears if wifi is disabled).
Log output
Temperatures(bias): 89(0), 91(0), 89(0), 91(0) -> level disengaged
Temperatures(bias): 87(0), 88(0), 86(0), 88(18) ->
ERROR: Segmentation fault.
Backtrace:
thinkfan() [0x41fd4b]
thinkfan(_ZN8thinkfan5ErrorC2ERKSs+0x33) [0x41fec3]
thinkfan(_ZN8thinkfan3BugC2ERKSs+0x9) [0x420059]
thinkfan(_ZN8thinkfan11sig_handlerEi+0xae) [0x40b65e]
/lib64/libc.so.6(+0x331f0) [0x7fc4cdc111f0]
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6(_ZNSs6appendERKSs+0x10) [0x7fc4ce2836c0]
thinkfan(_ZN8thinkfan6LoggerlsERKSs+0xd) [0x418c7d]
thinkfan(_ZN8thinkfan3runERKNS_6ConfigE+0x3af) [0x40d6cf]
thinkfan(main+0x421) [0x40acc1]
/lib64/libc.so.6(__libc_start_main+0xf0) [0x7fc4cdbfe790]
thinkfan(_start+0x29) [0x40b479]
This is probably a bug. Please consider reporting this at https://github.com/vmatare/thinkfan/issues. Thanks.
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
tp_fan /proc/acpi/ibm/fan
{"level 0"
(0 0 0 0)
(45 54 54 54)
}
{"level 1"
(40 46 46 46)
(55 58 58 58)
}
{"level 3"
(53 52 52 52)
(58 62 62 62)
}
{"level 5"
(56 56 56 56)
(59 66 66 66)
}
{"level 7"
(57 63 63 63)
(65 73 73 73)
}
{"level disengaged"
(60 69 69 69)
(99 99 99 99)
}
Thinkfan version: Git - fef236d
If you need any more information, please let me know.
The P50 has 2 fans, lm-sensors shows:
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 2316 RPM
fan2: 2332 RPM
in sysfs there is
# ls -al /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon3/
total 0
drwxr-xr-x 3 root root 0 Aug 14 13:39 .
drwxr-xr-x 3 root root 0 Aug 14 10:01 ..
lrwxrwxrwx 1 root root 0 Aug 14 10:01 device -> ../../../thinkpad_hwmon
-r--r--r-- 1 root root 4096 Aug 14 13:39 fan1_input
-r--r--r-- 1 root root 4096 Aug 14 10:01 fan2_input
-r--r--r-- 1 root root 4096 Aug 14 10:01 name
drwxr-xr-x 2 root root 0 Aug 14 13:39 power
-rw-r--r-- 1 root root 4096 Aug 14 13:39 pwm1
-rw-r--r-- 1 root root 4096 Aug 14 13:39 pwm1_enable
lrwxrwxrwx 1 root root 0 Aug 14 10:01 subsystem -> ../../../../../class/hwmon
-rw-r--r-- 1 root root 4096 Aug 14 10:01 uevent
It seems that thinkfan is only able to control fan1, fan2 keeps constant ~2300 RPM.
thinkfan.conf used
tp_fan /proc/acpi/ibm/fan
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input
(0, 0, 65)
(1, 55, 82)
(2, 65, 88)
(6, 82, 92)
(7, 70, 32767)
Is there a way to control both fans?
Running thinkfan produces ERROR: TpFanDriver: Initializing fan control in /proc/acpi/ibm/fan: Success
and nothing else.
I encounter the problem that with level 7 the fan isn't using it's full potential. I found your workaround here https://sourceforge.net/p/thinkfan/thinkfan-bugs/10/ and started thinkfan in dangerous mode (-D) with various values and combinations replacing 7 in the level 7 line:
"level full-speed", level full-speed, "full-speed", full-speed
"level disengaged", level disengaged, "disengaged", disengaged
Each combination resulted in an "Invalid syntax" error message by thinkfan Version 0.99.0 cloned from https://sourceforge.net/projects/thinkfan/ on 4. Nov. 2016.
\# thinkfan -n -D
ERROR: /etc/thinkfan.conf:57: Invalid syntax:
("level full-speed", 68, 32767)
Interestingly enough though, the fan started to run at maximum rpm as tested with echo "level full-speed" > /proc/acpi/ibm/fan and didn't slow down, despite the temperature was way below threshold. Unnecessary to say that starting the systemd service failed. (This behaviour occurred with an older build)
# That's why this program is called THINKfan: You gotta think for yourself.
#
######################################################################
#
# IBM/Lenovo Thinkpads (thinkpad_acpi, /proc/acpi/ibm)
# ====================================================
#
# IMPORTANT:
#
# To keep your HD from overheating, you have to specify a correction value for
# the sensor that has the HD's temperature. You need to do this because
# thinkfan uses only the highest temperature it can find in the system, and
# that'll most likely never be your HD, as most HDs are already out of spec
# when they reach 55 °C.
# Correction values are applied from left to right in the same order as the
# temperatures are read from the file.
#
# For example:
# tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
# will add a fixed value of 10 °C the 3rd value read from that file. Check out
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
# want to add to certain temperatures.
# Syntax:
# (LEVEL, LOW, HIGH)
# LEVEL is the fan level to use (0-7 with thinkpad_acpi)
# LOW is the temperature at which to step down to the previous level
# HIGH is the temperature at which to step up to the next level
# All numbers are integers.
#
# I use this on my T61p:
tp_fan /proc/acpi/ibm/fan
#tp_thermal /proc/acpi/ibm/thermal (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
#nv_thermal 01:00.0
(0, 0, 52)
(1, 46, 59)
(2, 54, 65)
(3, 58, 69)
(4, 62, 72)
(5, 65, 74)
("level full-speed", 68, 32767)
#(7, 68, 32767)
can't launch it
WARNING: Using default fan control in /proc/acpi/ibm/fan.
Using default temperature inputs in /proc/acpi/ibm/thermal.
ERROR: Failed to read temperature(s) from /proc/acpi/ibm/thermal: Success
Backtrace:
/usr/sbin/thinkfan() [0x445235]
/usr/sbin/thinkfan(_ZN8thinkfan5ErrorC2ERKSs+0x5f) [0x4453d5]
/usr/sbin/thinkfan(_ZN8thinkfan13ExpectedErrorC1ERKSs+0x23) [0x42e615]
/usr/sbin/thinkfan(_ZN8thinkfan11SystemErrorC1ERKSs+0x23) [0x42e6a9]
/usr/sbin/thinkfan(_ZNK8thinkfan14TpSensorDriver10read_tempsEv+0x1c0) [0x43a822]
/usr/sbin/thinkfan(_ZN8thinkfan3runERKNS_6ConfigE+0x12b) [0x42bf27]
/usr/sbin/thinkfan(main+0x226) [0x42dece]
/usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f057d2c9610]
/usr/sbin/thinkfan(_start+0x29) [0x42ba09]
same happens if I just run /usr/bin/thinkfan as root
also my /proc/acpi/ibm/thermal
[localhost hj]# cat /proc/acpi/ibm/thermal
temperatures: 52 0 52 0 0 0 35 0
This is my /etc/thinkfan.conf
:
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
(0, 0, 55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)
When I do sudo thinkfan -n
it says
ERROR: /etc/thinkfan.conf:6: Invalid syntax:
(0, 0, 55)
Am I doing something wrong? The version I use is 0.99.0
I am trying to use yaml configuration file. Consider following simplified scenario :
/sys/class/hwmon/hwmon0/temp1_input
/sys/class/hwmon/hwmon0/temp2_input
/sys/class/hwmon/hwmon1/temp1_input
using index [1,2]
thinkfan only finds the first two sensors, can't find the last one. I am guessing this might be due to the fact they have the same name?
Should install default config with another name and then only install an override.conf
with some hints in it if it doesn't already exist.
The config syntax is quite convoluted and maintaining/fixing the parser takes up way too much time. YAML seems like a good alternative, with an expressive syntax & mature tool support that should reduce maintenance effort considerably.
However, I suppose existing configs will have to be somehow migrated to YAML, so we can't just get rid of the current, messy parser. I don't feel comfortable just dropping support for the current syntax and leaving the problem of migrating configs for the user to deal with.
I'd be grateful for opinions:
Hey,
first up, been using thikfan for years and its really great! I just installed a clean version of Arch (been using it on Xubuntu before) and never had this issue. This is the output from the deamon (-n):
sleeptime=5, tmax=48, last_tmax=48, biased_tmax=48 -> fan="level 1"
sleeptime=5, tmax=45, last_tmax=46, biased_tmax=45 -> fan="level 0"
sleeptime=2, tmax=55, last_tmax=46, biased_tmax=68 -> fan="level 1"
sleeptime=5, tmax=45, last_tmax=47, biased_tmax=45 -> fan="level 0"
The line where it swaps to level 1 is the interesting one:
sleeptime=2, tmax=55, last_tmax=46, biased_tmax=68 -> fan="level 1"
I'm not 100% sure what biased_tmax is so I'm taking a wild guess and its the projected temperature that will be reached in a certain time interval when the temperature keeps rising at the current rate (last_tmax -> tmax is pretty steep here).
The fan configuration says it should never go to lvl1 before 65. When I watch my real sensor values it never goes above 56 or 57, even with the steep rise. The fan comes up regardless since it seems to take the biased_tmax.
Is there any way to maybe update faster or control this? I've seen that there is a -b option for the daemon which you can put in DAEMON_ARGS in /etc/default/thinkfan, but it doesn't seem to affect the behavior. Arch is systemd based, does that file even get used there? (my first systemd system, so sry if this is a noob mistake :))
Cheers
Just tried the new thinkfan on my L420, and as soon as I try to run it I get
ERROR: /proc/acpi/ibm/thermal: basic_ios::clear: Success
Nothing else is printed, and then it exits.
;) I tried this now a few times always with the same result
Dec 15 04:18:26 localhost thinkfan[2635]: Using default fan control in /proc/acpi/ibm/fan.
Dec 15 04:18:26 localhost thinkfan[2635]: Using default temperature inputs in /proc/acpi/ibm/thermal.
Dec 15 04:18:26 localhost thinkfan[2635]: sleeptime=5, tmax=67, last_tmax=-128, biased_tmax=67 -> fan="level 7"
Dec 15 04:34:21 localhost thinkfan[2635]: sleeptime=5, tmax=61, last_tmax=90, biased_tmax=-51 -> fan="level 7"
Dec 15 04:34:56 localhost thinkfan[2635]: sleeptime=2, tmax=116640, last_tmax=62, biased_tmax=116640 -> fan="
Dec 15 04:34:56 localhost thinkfan[2635]: ERROR: Segmentation fault.
Dec 15 04:34:56 localhost thinkfan[2635]: Backtrace:
Dec 15 04:34:56 localhost thinkfan[2635]: thinkfan() [0x447ebf]
thinkfan(_ZN8thinkfan5ErrorC2ERKSs+0x5f) [0x44802d]
thinkfan(_ZN8thinkfan3BugC1ERKSs+0x23) [0x4480cd]
thinkfan(_ZN8thinkfan11sig_handlerEi+0xd5) [0x42ddd8]
thinkfan(_ZN8thinkfan6LoggerlsERKSs+0x27) [0x440801]
thinkfan(_ZN8thinkfan3runERKNS_6ConfigE+0x71d) [0x42e58c]
thinkfan(main+0x418) [0x430488]
thinkfan(_start+0x29) [0x42da79]
Dec 15 04:34:56 localhost thinkfan[2635]: This is probably a bug. Please consider reporting this at https://github.com/vmatare/thinkfan/issues. Thanks.
[localhost log]#
maybe this has something to do with those weird last temperatures
Hi,
Do you plan to make an official 1.0 release of thinkfan? I have filed a bug report in Fedora bug tracker so that upstream release can be switched from sourceforge to this Github. That would happen along the line with an official release here. Currently there's 0 releases.
Thanks.
well ok it works now but it is crashing after some time ~ 10 minutes
[localhost hj]# rc-service thinkfan start
* Starting thinkfan ...
WARNING: Using default fan control in /proc/acpi/ibm/fan.
Using default temperature inputs in /proc/acpi/ibm/thermal.
sleeptime=5, tmax=64, last_tmax=-128, biased_tmax=64 -> fan="level 4"
sleeptime=5, tmax=65, last_tmax=64, biased_tmax=65 -> fan="level 5"
sleeptime=5, tmax=66, last_tmax=65, biased_tmax=66 -> fan="level 7"
sleeptime=5, tmax=62, last_tmax=65, biased_tmax=62 -> fan="level 5"
sleeptime=5, tmax=66, last_tmax=65, biased_tmax=66 -> fan="level 7"
sleeptime=5, tmax=60, last_tmax=63, biased_tmax=60 -> fan="level 5"
sleeptime=5, tmax=58, last_tmax=59, biased_tmax=58 -> fan="level 4"
sleeptime=5, tmax=55, last_tmax=56, biased_tmax=55 -> fan="level 3"
sleeptime=5, tmax=79, last_tmax=55, biased_tmax=79 -> fan="level 7"
sleeptime=5, tmax=60, last_tmax=79, biased_tmax=60 -> fan="level 5"
sleeptime=2, tmax=120, last_tmax=60, biased_tmax=120 -> fan="level 7"
sleeptime=5, tmax=63, last_tmax=120, biased_tmax=-87 -> fan="level 0"
sleeptime=2, tmax=819, last_tmax=63, biased_tmax=819 -> fan="level 7"
sleeptime=5, tmax=59, last_tmax=4320, biased_tmax=59 -> fan="level 5"
sleeptime=2, tmax=25920, last_tmax=59, biased_tmax=25920 -> fan="level 7"
sleeptime=5, tmax=56, last_tmax=25920, biased_tmax=56 -> fan="level 4"
*** Error in `/usr/sbin/thinkfan': double free or corruption (fasttop): 0x000000000214ff60 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7f778b827055]
/usr/lib/libc.so.6(+0x779a6)[0x7f778b82c9a6]
/usr/lib/libc.so.6(+0x7818e)[0x7f778b82d18e]
/usr/sbin/thinkfan(_ZNKSt14default_deleteIN8thinkfan16TemperatureStateEEclEPS1_+0x2a)[0x430e62]
/usr/sbin/thinkfan(_ZNSt10unique_ptrIN8thinkfan16TemperatureStateESt14default_deleteIS1_EED1Ev+0x47)[0x4302d5]
/usr/sbin/thinkfan(_ZN8thinkfan3runERKNS_6ConfigE+0xbcc)[0x42dccb]
/usr/sbin/thinkfan(main+0x226)[0x42f250]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f778b7d5610]
/usr/sbin/thinkfan(_start+0x29)[0x42cd09]
======= Memory map: ========
00400000-00455000 r-xp 00000000 08:12 286290 /usr/bin/thinkfan
00655000-00656000 r--p 00055000 08:12 286290 /usr/bin/thinkfan
00656000-00657000 rw-p 00056000 08:12 286290 /usr/bin/thinkfan
0213c000-0216e000 rw-p 00000000 00:00 0 [heap]
7f778b291000-7f778b38e000 r-xp 00000000 08:12 267493 /usr/lib/libm-2.22.so
7f778b38e000-7f778b58d000 ---p 000fd000 08:12 267493 /usr/lib/libm-2.22.so
7f778b58d000-7f778b58e000 r--p 000fc000 08:12 267493 /usr/lib/libm-2.22.so
7f778b58e000-7f778b58f000 rw-p 000fd000 08:12 267493 /usr/lib/libm-2.22.so
7f778b58f000-7f778b5b4000 r-xp 00000000 08:12 264257 /usr/lib/libudev.so.1.6.3
7f778b5b4000-7f778b7b3000 ---p 00025000 08:12 264257 /usr/lib/libudev.so.1.6.3
7f778b7b3000-7f778b7b4000 r--p 00024000 08:12 264257 /usr/lib/libudev.so.1.6.3
7f778b7b4000-7f778b7b5000 rw-p 00025000 08:12 264257 /usr/lib/libudev.so.1.6.3
7f778b7b5000-7f778b950000 r-xp 00000000 08:12 267149 /usr/lib/libc-2.22.so
7f778b950000-7f778bb4f000 ---p 0019b000 08:12 267149 /usr/lib/libc-2.22.so
7f778bb4f000-7f778bb53000 r--p 0019a000 08:12 267149 /usr/lib/libc-2.22.so
7f778bb53000-7f778bb55000 rw-p 0019e000 08:12 267149 /usr/lib/libc-2.22.so
7f778bb55000-7f778bb59000 rw-p 00000000 00:00 0
7f778bb59000-7f778bb6f000 r-xp 00000000 08:12 267315 /usr/lib/libgcc_s.so.1
7f778bb6f000-7f778bd6e000 ---p 00016000 08:12 267315 /usr/lib/libgcc_s.so.1
7f778bd6e000-7f778bd6f000 rw-p 00015000 08:12 267315 /usr/lib/libgcc_s.so.1
7f778bd6f000-7f778bee1000 r-xp 00000000 08:12 267748 /usr/lib/libstdc++.so.6.0.21
7f778bee1000-7f778c0e1000 ---p 00172000 08:12 267748 /usr/lib/libstdc++.so.6.0.21
7f778c0e1000-7f778c0eb000 r--p 00172000 08:12 267748 /usr/lib/libstdc++.so.6.0.21
7f778c0eb000-7f778c0ed000 rw-p 0017c000 08:12 267748 /usr/lib/libstdc++.so.6.0.21
7f778c0ed000-7f778c0f1000 rw-p 00000000 00:00 0
7f778c0f1000-7f778c0fc000 r-xp 00000000 08:12 281886 /usr/lib/libatasmart.so.4.0.5
7f778c0fc000-7f778c2fc000 ---p 0000b000 08:12 281886 /usr/lib/libatasmart.so.4.0.5
7f778c2fc000-7f778c2fe000 r--p 0000b000 08:12 281886 /usr/lib/libatasmart.so.4.0.5
7f778c2fe000-7f778c2ff000 rw-p 0000d000 08:12 281886 /usr/lib/libatasmart.so.4.0.5
7f778c2ff000-7f778c321000 r-xp 00000000 08:12 267050 /usr/lib/ld-2.22.so
7f778c4f4000-7f778c4fb000 rw-p 00000000 00:00 0
7f778c51f000-7f778c520000 rw-p 00000000 00:00 0
7f778c520000-7f778c521000 r--p 00021000 08:12 267050 /usr/lib/ld-2.22.so
7f778c521000-7f778c522000 rw-p 00022000 08:12 267050 /usr/lib/ld-2.22.so
7f778c522000-7f778c523000 rw-p 00000000 00:00 0
7ffe95360000-7ffe95381000 rw-p 00000000 00:00 0 [stack]
7ffe953ea000-7ffe953ec000 r--p 00000000 00:00 0 [vvar]
7ffe953ec000-7ffe953ee000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
* start-stop-daemon: failed to start `/usr/sbin/thinkfan' [ !! ]
* ERROR: thinkfan failed to start
[localhost hj]#
Hi, I replaced the 'legacy' thinkfan with your own to be able to poll the temperature of the NVidia card in my T61
However it's not starting - is it 'something obvious' from the info below or should I recompile with debug for a more useful output?
When I launch it I get;
# systemctl start thinkfan Job for thinkfan.service failed because the control process exited with error code. See "systemctl status thinkfan.service" and "journalctl -xe" for details.
Info available is;
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: Starting Thinkfan, the minimalist fan control program...
> Jan 04 14:33:21 russh-ThinkPad-T61 thinkfan[5201]: ERROR: TpSensorDriver: Initializing sensor in /proc/acpi/ibm/thermal: Success
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: thinkfan.service: Control process exited, code=exited status=1
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: thinkfan.service: Unit entered failed state.
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: thinkfan.service: Failed with result 'exit-code'.
and
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: Starting Thinkfan, the minimalist fan control program...
> -- Subject: Unit thinkfan.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit thinkfan.service has begun starting up.
> Jan 04 14:33:21 russh-ThinkPad-T61 thinkfan[5201]: ERROR: TpSensorDriver: Initializing sensor in /proc/acpi/ibm/thermal: Success
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: thinkfan.service: Control process exited, code=exited status=1
> Jan 04 14:33:21 russh-ThinkPad-T61 systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
> -- Subject: Unit thinkfan.service has failed
The config file is the simple conf example, no changes.
Here is my problem, when I disable wifi on my laptop:
A sensor has vanished! Exiting since there's no safe way of handling this.
Additionally, thinkfan does not even start if this sensor is missing.
So I would like to declare a hwmon
sensor line as "optional" in the config file.
This combines very nice with issue #43, because I would be able to set the specific sensor for iwlwifi
as optional.
thinkfan is unable to autanatically run on my system now however if i start it after the pc has fully booted up it works so i guess it depends on anything that isn't there at boot
[ssf@hj-pc ~]$ systemctl status thinkfan
● thinkfan.service - Thinkfan, the minimalist fan control program
Loaded: loaded (/usr/lib/systemd/system/thinkfan.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since So 2016-10-02 22:34:24 CEST; 1min 19s ago
Process: 268 ExecStart=/usr/bin/thinkfan (code=exited, status=1/FAILURE)
Okt 02 22:34:24 hj-pc systemd[1]: Starting Thinkfan, the minimalist fan control program...
Okt 02 22:34:24 hj-pc systemd[1]: thinkfan.service: Control process exited, code=exited status=1
Okt 02 22:34:24 hj-pc systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
Okt 02 22:34:24 hj-pc systemd[1]: thinkfan.service: Unit entered failed state.
Okt 02 22:34:24 hj-pc systemd[1]: thinkfan.service: Failed with result 'exit-code'.
[ssf@hj-pc ~]$
[ssf@hj-pc ~]$ systemd-analyze blame
682ms dev-sda1.device
433ms systemd-backlight@backlight:intel_backlight.service
362ms upower.service
142ms systemd-vconsole-setup.service
120ms systemd-journald.service
119ms systemd-udevd.service
104ms systemd-rfkill.service
100ms systemd-udev-trigger.service
88ms polkit.service
73ms NetworkManager.service
51ms systemd-tmpfiles-setup.service
43ms udisks2.service
41ms systemd-logind.service
40ms [email protected]
38ms kmod-static-nodes.service
37ms dev-mqueue.mount
35ms systemd-modules-load.service
30ms systemd-sysctl.service
30ms sys-kernel-config.mount
29ms dev-hugepages.mount
25ms sys-kernel-debug.mount
24ms systemd-remount-fs.service
21ms systemd-random-seed.service
21ms systemd-tmpfiles-setup-dev.service
19ms ntpd.service
17ms avahi-daemon.service
16ms thinkfan.service
15ms systemd-journal-flush.service
14ms bluetooth.service
11ms wpa_supplicant.service
9ms systemd-update-utmp.service
6ms rtkit-daemon.service
6ms systemd-user-sessions.service
5ms tmp.mount
lines 3-34/34 (END)
Hello, I'm using a T520 and trying to get Thinkfan to work on Void GNU/Linux. I have copied the simple config but wen I run it I get the following error:
https://hastebin.com/kegavadeku.pas
When building on Ubuntu 16.04 with CMake and default GCC 5.4.0, build fails with the following error message:
config.cpp:91:4: error: ‘for_each’ is not a member of ‘std’
This is due to a missing include statement for <algorithm>
Hello everyone.
I have a thinkpad e420.
thinkfan 0.99.0
Is there a way to force the fan to operate at full-speed for some time (or in sothething like on-off mode) for high environment temp conditions????
A simple command? Or a config script?
Should i use simple or complex config?
thanks
I think it shouldn't be hard to implement PID control and it might even vastly simplify the configuration and stabilize the RPMs even more.
package:
https://aur.archlinux.org/packages/thinkfan-git/
system:
uname -a
Linux work2 4.6.2-1-ARCH #1 SMP PREEMPT Wed Jun 8 08:40:59 CEST 2016 x86_64 GNU/Linux
journal:
thinkfan[25665]: Temperatures(bias): 57(4), 75(31) ->
thinkfan[25665]: ERROR: Segmentation fault.
systemd[1]: thinkfan.service: Main process exited, code=exited, status=2/INVALIDARGUMENT thinkfan[25665]: Backtrace:
thinkfan[25665]: /usr/bin/thinkfan() [0x421f7d]
/usr/bin/thinkfan(_ZN8thinkfan3BugC2ERKSs+0x33) [0x422313]
/usr/bin/thinkfan(_ZN8thinkfan11sig_handlerEi+0xae) [0x40b53e]
/usr/lib/libc.so.6(+0x33310) [0x7f6409954310]
/usr/lib/libstdc++.so.6(_ZNSs6appendERKSs+0x10) [0x7f6409faa330]
/usr/bin/thinkfan(_ZN8thinkfan6LoggerlsERKSs+0xd) [0x41a72d]
/usr/bin/thinkfan(_ZN8thinkfan3runERKNS_6ConfigE+0x328) [0x40d9a8]
/usr/bin/thinkfan(main+0x423) [0x40abd3]
/usr/lib/libc.so.6(__libc_start_main+0xf1) [0x7f6409941741]
/usr/bin/thinkfan(_start+0x29) [0x40b389]
The thinkpad_acpi interface with /proc/acpi/ibm/fan has a level disengaged
with value 127
for maximal fan speed. Does the PWM fan control file offer something similar? It seems that 255
for the PWM fan control file corresponds to level 7
of the thinkpad_acpi interface with /proc/acpi/ibm/fan.
Hi,
I have problem with constant level oscillation.
Version:
thinkfan 0.99.0
Here is my config:
hwmon /sys/class/hwmon/hwmon2/temp1_input #1
tp_fan /proc/acpi/ibm/fan
{ "level auto"
(30)
(85)
}
{ "level disengaged" # nice idea: "level auto" can also be used.
# but again: only numbers for sysfs.
(75)
(110)
}
Output:
# thinkfan -s1 -n -d -v
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 96(0) -> level auto
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 98(0) -> level auto
Temperatures(bias): 97(0) -> level disengaged
Temperatures(bias): 97(0) -> level auto
Temperatures(bias): 97(0) -> level disengaged
Temperatures(bias): 96(0) -> level auto
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 97(0) -> level auto
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 97(0) -> level auto
Temperatures(bias): 97(0) -> level disengaged
Temperatures(bias): 96(0) -> level auto
Temperatures(bias): 91(0) -> level disengaged
Temperatures(bias): 89(0) -> level auto
Temperatures(bias): 89(0) -> level disengaged
Temperatures(bias): 95(9) -> level auto
Temperatures(bias): 97(6) -> level disengaged
Temperatures(bias): 95(0) -> level auto
Temperatures(bias): 95(0) -> level disengaged
Temperatures(bias): 95(0) -> level auto
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 96(0) -> level auto
Temperatures(bias): 98(0) -> level disengaged
Temperatures(bias): 98(0) -> level auto
Temperatures(bias): 96(0) -> level disengaged
Temperatures(bias): 98(0) -> level auto
and so on....
I tried to tune -b
parameter, but it had no effect. Is there something wrong with my configuration or what is happening?
after every timesleep the fan is getting stopped/slowing down for a moment even if there is no change in level.
After hibernating, thinkfan exits because of
thinkfan[994]: /sys/class/hwmon/hwmon0/device/temp1_input: No such device or address
thinkfan[994]: A sensor has vanished! Exiting since there's no safe way of handling this.
thinkfan[994]: Cleaning up and resetting fan control.
systemd[1]: thinkfan.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: thinkfan.service: Unit entered failed state.
systemd[1]: thinkfan.service: Failed with result 'exit-code'.
A second later, the sensor is there again. Can this check by thinkfan after hibernation be delayed?
The README recommends to restart thinkfan after suspend. There's a script
https://github.com/vmatare/thinkfan/blob/master/rcscripts/systemd/thinkfan-wakeup.service
for systemd, but it does not work. As a layman, it looks like the command ExecStart=/usr/bin/pkill -usr2 thinkfan
kills thinkfan, but it indeed restarts thinkfan?
Fan configurations
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
tp_fan /proc/acpi/ibm/fan
{"level 0"
(0 0 0 0)
(45 54 54 54)
}
{"level 1"
(40 46 46 46)
(55 58 58 58)
}
{"level 3"
(53 52 52 52)
(58 62 62 62)
}
{"level 5"
(56 56 56 56)
(59 66 66 66)
}
{"level 7"
(57 63 63 63)
(65 73 73 73)
}
{"level disengaged"
(60 69 69 69)
(99 99 99 99)
}
Log
Temperatures(bias): 44(0), 46(0), 46(0), 46(0) -> level 0
Temperatures(bias): 44(0), 57(16), 57(16), 50(6) -> level disengaged
Build: e01efb3
When my temp goes up to 60C and then goes back down to around 44C, the fan level does not drop back down to the appropriate level and stays in disengaged.
It works normally on my thinkpad X220 with thinkpad_acpi as a module, but crashes when the kernel is compiled with builtin thinkpad_acpi.
Could you compare thinkfan
to thermald
? Does thermald
provide a superset of thinkfan
in that it scales CPU frequency and fan speed?
See for example
https://smackerelofopinion.blogspot.com.br/2015/09/tweaking-thermald-configuration-file.html
Hi,
Apparently for me commit d395107 makes thinkpad_acpi
driver to constantly spam into dmesg(every 2 minutes) like:
[Aug 6 05:14] thinkpad_acpi: fan watchdog: enabling fan
[Aug 6 05:16] thinkpad_acpi: fan watchdog: enabling fan
[Aug 6 05:18] thinkpad_acpi: fan watchdog: enabling fan
[Aug 6 05:20] thinkpad_acpi: fan watchdog: enabling fan
[Aug 6 05:22] thinkpad_acpi: fan watchdog: enabling fan
And, btw if I understand sleeptime
parameter correctly, should not src/driver.cpp:147
be
else if (last_watchdog_ping_ + min(watchdog_, sleeptime) <= std::chrono::system_clock::now())
instead of
else if (last_watchdog_ping_ + watchdog_ + sleeptime <= std::chrono::system_clock::now())
As the title tells:
diff -ur thinkfan-0.9.3-orig/message.h thinkfan-0.9.3-mod/message.h
--- thinkfan-0.9.3-orig/src/message.h 2014-04-29 06:24:58.000000000 +0800
+++ thinkfan-0.9.3-mod/src/message.h 2014-08-21 23:26:50.984854321 +0800
@@ -65,6 +65,7 @@
"Cleaning up and resetting fan control.\n"
#define MSG_INF_DEPULSE(delay, time) "Disengaging the fan controller for " \
"%.3f seconds every %d seconds\n", time, delay
+#define MSG_INF_DEADLY "Caught deadly signal.\n"
#define MSG_WRN_SLEEPTIME_15 "WARNING: %d seconds of not realizing " \
"rising temperatures may be dangerous!\n", sleeptime
diff -ur thinkfan-0.9.3-orig/thinkfan.c thinkfan-0.9.3-mod/thinkfan.c
--- thinkfan-0.9.3-orig/src/thinkfan.c 2014-04-29 06:24:58.000000000 +0800
+++ thinkfan-0.9.3-mod/src/thinkfan.c 2014-08-21 23:28:36.610965402 +0800
@@ -409,7 +409,7 @@
else report(LOG_ERR, LOG_ERR, MSG_ERR_CONF_RELOAD);
}
else if (SIGINT == interrupted || interrupted == SIGTERM) {
- report(LOG_WARNING, LOG_INFO, "\nCaught deadly signal. ");
+ report(LOG_WARNING, LOG_INFO, MSG_INF_DEADLY);
break;
}
}
Hi! My Lenovo Thinkpad S430 suffers from overheating and i wanted to use thinkfan for it.
I edited the thinkfan.conf with
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
but i get the message
WARNING: Using default fan control in ``/proc/acpi/ibm/fan.
setfan_ibm:
Error writing to /proc/acpi/ibm/fan: Invalid argument
Cleaning up and resetting fan control.
The kernel is 4.6.0-040600rc6-generic.
Can you help me with this?
Hi,
I'm using thinkfan for a couple of years now on my Lenovo T420s without any issues. Thanks for the great program.
Lately I upgraded to Ubuntu 16.10 and found that the fan was constantly running using the thinkfan version provided by Ubuntu.
So I decided to download 'Thinkfan version: 1.0_beta2' and built it using
cmake -D CMAKE_BUILD_TYPE:STRING=Debug -D USE_NVML:BOOL=ON .
Unfortunately the behaviour stayed the same.
When started with systemctl start thinkfan
the output of 'sensors' is:
acpitz-virtual-0
Adapter: Virtual device
temp1: +47.0°C (crit = +97.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +53.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +53.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +50.0°C (high = +86.0°C, crit = +100.0°C)
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 3997 RPM
When idle the fan speed usually sicks around 4000 RPM. But as you can see from my '/etc/thinkfan.conf' file at the bottom of this post, the fan should only start at temperatures above 55 degrees.
The output of systemctl status thinkfan
is:
● thinkfan.service - LSB: thinkfan initscript
Loaded: loaded (/etc/init.d/thinkfan; bad; vendor preset: enabled)
Active: active (exited) since Mi 2016-11-02 11:06:58 AEDT; 47min ago
Docs: man:systemd-sysv-generator(8)
Process: 5941 ExecStop=/etc/init.d/thinkfan stop (code=exited, status=0/SUCCESS)
Process: 6708 ExecStart=/etc/init.d/thinkfan start (code=exited, status=0/SUCCESS)
Nov 02 11:06:58 moon systemd[1]: Starting LSB: thinkfan initscript...
Nov 02 11:06:58 moon systemd[1]: Started LSB: thinkfan initscript.
Nov 02 11:49:57 moon systemd[1]: Started LSB: thinkfan initscript.
If I now stop thinkfan using systemctl stop thinkfan
and start it using thinkfan -n -b 1 -s 3 -v -v -v -c /etc/thinkfan.conf
you can see the fan to immediately start using the speed levels as defined in '/etc/thinkfan.conf' and thinkfan is working as expected.
# thinkfan -n -b 1 -s 3 -v -v -v -c /etc/thinkfan.conf
Temperatures(bias): 52(0), 51(0), 48(0), 46(0) -> level 0
Temperatures(bias): 52(0), 51(0), 48(0), 46(0)
Temperatures(bias): 54(0), 56(1), 51(0), 47(0) -> level 1
Temperatures(bias): 50(0), 50(0), 50(0), 48(0)
The systemd service seems to be starting and running correctly, but doesn't seem to be using the settings in '/etc/thinkfan.conf'. Any idea how to solve this issue would be appreciated.
System, settings and config files:
Kernel: 4.4.0-43-generic
Graphic card: Nvidia Optimus NVS 4200M (switchable)
GPU driver: NVIDIA binary driver - version 370.28 from nvidia-370 (open source)
cat /etc/default/thinkfan
# Should thinkfan be started automatically on boot?
# Only say "yes" when you know what you are doing, have configured
# thinkfan correctly for *YOUR* machine and loaded thinkpad_acpi
# with fan_control=1 (if you have a ThinkPad).
START=yes
# Additional startup parameters
#DAEMON_ARGS="-q"
DAEMON_ARGS="-q -b 1 -s 3"
cat /etc/modprobe.d/thinkfan.conf
options thinkpad_acpi fan_control=1
cat /etc/thinkfan.conf
tp_fan /proc/acpi/ibm/fan
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
(0, 0, 55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 67)
(7, 63, 32767)
cat /proc/acpi/ibm/fan
status: enabled
speed: 3520
level: 3
commands: level <level> (<level> is 0-7, auto, disengaged, full-speed)
commands: enable, disable
commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))
When I'm trying to run thinkfan I get the following message:
root@sulter:~# thinkfan -c /etc/thinkfan.conf
ERROR: TpSensorDriver: Initializing sensor in /proc/acpi/ibm/thermal: Succes
I'm using the default config file:
(0, 0, 55)
(1, 50, 60)
(2, 55, 61)
(3, 56, 63)
(4, 57, 65)
(5, 59, 66)
(7, 63, 32767)
I'm able to manipulate /proc/acpi/ibm/thermal manually without any problems.
sudo systemctl status thinkfan
Dec 05 18:09:05 arch systemd[1]: Starting Thinkfan, the minimalist fan control program...
Dec 05 18:09:05 arch thinkfan[23251]: ERROR: Module thinkpad_acpi doesn't seem to support fan_control
Dec 05 18:09:05 arch systemd[1]: thinkfan.service: Control process exited, code=exited status=1
Dec 05 18:09:05 arch systemd[1]: thinkfan.service: Failed with result 'exit-code'.
Dec 05 18:09:05 arch systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
I've set options thinkpad_acpi fan_control=1
and specified the following config file:
### T430
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input
(0, 0, 40)
(1, 32, 55)
(2, 54, 66)
(3, 65, 76)
(4, 75, 80)
(5, 78, 85)
(6, 82, 88)
(7, 85, 32767)
PS: Applies to both versions 0.9.3 and current git. I'm on a T430.
install beta2 but getting this error
> ERROR: Unhandled exception: NSt8ios_base7failureB5cxx11E: basic_ios::clear: iostream error.
> errno = No such file or directory.
> Backtrace:./thinkfan() [0x420d1a]
> ./thinkfan(_ZN8thinkfan15handle_uncaughtEv+0x67) [0x4210e7]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f056) [0x7f4cf146b056]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0a1) [0x7f4cf146b0a1]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f2b9) [0x7f4cf146b2b9]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt19__throw_ios_failurePKc+0x53) [0x7f4cf14939c3]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xf33ad) [0x7f4cf14cf3ad]
> ./thinkfan(_ZN8thinkfan12SensorDriverC2ESs+0x16d) [0x41460d]
> ./thinkfan(_ZN8thinkfan14TpSensorDriverC2ESs+0x2b) [0x415eab]
> ./thinkfan(_ZNK8thinkfan12SensorParser6_parseERPKc+0x1aa) [0x41ae3a]
> ./thinkfan(_ZNK8thinkfan12ConfigParser6_parseERPKc+0x470) [0x420060]
> ./thinkfan(_ZN8thinkfan6Config11read_configERKSs+0x202) [0x40f222]
> ./thinkfan(main+0x1bb) [0x409bbb]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f4cf0b40700]
> ./thinkfan(_start+0x29) [0x40a519]
also write PID file to be compatible with existing startup scripts
Hi.
thinkfan 1.0
libyaml-cpp0.5v5
libyaml-cpp-dev
src/config.cpp:75:49: error: passing ‘const YAML::wtf_ptr<thinkfan::Config>’ as ‘this’ argument discards qualifiers [-fpermissive]
rv = root.as<YAML::wtf_ptr<Config>>().release();
^
In file included from src/config.cpp:30:0:
src/yamlconfig.h:40:7: note: in call to ‘auto YAML::wtf_ptr<T>::release() [with T = thinkfan::Config]’
auto release()
^
CMakeFiles/thinkfan.dir/build.make:86: recipe for target 'CMakeFiles/thinkfan.dir/src/config.cpp.o' failed
Hello,
I'm trying to compile 1.0 beta2 with USE_ATASMART but make fails with
[ 14%] Building CXX object CMakeFiles/thinkfan.dir/src/thinkfan.cpp.o
In file included from /home/twhfe/Downloads/thinkfan-1.0_beta2/src/config.h:31:0,
from /home/twhfe/Downloads/thinkfan-1.0_beta2/src/thinkfan.cpp:41:
/home/twhfe/Downloads/thinkfan-1.0_beta2/src/drivers.h:30:22: fatal error: atasmart.h: No such file or directory
#include <atasmart.h>
^
compilation terminated.
CMakeFiles/thinkfan.dir/build.make:62: recipe for target 'CMakeFiles/thinkfan.dir/src/thinkfan.cpp.o' failed
make[2]: *** [CMakeFiles/thinkfan.dir/src/thinkfan.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/thinkfan.dir/all' failed
make[1]: *** [CMakeFiles/thinkfan.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I also tried to compile 0.9.3, but the same issue occurred. I'm new to Linux and compilation so this might just be user error. I'm on a ThinkPad X201 tablet running openSUSE Leap 42.1. gcc version is 4.8.5
I observe the following error in two scenarios :
1- If I disable wifi manually to save battery
2- Thinkpad bios has option to disable wifi card hardware if ethernet connected
Then the hwmon file becomes unreadable and therefore thinkfan gives the following error and exits:
thinkfan[19319]: /sys/devices/virtual/hwmon/hwmon4/temp1_input: Input/output error
thinkfan[19319]: A sensor has vanished! Exiting since there's no safe way of handling this.
I wanted to exclude wifi temperature sensor from the .conf file but the virtual hwmonXX changes in every boot.
One nice solution to this (and also to changing hwmonX folders) would be to replace the sensors with device-names in conf file. The conf file would use something like :
device pch_skylake-virtual-0
instead of
hwmon /sys/devices/virtual/hwmon/hwmon4/temp1_input
I have no idea if that is possible or easy to develop...
I have several sensor paths declared.
Unfortunately, one (iwlwifi) is not readable since some kernel update for an undetermined reason.
When starting Thinkfan crashes with the trace below.
I'd expect it to issue warning about the unavailable sensor and continue.
ERROR: Unhandled std::ios_base::failure[abi:cxx11]: basic_filebuf::underflow error reading the file: iostream error.
errno = Input/output error.
Backtrace:
/usr/sbin/thinkfan(+0x37764) [0x55c6b0118764]
/usr/sbin/thinkfan(thinkfan::handle_uncaught()+0x20b) [0x55c6b0119acb]
/usr/lib/libstdc++.so.6(+0x8fc46) [0x7f8bfac95c46]
/usr/lib/libstdc++.so.6(+0x8fc91) [0x7f8bfac95c91]
/usr/lib/libstdc++.so.6(+0x8fed3) [0x7f8bfac95ed3]
/usr/lib/libstdc++.so.6(std::__throw_ios_failure(char const*)+0x63) [0x7f8bfacc0a83]
/usr/lib/libstdc++.so.6(std::basic_filebuf<char, std::char_traits<char> >::underflow()+0x39f) [0x7f8bfacf58bf]
/usr/lib/libstdc++.so.6(std::istream::sentry::sentry(std::istream&, bool)+0x19a) [0x7f8bfad0206a]
/usr/lib/libstdc++.so.6(std::istream::operator>>(int&)+0x2e) [0x7f8bfad0224e]
/usr/sbin/thinkfan(thinkfan::HwmonSensorDriver::read_temps() const+0x176) [0x55c6b0108746]
/usr/sbin/thinkfan(thinkfan::run(thinkfan::Config const&)+0x7d) [0x55c6b00fc6dd]
/usr/sbin/thinkfan(main+0x422) [0x55c6b00fadd2]
/usr/lib/libc.so.6(__libc_start_main+0xea) [0x7f8bfa6694ca]
/usr/sbin/thinkfan(_start+0x2a) [0x55c6b00fb9ca]
/etc/thinkfan.conf
sensors:
- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input # CPU Package
- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input # CPU Core 0
- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input # CPU Core 1
- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_input # CPU Core 2
- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_input # CPU Core 3
- hwmon: /sys/devices/virtual/hwmon/hwmon2/temp1_input # pch_skylake
- hwmon: /sys/devices/virtual/hwmon/hwmon3/temp1_input # acpitz (ACPI CPU)
# - hwmon: /sys/devices/virtual/hwmon/hwmon4/temp1_input # iwlwifi
- nvidia: 01:00.0 # nVidia GPU
- atasmart: /dev/sda # HDD
correction: [10]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 40]
- [1, 32, 55]
- [2, 54, 66]
- [3, 65, 76]
- [4, 75, 80]
- [5, 78, 85]
- [6, 82, 88]
- [7, 85, 32767]
I need to base the fan speed on the GPU temp. What should the config say to enable NVML? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.