Sepero / temp-throttle

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

Adding fallback to cpufrequtils #9

Closed ghost closed 9 years ago

ghost commented 9 years ago

In recent OS versions directly writing to /sys/devices/system/cpu/cpu?/cpufreq/scaling_max_freq not allowed. This pull request adding support for cpufrequtils. (Fixing issue #5)

Sepero commented 9 years ago

Great improvement. Can you tell me, is the following find required for cpufreq-set to work? And if so, what is the location it returns for your machine?

for I in $(find /sys/devices/system/cpu/ -maxdepth 1 -name 'cpu?' | sed 's_/sys/devices/system/cpu/cpu__g')
Sepero commented 9 years ago

Correction because of my misunderstanding- Is it mandatory to set all the core's to minimum frequency before cpufreq-set can work in the script temp_throttle.sh? And if so, do you have any idea why?

cpufreq-set -c $I --min 800000
ghost commented 9 years ago

No, it's not mandatory.

Sepero commented 9 years ago

Ah ok. I was just trying to understand the changes that were made to README.md with pull #8. Thanks

Sepero commented 9 years ago

Hi zlay. I updated the script and based it around your pull request. Please try it out and let me know if there are any issues. :)

ghost commented 9 years ago

I just tested the script. It works perfectly.

Sepero commented 9 years ago

Good work. Thanks a lot.