Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fan Curves and user configured Fail-Safe #27

Open
nomeat1997 opened this issue May 18, 2024 · 4 comments
Open

Fan Curves and user configured Fail-Safe #27

nomeat1997 opened this issue May 18, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nomeat1997
Copy link

Would it be possible to add a user configurable curve for the fan speeds ?
Like a table of temp. vs fan speed ?

The problem is that I can only set a single speed. So I let the fail safe mode turn on G mode when I play games and it keeps the system cool enough. Now sometimes, the CPU spikes to high temperatures, beyond the fail safe. This causes the fans to ramp up even during casual tasks. And the fail safe mode turns off after a long time too.

It would be nice if we could configure some kind of parameter for the fail safe (like the CPU/GPU should remain beyond the fail safe temp. for X seconds) after which G mode will be turned on. Or if possible we can just use regular old fan curves.

Sorry, this is a bit of nitpick, it's just that even small tasks like opening up a word doc or browsing the web sometimes causes the CPU to spike beyond 80C and this ramps up the fans (deafeningly)

@AlexIII
Copy link
Owner

AlexIII commented Jun 3, 2024

Hi! I think these are very useful suggestions, the fan curves and configurable delay for the fail-safe are both possible to implement.
I cannot promise you when I'll have time to get back to the project, but I will definitely take a note. Cheers!

@AlexIII AlexIII added enhancement New feature or request help wanted Extra attention is needed labels Jun 3, 2024
@AlexIII
Copy link
Owner

AlexIII commented Jun 9, 2024

Added a small fix in the latest release to filter-out short temp spikes, so they shouldn't trigger fail-safe any more.

@Mih-Ziv
Copy link

Mih-Ziv commented Jul 6, 2024

Great idea, I think something very simple like the "curve" just being points on a graph, connected would be great, if not the best. Math seems very simple, where the program would index an array of temperatures saying:

  1. is the temp between these two temps
  2. if yes, (RPM on lower temp * distance to higher temp + RPM on higher temp * distance to lower temp) / distance of higher and lower temp is the goal RPM
  3. if not, just go to the next higher temp pair
    if binary search was implemented, it would be faster, but no one would use it with so many points that it matters

Some other benefits of this method:

  • trivial to check if the graph is well defined: if all temperatures are sorted, if all belong to a range of (0, 110), and all RPMs belong to a range(0, max RPM), every point of the graph will too belong to this range. Only thing that needs fixing is duplicate values (bc division by 0) and the first and last values existing, which can be simply done by adding (0, 0) and (maxTemp, 100)
  • trivial for user understanding, even if its just a plain text file where users input values so it is easy to implement, everyone with a brain can imagine/draw how the graph looks
  • actually surprisingly versatile: no matter what the user wants, if its reasonable, they can make a pretty good approximation in under 10 points.

(sorry for backseat programming, but I can't figure my way out from the code provided, and don't know enough python. If I knew more, I would do it myself)

pseudocode of a body of a method for calculating RPM from the arrays and the reported temperature:

Temp temp[n]
RPM rpm[n]
Temp reportedTemp
for(i from 0 to n-1){
    if(reportedTemp > temp[i] and reportedTemp < temp[i+1]){
        return rpm[i] *  ((reportedTemp-temp[i+1])/ (temp[i+1]-temp[i]))
           + rpm[i+1] * ((temp[i]-reportedTemp)   / (temp[i+1]-temp[i]));
    }
}

@xiaomanzai
Copy link

What does "distance to temp" mean? I don’t quite understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants