system76 / ec

System76 Open Source Embedded Controller
GNU General Public License v3.0
318 stars 72 forks source link

Use a moving average for temperatures #482

Closed crawfxrd closed 2 days ago

crawfxrd commented 2 months ago

Mitigate some fan noise by using a moving average instead of instantaneous points for thermal logic.

When starting a load, CPU will report rapid jumps in temp temperature. These spikes end up getting recorded by the cooldown table, and will cause the fans to run at higher than necessary duties for the actual loads.

Current logic is set to update every 250ms, so use 4 points to average over 1s.

TODO:

Resolves: #480

crawfxrd commented 2 days ago

Included in #500.