ilya-zlobintsev / LACT

Linux GPU Configuration Tool
MIT License
1.44k stars 34 forks source link

Implement a simple linear fan curve option #415

Closed loathingKernel closed 6 days ago

loathingKernel commented 6 days ago

First of all, thank you for adding Nvidia support. I can now possibly ditch my own tool on Linux instead of making it work with Wayland.

One think I would like to have though is a simple linear fan curve based on temperature with an offset. In this mode the fan speed is continuously adjusted based on temperature using a simple formula fan_speed = current_temperature + offset. So instead of having multiple points, the only setting would be the offset and the fan speed is adjusted automatically. So if the temperature is 30 with an offset of 20 the fan speed would be 50.

ilya-zlobintsev commented 6 days ago

I don't think that this is a good idea. In your example, using an offset of 20 with 50% fan speed at 30c you'd have way too high of a speed at lower temperatures, while having reasonable values at higher temps (100% fan speed at 80c). Lower offset would have the opposite problem.

You can replicate any behaviour you want using a fan curve. What's the reason for wanting to do this over a curve?

loathingKernel commented 6 days ago

In your example, using an offset of 20 with 50% fan speed at 30c you'd have way too high of a speed at lower temperatures, while having reasonable values at higher temps (100% fan speed at 80c). Lower offset would have the opposite problem.

In my example I used 20 but the offset would be user-adjustable so it could even go in the negatives for a reasonable range of values, for example from -20 to +20. A user could also set an offset of 0, in effect having the fan speed follow the temperature.

The main reason I would like this feature is because I like having a smoothly incrementing fan speed. As far as I understand, the current curve stays at the certain fan speed until the next threshold is reached and then it increases. A linear fan curve is not only simpler to configure but also offers a smoother fan speed transition.

ilya-zlobintsev commented 6 days ago

As far as I understand, the current curve stays at the certain fan speed until the next threshold is reached and then it increases.

This is not correct - it will pick a speed in the middle of your configured curve points to scale smoothly, it won't strictly jump between specific speeds set on your points. There are also hysteresis settings (such as the minimum change in temperature required to affect the fan speed) to avoid having rapid spinup/spindown of the fan during temperature spikes.

loathingKernel commented 6 days ago

Ah perfect, thank you for explaining how it is implemented. This makes my feature request not really relevant as it can indeed be implemented with the existing fan curve. I will be closing this. Thank you for your time and the project as a whole.