cpufreqd equivalent? Trying to prevent CPU overheat.

I migrated from Kubuntu to OpenSuSE and I’m really pleased with what I’ve seen so far.

I haven’t seen cpufreqd available in the repositories for 12.1. I used to use it to keep the CPU from overheating while doing CPU intensive tasks. 90% of the time it would run on ondemand, but if the temp started to go up (i.e., after hours of encoding video), it would gradually slow down the CPU to keep it cool. My /etc/cpufreqd.conf looked like this:

name=Cool CPU
profile=On Demand High
name=Med Hot CPU
profile=On Demand Med
name=Hot CPU
profile=On Demand Low
name=Melting CPU
profile=Powersave Low

On Demand High = 20 - 100% CPU
On Demand Med = 20 - 90% CPU
On Demand Low = 20 - 80% CPU
Powersave Low = lowest CPU speed.

The best part is that it was all automatic and the throttling down was gradual. Is there any way in OpenSuSE to accomplish this? Thanks!

I have a bash script that can help that you can find here: C.F.U. - CPU Frequency Utilitiy - Version 1.10 - For use with the cpufrequtils package - Blogs - openSUSE Forums

You can set your default CPU configuration with the info found here: YaST Power Management - Control Your CPU Energy Usage How To & FAQ - Blogs - openSUSE Forums

The latter actually configures your default CPU Governor though its vague on what its doing exactly.

Thank You,

Are there any other options someone might suggest since I assume cpufreqd is dead?

Surely someone might have a simple script out there that can throttle the cpufreq when a certain temp is reached?

Perhaps theres a way to modify it to work with laptop-mode-tools since that can run things with elecvated privleges I believe, it doesn’t sound very complicated but I’m trying to understand what needs to be done there.

I would think laptop-mode-tools would need something passed to it that would check /sys/devices/virtual/thermal/thermal_zone0/temp and iirc there is a way to set it to run commands in some cases but I have to reinstall it again.


So first, did you give my bash script a try called cfu:

C.F.U. - CPU Frequency Utilitiy - Version 1.10 - For use with the cpufrequtils package - Blogs - openSUSE Forums

which uses the cpufrequtils application loaded from YaST? If it works, I assume that using the ondemand Governor would do what you want. I did find the site for cpufreqd, which sports the source you could try to compile.

Cpufreqd - MalaWiki

Thank You,

I did look over your script but I don’t believe it has anything to do with changing the cpufreq at a certain temp which was actually the point of the original author as well?

I will check out cpufreqd source, but I can already easily set cpufreq using cpufrequtils or the gnome-applets cpufreq-selector with a Gnome Shell extension.

What I need is something that can change the governer to powersave whenever a temp of lets say 86c is reached, it would then change to conservative or ondemand, to prevent overheating.

As it stands just changing to a new freq works fine to lower the temp, but if I dont lower it before it reaches 90 or above, a therm-trip occurs which doesn’t always cause severe problems like locking, but it does cause the bios to notify you of this when you reboot/startup. Of course it is also concerning as it gets so hot it can cause serious hardware damage.

At any rate this laptop is only rated at like 91c max so it maxes out alot, not as much after I cleaned the fan and applied new TIM, but I’d like to prevent it from happening again. I alread burnt the fan up once because of it.

Well I did try to get it running, I built from source that all went well after installing the deps and then I ran into a couple problems I solved, but it doesn’t seem to be installing as root or something as it installs somewhere funny, but finally when running cpufreqd as root I get one of these generic errors:

command: 00020001 0002 0001
connect(): Connection refused

So here is all the info I obtained, I’ll open a new post laster with what I have done and everything trying to get this going bbut there might be an easier way to just make a hackish script that would loop i.e run continually using and if else checking for the temp, at least that would do what I’m asking temporarily.

