cdown / zcfan Goto Github PK
View Code? Open in Web Editor NEWA zero-configuration fan daemon for ThinkPads.
License: MIT License
A zero-configuration fan daemon for ThinkPads.
License: MIT License
I noticed my SSD temp (around 67 degs) gets picked up as the temp, and used for the rules, etc.
The SSD temp lives under /sys/class/hwmon/hwmon1/temp*_input.
temp1 is "nvme composite" temp, and "temp2 is nvme sensor 2".
Sensor 2 reads around 67 most of the time.
The SSD is not covered by the Thinkpad cooler (on the T16 at least):
https://laptopmedia.com/wp-content/uploads/2022/08/internals-1000x711.jpg
So, controlling fan temp based on this max temp, is not very useful.
TEMP_FILES_GLOB "/sys/class/hwmon/hwmon*/temp*_input" is too broad.
I think a solution could be to allow an override path for TEMP_FILES_GLOB to be specified in /etc/zcfan.conf
On my system, /sys/class/hwmon/hwmon6/ contains all the CPU and GPU temps.
(I dunno if having a single path override is going to be feasible for some hardware configuration - with dedicated graphics chips, which might be reported under a different /sys/class/hwmon/hwmon*/...)
Hi!
I know it shouldn't happen at all, not sure if it's directly related to zcfan but thinkpad_acpi.
Anyhow, it manages to crash my system when I enable zcfan.
Sometimes it just happens at the first boot, sometimes happens 4h after using it.
Not sure if laptop it's too much new and it doesn't have a good support as other ThinkPads do.
This works more as a warning for those users loosing their minds on why their systems keep freezing than a real issue.
Great project! I installed the RPM and it pretty much worked out of the box.
The only issue I'm running into is the low speed on my machine isn't particularly low, so I'm wondering if you can add a configuration option to set what the levels correspond to. That, or support specifying levels as integers instead of by label.
To give some context, here is what I'm observing on my system:
Level | RPMS |
---|---|
0 | 0 |
1 | 2820 |
2 | 3360 |
3 | 3670 |
4 | 3670 |
5 | 3670 |
6 | 4020 |
7 | 4570 |
As you can see, there's no difference between levels 3 through 5 and 2 is not much slower, so on my system it would make sense to make low_temp
level 1 instead of level 2. I imagine there is always going to be some variance with hardware so, while I love that zcfan works well out of the box, fine tuning is still desired.
Was there some reason why this was a macro instead of a function? If so I don't remember it.
This is my first look at this project, so I might be completely in the wrong here, but I don't understand why does the code initializes the watchdog to 2 minutes (120 sec) instead of something like 10 seconds. The watchdog is pinged every 2-3 seconds, so the kernel scheduler or something has to go really wrong for the watchdog to fire at let's say 10 second.
2 minutes seems to be a long time with modern hardware, and if zcfan stops running (operator error, crash, systemd fail, whatever), then in 2 minutes a machine can get really hot if something is consuming a lot of CPU at the same time.
I know this is a constant in the code, and I can easily change it for myself, but for people who are using this from a distribution (e.g. Debian), it's not so easy to do this, as the option is not configurable without rebuild. Could we make this changeable from config/envvar, or change the builtin default constant to some drastically smaller value (e.g. 5 or 10)?
I currently use auto-cpufreq to manage cpu power and frequency but I was wondering if it is possible to use it together with this awesome package, by the way I use a thinkpad p53 so I don't know if I can use this package anywhere. Thanks
@cdown I have a Thinkpad P53 and its configuration was a light at the end of the tunnel, since Thinkfan is very coupled, I do super good with this tool but I wonder if you can list or indicate what your configurations they use in your day by day.For example, I don't know if thermald should use or not or if this interfire with Zcfan.I would help me a gia.Thank you very much
Just a question, does zcfan works on immutable Fedora? Some recommendation?
P.S.
/etc is writable!
A similar project, thinkfan , provides systemd units that kicks in when laptop changes to suspend and wake-up states. Could be useful to have also here ?
after installing with sudo make install on ubuntu, the binary installs into /usr/local/bin but the service path is on /usr/bin/zcfan
fixed it changing the location of the executable to /usr/local/bin/zcfan
please tell me if you need more info
Host: Thinkpad X240
System: Fedora Workstation 38.
expected behaviour: zcfan should turn off the fan once the temperature is lower than the low_temp (in my case 50). So it should turn of the fan when the temp is 49.
Issue: zcfan is working correctly. but when the temperature is lower than the low_temp, it is not turning of the fan.
Ps: It turns off the fan after I manually restart systemd service by:
sudo systemctl restart zcfan.service
I currently have thermald installed, but I wonder if it will have any conflicts with this package, many thanks in advance
It would be great if the fan could go up to full-speed and for limited time even disengaged.
Hi! When I try to compile it here's what happens:
(base) ThinkPad-L430:~/Documents/GitHub/zcfan$ make
cc -std=gnu99 -O2 -pedantic -Wall -Wextra -Werror zcfan.c -o zcfan
And that's it.
How do I fix it?
I'm getting this line about once per second:
Apr 07 10:59:10 fovo.local zcfan[14186]: /proc/acpi/ibm/fan: write: Invalid argument (did you enable fan_control=1?)
I have not done "Load your thinkpad_acpi module with fan_control=1".
Also if the thinkpad_acpi module isn't loaded at all I also get this message about once per second:
Apr 07 11:04:48 fovo.local zcfan[14186]: /proc/acpi/ibm/fan: fopen: No such file or directory
Once the user follows directions, and the module is loaded with the correct parameter, the excess messages go away. But maybe once a minute is enough? Or even once?
Using zcfan-1.1.0-1.fc36.x86_64, kernel-5.17.1-300.fc36.x86_64
I have placed a config file at the path specified in the manpage, but the fan does not increase/decrease at my specified intervals. If it check the systemd process, it seems to be using the default temperature trip points.
I have a ThinkPad T14s gen 3 where I installed zcfan. The fan is cycling like crazy. I am monitoring the CPU and GPU temperature and they never reached 70 or 61. I also feel that the fun runs at high speed always
Mar 13 16:21:58 XX zcfan[11590]: [FAN] Temperature now 63C, fan set to low
Mar 13 16:22:26 XX zcfan[11590]: [FAN] Temperature now 50C, fan set to off
Mar 13 16:24:52 XX zcfan[11590]: [FAN] Temperature now 76C, fan set to medium
Mar 13 16:24:56 XX zcfan[11590]: [FAN] Temperature now 47C, fan set to off
Mar 13 16:25:45 XX zcfan[11590]: [FAN] Temperature now 70C, fan set to low
Mar 13 16:25:49 XX zcfan[11590]: [FAN] Temperature now 48C, fan set to off
Mar 13 16:25:59 XX zcfan[11590]: [FAN] Temperature now 61C, fan set to low
Mar 13 16:26:02 XX zcfan[11590]: [FAN] Temperature now 48C, fan set to off
Mar 13 16:26:22 XX zcfan[11590]: [FAN] Temperature now 61C, fan set to low
Mar 13 16:26:25 XX zcfan[11590]: [FAN] Temperature now 47C, fan set to off
zcfan.conf
max_temp 85
med_temp 75
low_temp 60
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.