Sepero / temp-throttle

A shell script for throttling system CPU frequency based on a desired maximum temperature
Other
243 stars 64 forks source link

Sort admissible frequencies #15

Closed Neraste closed 8 years ago

Neraste commented 9 years ago

If the frequencies in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies are stored in reverse order (i.e.: from the smallest to the largest, as in my ARM box), temp_throttle has an awkward behaviour, increasing CPU frequency at critical temperature.

This modification sorts available frequencies from the largest to the smallest. Successfully tested in ARM environment.

Sepero commented 9 years ago

Fascinating discovery. It would have never crossed my mind that such a possibility would even exist. Perhaps this may also reveal some kind of kernel bug. Regardless, I will be happy to implement this patch. Please allow me some time to review and test it a bit more extensively. Thanks for the submission.

Sepero commented 8 years ago

Hi Neraste. Finally I have gotten time to implement your solution. Please check the "testing" branch to see the implementation. Your help is welcome anytime. Thank you again. :)