Some links that have helped:
[all variants] problem with cpufreqd - Ubuntu Forums](http://ubuntuforums.org/showthread.php?t=1822044) <needed to even get it to error otherwise its something about socket as mentioned in that post i believe.
Gentoo Forums :: View topic - No cpufreqd socket found…
Old Nabble - Linux Thinkpad - Cpufreqd und cpufrequtils
Gentoo Linux Documentation – Power Management Guide < good settings info
Ubuntu Manpage: cpufreqd.conf - configuration file for cpufreqd(1) < generic man page
openSUSE 12.2: Chapter 21. Power Management <12.2 cpufreq info but not to do with cpufreqd

Just a thought, but if you’re using a desktop and your CPU is over heating I would invest in better cooling. There are a wealth of after market products for keeping those all too important temps down. As I don’t want to personally recommend a single product (as it needs to fit your budget, case size etc.), I’d recommend googling to get some ideas. The Pc gaming industry and over-clockers amongst us have created a demand for some truly awesome kit. When replacing heat sinks don’t forget to replace the thermal paste and also look at dust build up and extra case fans. Dust also is a potential problem with laptops so good old trusty air can is your friend here; never use a brush or vacuum cleaner, static will kill your pride and joy :slight_smile:

Thanks for the suggestions. I actually cleaned out the fan as the very first step but it took me a couple weeks to realize I was even getting so hot as I also read there was an error where nomodeset was not being applied and that caused a false therm-trip but I already tried nomodeset and with it enabled I may have gained 2-3 degress drop if that. But this is a laptop, and I also found some underclocking info which helped me gain another 5 degrees, but that was before the fan cleaning. When I initially cleaned the fan, as I believe the heat is causing it to burn out so I need to buy a new one within a couple months, I planned on applying new thermal compoound, but alas it was a 3 hour project to actually get the case far enough apart to access the heatsink.

I finally got that done about 20 minutes ago, and with the new tim I’m running probably 10 lower and idling at around 58-60 sometimes which is very nice. I even saw it bottom out at 57 a while ago, so I’m hopefull after the break in I will be doing alright.

I am still eager to find a solution to this post justas a backup though, since this is a laptop I’d rather be safe than sorry.

Glad the cleaning etc helped things for you. I must admit my forte is not laptops so I have little more knowledge to offer. However I have seen somewhere cooling supports for laptops that have cooling fans built in. I’m not sure how effective they are but it maybe worth a look.

I found a way a while ago:

Download Ubuntu’s cpufreqd here:
64-bit http://mirrors.us.kernel.org/ubuntu/pool/universe/c/cpufreqd/cpufreqd_2.4.2-1_amd64.deb
32-bit http://mirrors.us.kernel.org/ubuntu/pool/universe/c/cpufreqd/cpufreqd_2.4.2-1_i386.deb

Then, as root:

  1. Install dpkg
    zypper in --no-recommends dpkg
  2. Install cpufrequtils
    zypper in cpufrequtils
  3. Extract cpufreqd debian package on root directory
    dpkg-deb -x /home/Downloads/cpufreqd_2.4.2-1_amd64.deb / # <— Replace with proper download directory and version
  4. Verify that all dependencies are met:
    ldd /usr/sbin/cpufreqd
    ldd /usr/bin/cpufreqd-set
    ldd /usr/bin/cpufreqd-get
  5. Restore or edit /etc/cpufreqd.conf to suit your needs.
  6. Comment out any line on /etc/init.d/cpufreqd that begins with log_daemon_msg or log_end_msg
  7. Make sure it works
    /etc/init.d/cpufreqd start
    ps ax |grep cpufreqd
  8. Activate service at boot:
    chkconfig -a cpufreqd

Let me know it this works for you too.

Good morning,

I went ahead and did as you suggested, the first step was for me to remove all of the old cpufreqd stuff of course. I made sure to make the correct comments, and then I tried to start it. When trying to start I get: redirecting to systemctl and then grep displays grep as the only result.

So first I tried to reboot and try again, once that failed I went ahead and launched yast>runlevel system services and enabled and started cpufreqd. When doing this it told me syslog was required to be started as well and I confirmed and it started both properly. Grep still does not display it, but I figured that’s ok?

Next step 8, activating at boot I notice something about syslog again. I can’t decipher if it’s telling me I need to change the runlevel for syslog, or change the runlevel for cpufreqd?:

~> sudo /sbin/chkconfig -a cpufreqd 
insserv: warning: script 'S12smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
insserv: Service syslog is missed in the runlevels 4 to use service cpufreqd

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

cpufreqd                  0:off  1:off  2:on   3:on   4:on   5:on   6:off

Note this is openSuse 12.2 amd64

Thanks again, I am happy to have gotten this far.

insserv: warning: script 'S12smfpd' missing LSB tags and overrides 
insserv: warning: script 'smfpd' missing LSB tags and overrides
cpufreqd                  0 off  1 off  2 on   3 on   4 on   5 on   6 off

The first two lines are unrelated to cpufreqd. They have to do with smfpd, which is a parallel port daemon. The last line shows that cpufreqd will be activated in runlevels 2, 3, 4, and 5. So it should run.

My output of ps is:

$ ps ax |grep cpufreq
  922 ?        Ssl    0:02 /usr/sbin/cpufreqd -f /etc/cpufreqd.conf
 5056 pts/1    S+     0:00 grep --color=auto cpufreq

If I stop the process manually, and restart it, I get:

# /etc/init.d/cpufreqd start
redirecting to systemctl

… and nothing more, but “ps ax |grep cpufreq” show the process like the one (922) above.

After checking out the mailing list I seemed to have gotten it to work finally, yay! But now I have another problem. I read it doesn’t work well on multiple cpus, but I found on the mailing list how to make that happen in this post SourceForge.net: cpufreq daemon: cpufreqd-user

So to get it working I had to set remote to 0 at the top and uncomment the acpi bit and then grep confirmed its working finally:

# ps ax | grep cpufreqd15856 ?        Ssl    0:00 /usr/sbin/cpufreqd -f /etc/cpufreqd.conf
15872 pts/1    S+     0:00 grep --color=auto cpufreqd

and here is my cpufreqd.conf SUSE Paste

Notice this section is where I added the cpu info:

# Basic states
# when AC use performance mode
name=AC Rule
ac=on                    # (on/off)
profile=Performance High

Im scouring the man now but I was wondering if anyone knows how to set it up correctly for multiple cpus?

And I read it needs the userspace governor to run, does that mean I need to set userspace at default somehow, and then I can’t use any of the cpufreq-utils commands like cpufreq-set to change the freq from here on out? <the last bit I’m ok with but Ive never used cpufreq before>


I checked those out, they are for my samsung printer from unified driver, I assume I use lpt.