LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Set maximum CPU frequency? (https://www.linuxquestions.org/questions/slackware-14/set-maximum-cpu-frequency-4175495041/)

Miranden 02-15-2014 01:06 PM

Set maximum CPU frequency?
 
I have a laptop that always overheats, and I want to set my maximum CPU frequency at something like 80 percent. However, I am not sure what utilities exist to allow me to do this. I have seen this:

http://docs.slackware.com/howtos:har...quency_scaling

But there doesn't seem to be an option to set a maximum frequency. I also don't think Laptop Mode Tools will do it.

Does anyone know how I can do this?

Thanks.

genss 02-15-2014 01:17 PM

other then by some tool (like i use enlightenments CpuFreq widget)

check /usr/src/`uname -r`/Documentation/cpu-freq/user-guide.txt

section 3 says:

Code:

The preferred interface is located in the sysfs filesystem. If you
mounted it at /sys, the cpufreq interface is located in a subdirectory
"cpufreq" within the cpu-device directory
(e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).

cpuinfo_max_freq :                this file shows the maximum operating
                                frequency the processor can run at(in kHz)

and a couple other things/hints
i put the kernel documentation as it is a kernel thing so if it changes in the future you know where to look
note you probably need to set it as root

also check out powertop, its a great tool for power saving

metaschima 02-15-2014 01:51 PM

Have you tried other methods, such as cleaning out the fan vents using compressed air ?

If you really had to limit the CPU frequency you should use a userspace program to set the CPU frequency. Slackware already has the userspace governor enabled.

For example you can use 'cpufreq-set --cpu 0 -r --max 800' or you can cat into '/sys/devices/system/cpu/cpu0/cpufreq/scaling_set_speed'.

Miranden 02-16-2014 01:10 PM

Thanks to you both. Yes, I have checked everything, and I'm sure it isn't a problem with dust. The fan vents are perfectly clear. This thing just runs hot. It also has a really loud, annoying fan, so I also always use a separate cooling mat underneath it to cut down on fan noise. AND I have an extra-large battery in it, so it is propped up at an angle which allows air flow underneath. Just take it from me: do not buy an HP Pavilion laptop.

I will use the cpufreq-set. Thanks again!

TracyTiger 02-16-2014 01:51 PM

Quote:

Originally Posted by Miranden (Post 5118791)
It also has a really loud, annoying fan, so I also always use a separate cooling mat underneath it to cut down on fan noise.

I don't know if this is your case or not, but this is just a general note about a "cooling mat" that includes fans.

Assuming a laptop has it's air intake or exhaust opening(s) on the bottom and not the sides, you can have a situation where the "cooling mat" and the laptop are fighting each other rather than blowing the air in the same direction. That is, the "cooling mat" may actually be impeding airflow through the laptop.

genss 02-16-2014 02:00 PM

Quote:

Originally Posted by Miranden (Post 5118791)
Just take it from me: do not buy an HP Pavilion laptop.

don't buy hp anything laptop
buy.. what was it acer or asus, its better performance, quality, price and easier maintenance

Kallaste 02-16-2014 11:33 PM

deleted

TobiSGD 02-17-2014 05:37 AM

Are you sure that the heat is even generated by the CPU? It also could be the GPU that produces the heat, for example in case of a Radeon GPU used with the free radeon drivers.

zrdc28 02-19-2014 12:57 AM

I will agree with tobisgd that you might need to make sure that you have the correct driver for your video. On my laptop with the neauveau driver it has a real problem with overheating. Do a lspci and look at it to make sure what driver you need. Then do a lsmod to check what module is loaded.

ssokolow 03-15-2014 09:37 PM

For anyone who happens to wander in off Google, a more appropriate solution would probably be to use cpufreqd to dynamically adjust the speed limit on your CPU.

That way you can still use full speed in short bursts.

Here's the config file I use with an HP small form factor desktop PC that has the same problem.

Miranden 03-15-2014 10:56 PM

Quote:

Originally Posted by TobiSGD (Post 5119150)
Are you sure that the heat is even generated by the CPU? It also could be the GPU that produces the heat, for example in case of a Radeon GPU used with the free radeon drivers.

Sorry, my subscription preferences were messed up and I just saw these last few posts. I'm sure no one remembers this anymore, but to answer your question, the reason I was sure it was the cpu was because when I set the max cpu frequency under Windows, it eliminated the problem. Without it it would overheat and shut off. Thanks for the idea.

Tracy, my cooling mat is not causing the problem. The cooling mat was my response to the problem. The laptop just runs hot.

Quote:

Originally Posted by ssokolow (Post 5135323)
For anyone who happens to wander in off Google, a more appropriate solution would probably be to use cpufreqd to dynamically adjust the speed limit on your CPU.

That way you can still use full speed in short bursts.

Here's the config file I use with an HP small form factor desktop PC that has the same problem.

Thanks for that. Might try it if I ever need more performance. I used the solution of cpufreq-set to limit the maximum cpu frequency to 85 percent, and that has made it cooler.


All times are GMT -5. The time now is 04:12 AM.