Code Monkey home page Code Monkey logo

Comments (8)

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 26, 2024

/etc/thinkfan.conf

# module: thermal
hwmon /sys/class/thermal/thermal_zone0/temp

# module: x86_pkg_temp_thermal
hwmon /sys/class/thermal/thermal_zone1/temp

# module: thinkpad_acpi
tp_fan /proc/acpi/ibm/fan

# mapping
(0, 0,  45) # 0
(1, 40, 55) # 1900
(2, 50, 60) #
(3, 53, 63) #
(4, 55, 65) #
(5, 60, 70) #
(6, 63, 73) #
(7, 67, 77) # 3600
#(127, 75, 32767) # 5000 # out of range

from thinkfan.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 26, 2024

BTW, config entry

(127, 75, 32767) # 5000 # unlimited rpm

used to work fine before v 1.0,
now it reports as invalid value;
how can I restore original behavior?

thank you.

from thinkfan.

vmatare avatar vmatare commented on August 26, 2024

Thanks for reporting. Apparently level 127 used to be handled specially in 0.9. Now it's just written to /proc/acpi/ibm/fan, which is of course invalid.
Workaround: use "level full-speed" instead of 127 (including the double quotes).

from thinkfan.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 26, 2024

I confirm that full speed entry works:
("level full-speed", 75, 32767) # 5000 rpm
BTW, is it too hard to add RPM logging to current format:

thinkfan[20051]: Temperatures(bias): 49(0), 49(0) -> level 1

for example:

thinkfan[20051]: Temperatures(bias): 49(0), 49(0) -> level 1 [rpm=2345]

?
or even expose log format string in thinkfan.conf ?
with a dozen or so available state variables?
:-)

from thinkfan.

vmatare avatar vmatare commented on August 26, 2024

Well, that would be a nice feature indeed. However there are two caveats:

  1. I don't want to increase the number of per-loop CPU operations. Keep in mind that thinkfan wakes up the CPU every 5 seconds or so to poll temperatures, and we want to be done with that as quickly as possible. However we can't output RPM immediately after increasing the fan speed since physical RPM will always take a bunch of seconds to ramp up. So that would require additional per-loop logic of which I'm not sure whether it's worth the cost.
  2. The config syntax is quite convoluted by now, since it evolved from a very simplistic format with a trivial parser into its current state that requires a pretty involved, hand-written parser. Either I come up with a very clean redesign of that parser, or I'll have to migrate to an existing, clean grammar (like YAML) before I implement additional config syntax.

from thinkfan.

Andrei-Pozolotin avatar Andrei-Pozolotin commented on August 26, 2024

thank you for considering this.
re: 1) "will always take a bunch of seconds" - no need to be exact, current or average is fine
re: 2) "migrate to an existing, clean grammar (like YAML) " - yes, please switch to yaml

from thinkfan.

vmatare avatar vmatare commented on August 26, 2024

Alright, tracking the YAML topic as issue #15 now.

from thinkfan.

vmatare avatar vmatare commented on August 26, 2024

The segfault reported in the initial comment is actually the same as in issue #18, which is fixed now, too. So this bug is also done.

from thinkfan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.