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:
<SNIP>
[Rule]
name=Cool CPU
sensor=temp1:0-45
profile=On Demand High
[/Rule]
#
[Rule]
name=Med Hot CPU
sensor=temp1:46-55
profile=On Demand Med
[/Rule]
#
[Rule]
name=Hot CPU
sensor=temp1:56-65
profile=On Demand Low
[/Rule]
#
[Rule]
name=Melting CPU
sensor=temp1:66-100
profile=Powersave Low
[/Rule]
<SNIP>
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!
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.
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.
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:
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.
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
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.
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
Verify that all dependencies are met:
ldd /usr/sbin/cpufreqd
ldd /usr/bin/cpufreqd-set
ldd /usr/bin/cpufreqd-get
Restore or edit /etc/cpufreqd.conf to suit your needs.
Comment out any line on /etc/init.d/cpufreqd that begins with log_daemon_msg or log_end_msg
Make sure it works
/etc/init.d/cpufreqd start
ps ax |grep cpufreqd
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
insserv: warning: script 'S12smfpd' missing LSB tags and overrides
insserv: warning: script 'smfpd' missing LSB tags and overrides
<SNIP>
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.
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:
Notice this section is where I added the cpu info:
##
# Basic states
##
# when AC use performance mode
[Rule]
profile=CPU0:profile0;CPU1:profile1
name=AC Rule
ac=on # (on/off)
profile=Performance High
[/Rule]
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>