cpufrequtils config file; where is it?
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
cpufrequtils config file; where is it?
Where in the heck is the config file for the cpufrequtils located? Do I just edit /ect/init.d/cpufrequtils (program) ? If so, this line only indicates 1 cpu and I have 4 with hyperthreading (line 48)So it reflects:
check_governor_avail() {
info="/sys/devices/system/cpu/cpu0/cpufreq
Do I edit that to read: info="/sys/devices/system/cpu/cpu0/cpu1/cpu2/cpu3/cpu4/cpu5/cpu6/cpu7/cpufreq So it reflects 8 cpus?
line 44 through 48:
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="0"
MIN_SPEED="0"
Do I set that to read:
MAX_SPEED="2400"
MIN_SPEED="800" ????
I set all this in the terminal using these commands but it didn't persist:
cpufreq-set -c 0 -g ondemand
cpufreq-set -c 1 -g ondemand
cpufreq-set -c 2 -g ondemand
cpufreq-set -c 3 -g ondemand
cpufreq-set -c 4 -g ondemand
cpufreq-set -c 5 -g ondemand
cpufreq-set -c 6 -g ondemand
cpufreq-set -c 7 -g ondemand
Oddly enough inxi reports: Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 800.00 MHz 5: 800.00 MHz 6: 2401.00 MHz 7: 800.00 MHz 8: 800.00 MHz
check_governor_avail() {
info="/sys/devices/system/cpu/cpu0/cpufreq
Do I edit that to read: info="/sys/devices/system/cpu/cpu0/cpu1/cpu2/cpu3/cpu4/cpu5/cpu6/cpu7/cpufreq So it reflects 8 cpus?
line 44 through 48:
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="0"
MIN_SPEED="0"
Do I set that to read:
MAX_SPEED="2400"
MIN_SPEED="800" ????
I set all this in the terminal using these commands but it didn't persist:
cpufreq-set -c 0 -g ondemand
cpufreq-set -c 1 -g ondemand
cpufreq-set -c 2 -g ondemand
cpufreq-set -c 3 -g ondemand
cpufreq-set -c 4 -g ondemand
cpufreq-set -c 5 -g ondemand
cpufreq-set -c 6 -g ondemand
cpufreq-set -c 7 -g ondemand
Oddly enough inxi reports: Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 800.00 MHz 5: 800.00 MHz 6: 2401.00 MHz 7: 800.00 MHz 8: 800.00 MHz
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- austin.texas
- Level 20
- Posts: 12003
- Joined: Tue Nov 17, 2009 3:57 pm
- Location: at /home
Re: cpufrequtils config file; where is it?
I love your signature line - and here is a graphical representation of that statement.
http://en.wikipedia.org/wiki/File:Political_chart.svg
http://en.wikipedia.org/wiki/Political_ ... dimensions
http://en.wikipedia.org/wiki/File:Political_chart.svg
http://en.wikipedia.org/wiki/Political_ ... dimensions
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Linux Linx 2018
Re: cpufrequtils config file; where is it?
I have been trying to figure this one out for a few hours now.
I used the following commands to lower the maximum frequency from 1.73Ghz to 1.6Ghz because my laptop was getting too hot even if I changed the freq scaling governors.
According to cpufreq-info (and my now quieter fan), the commands worked. I was so happy... until I suspended the machine. Upon resuming, I checked cpufreq-info again only to find that the maximum frequency was reset and back to 1.73ghz.
I changed this on the cpufrequtils file
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="1466000"
MIN_SPEED="933000"
But it only worked on cpu0 (cpu1 through cpu7 are set at 1.73ghz). The maximum frequency on cpu0 persists even after suspending, so I guess I'm on the right path to fixing the thing, but just as OP, I can't figure out how to make the settings permanent accross all cpu's.
I guess I don't have much of an answer, but I just wanted to check with OP to see if he's found something new about this. This is the only instance I've found so far of a description of the same problem I have. If anyone else has some answers, I'd really appreciate any help.
I used the following commands to lower the maximum frequency from 1.73Ghz to 1.6Ghz because my laptop was getting too hot even if I changed the freq scaling governors.
Code: Select all
sudo sh -c 'cpufreq-set -c 0 -u 1.60GHz; cpufreq-set -c 1 -u 1.60GHz; cpufreq-set -c 2 -u 1.60GHz; cpufreq-set -c 3 -u 1.60GHz; cpufreq-set -c 4 -u 1.60GHz; cpufreq-set -c 5 -u 1.60GHz; cpufreq-set -c 6 -u 1.60GHz; cpufreq-set -c 7 -u 1.60GHz'
I changed this on the cpufrequtils file
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="1466000"
MIN_SPEED="933000"
But it only worked on cpu0 (cpu1 through cpu7 are set at 1.73ghz). The maximum frequency on cpu0 persists even after suspending, so I guess I'm on the right path to fixing the thing, but just as OP, I can't figure out how to make the settings permanent accross all cpu's.
I guess I don't have much of an answer, but I just wanted to check with OP to see if he's found something new about this. This is the only instance I've found so far of a description of the same problem I have. If anyone else has some answers, I'd really appreciate any help.
Re: cpufrequtils config file; where is it?
Hi,oscarus wrote:I have been trying to figure this one out for a few hours now.
I used the following commands to lower the maximum frequency from 1.73Ghz to 1.6Ghz because my laptop was getting too hot even if I changed the freq scaling governors.According to cpufreq-info (and my now quieter fan), the commands worked. I was so happy... until I suspended the machine. Upon resuming, I checked cpufreq-info again only to find that the maximum frequency was reset and back to 1.73ghz.Code: Select all
sudo sh -c 'cpufreq-set -c 0 -u 1.60GHz; cpufreq-set -c 1 -u 1.60GHz; cpufreq-set -c 2 -u 1.60GHz; cpufreq-set -c 3 -u 1.60GHz; cpufreq-set -c 4 -u 1.60GHz; cpufreq-set -c 5 -u 1.60GHz; cpufreq-set -c 6 -u 1.60GHz; cpufreq-set -c 7 -u 1.60GHz'
I changed this on the cpufrequtils file
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="1466000"
MIN_SPEED="933000"
But it only worked on cpu0 (cpu1 through cpu7 are set at 1.73ghz). The maximum frequency on cpu0 persists even after suspending, so I guess I'm on the right path to fixing the thing, but just as OP, I can't figure out how to make the settings permanent accross all cpu's.
I guess I don't have much of an answer, but I just wanted to check with OP to see if he's found something new about this. This is the only instance I've found so far of a description of the same problem I have. If anyone else has some answers, I'd really appreciate any help.
My settings have persisted, but only one of the CPUs ever changes, CPU6. Mine stays on power saving mode of 800 MHz. Try the settings I left alone, and see if it works:
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="0"
MIN_SPEED="0"
Also I achieved this via command line and not editing the config file directly. Maybe it will work for you as well.
Also, OP is a female, not a male
Re: cpufrequtils config file; where is it?
Oops! sorry about that!Ubulindy wrote: Hi,
My settings have persisted, but only one of the CPUs ever changes, CPU6. Mine stays on power saving mode of 800 MHz. Try the settings I left alone, and see if it works:
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="0"
MIN_SPEED="0"
Also I achieved this via command line and not editing the config file directly. Maybe it will work for you as well.
Also, OP is a female, not a male
So, what exactly did you end up doing? Was the governor the only thing you wanted to change? I think "ondemand" was already my default, but the thing I want to change (which led to me editing that script) is the max freq to kinda recreate the setting windows has where you can set the maximum processing power the system can use. I thought I had the answer with the commands I listed, but their lack of persistence has now become the bane of my existence! I want to keep looking, but all my links on google are already purple haha!
Re: cpufrequtils config file; where is it?
Sec, Im trying to find a really old forum link I had used. I had also disabled powersave settings via cli. Maybe that's what finally made the settings persist? Trying to find the link. Sorry, Ive looked and looked and I cant find that old forum thread. It was an old Ubuntu forum, think was ubuntu 8.04 or something like that. But I followed what it said and it worked. Damnit wish I could find the link... sorry. I did however just find this:
For more information about governors, read cpu-drivers.txt (available in /usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/ from the package linux-doc-2.6, you can read the latest version from kernel.org).
GOVERNOR variable from /etc/default/cpufrequtils not taking effect:
So, you configured the GOVERNOR variable in /etc/default/cpufrequtils and after reboot you notice by running cpufreq-info that the active governor is still "ondemand".
This may happen if you have laptop-mode-tools installed. laptop-mode configures the active governor via the following variables: BATT_CPU_GOVERNOR, LM_AC_CPU_GOVERNOR, NOLM_AC_CPU_GOVERNOR. You can override them to your liking in /etc/laptop-mode/laptop-mode.conf:
BATT_CPU_GOVERNOR=powersave
LM_AC_CPU_GOVERNOR=conservative
NOLM_AC_CPU_GOVERNOR=ondemand
If you use laptop-mode to set the governor, you can disable /etc/init.d/cpufrequtils from starting at boot to save a few miliseconds:
update-rc.d -f cpufrequtils remove
https://wiki.debian.org/HowTo/CpuFrequencyScaling
For more information about governors, read cpu-drivers.txt (available in /usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/ from the package linux-doc-2.6, you can read the latest version from kernel.org).
GOVERNOR variable from /etc/default/cpufrequtils not taking effect:
So, you configured the GOVERNOR variable in /etc/default/cpufrequtils and after reboot you notice by running cpufreq-info that the active governor is still "ondemand".
This may happen if you have laptop-mode-tools installed. laptop-mode configures the active governor via the following variables: BATT_CPU_GOVERNOR, LM_AC_CPU_GOVERNOR, NOLM_AC_CPU_GOVERNOR. You can override them to your liking in /etc/laptop-mode/laptop-mode.conf:
BATT_CPU_GOVERNOR=powersave
LM_AC_CPU_GOVERNOR=conservative
NOLM_AC_CPU_GOVERNOR=ondemand
If you use laptop-mode to set the governor, you can disable /etc/init.d/cpufrequtils from starting at boot to save a few miliseconds:
update-rc.d -f cpufrequtils remove
https://wiki.debian.org/HowTo/CpuFrequencyScaling
Re: cpufrequtils config file; where is it?
instead of using cpufrequtils using tlp might easier.
Re: cpufrequtils config file; where is it?
kurotsugi, it would be nice to know what tlp is???
Re: cpufrequtils config file; where is it?
ah. sorry. it's quite new tool and not in the official repo yet. it's a tool for power saving. one of the feature is control both cpu govs and cpu freq :3
if you only want to control the cpu freq you only need tlp but you can also install tlp rdw to control radio connection.
http://linrunner.de/en/tlp/tlp.html
Code: Select all
deb http://ppa.launchpad.net/linrunner/tlp/ubuntu lucid main
http://linrunner.de/en/tlp/tlp.html
Re: cpufrequtils config file; where is it?
TLP works perfectly (even after rebooting or suspending!) Thank you guys (the royal "guys" ) for all your help!
You know, the weird thing is that I had installed TLP earlier today, but as soon as I saw that it required to remove the default ondemand governor to avoid conflicts, I thought it would be too hacky or complicated. After all the nonsense I tried and thanks to your recommendation, I gave TLP another chance only to realize it is actually very simple to use.
For future reference, here is what I edited on the TLP configuration file (don't forget to uncomment the settings you want to edit! i.e. remove the # ):
Changing those settings makes "ondemand" the scaling governor and sets the max frequency of all the cores (cpu0 through cpu7) to 1.47 Ghz, which is 85% of the default 1.73 Ghz. This keeps the laptop from doubling as a space heater and marshmallow roaster, but those are "features" I can happily live without.
I also reverted the cpufrequtils file to its default settings just in case.
You know, the weird thing is that I had installed TLP earlier today, but as soon as I saw that it required to remove the default ondemand governor to avoid conflicts, I thought it would be too hacky or complicated. After all the nonsense I tried and thanks to your recommendation, I gave TLP another chance only to realize it is actually very simple to use.
For future reference, here is what I edited on the TLP configuration file (don't forget to uncomment the settings you want to edit! i.e. remove the # ):
Code: Select all
CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=ondemand
CPU_SCALING_MIN_FREQ_ON_AC=0
CPU_SCALING_MAX_FREQ_ON_AC=1466000
CPU_SCALING_MIN_FREQ_ON_BAT=0
CPU_SCALING_MAX_FREQ_ON_BAT=1466000
I also reverted the cpufrequtils file to its default settings just in case.
Re: cpufrequtils config file; where is it?
just a little note:
tlp can't work well with laptop-mode-tools and cpufrequtils. if we're on ubuntu based OS we might need to stop ondemand service (/etc/init.d/ondemand). the cpu gov control also didn't work well on some intel cpu if you're using p-state driver. p-state only have powersave and performance gov. thus, using ondemand on tlp config file won't work.
tlp can't work well with laptop-mode-tools and cpufrequtils. if we're on ubuntu based OS we might need to stop ondemand service (/etc/init.d/ondemand). the cpu gov control also didn't work well on some intel cpu if you're using p-state driver. p-state only have powersave and performance gov. thus, using ondemand on tlp config file won't work.
Re: cpufrequtils config file; where is it?
They offer a solution for the ondemand conflict here: http://linrunner.de/en/tlp/docs/tlp-faq.html#scalingkurotsugi wrote:just a little note:
tlp can't work well with laptop-mode-tools and cpufrequtils. if we're on ubuntu based OS we might need to stop ondemand service (/etc/init.d/ondemand). the cpu gov control also didn't work well on some intel cpu if you're using p-state driver. p-state only have powersave and performance gov. thus, using ondemand on tlp config file won't work.
Re: cpufrequtils config file; where is it?
I love your signature line - and here is a graphical representation of that statement.
Here's a better one!
http://2.bp.blogspot.com/-iaKgQja7IkI/T ... us_big.jpg
Here's a better one!
http://2.bp.blogspot.com/-iaKgQja7IkI/T ... us_big.jpg
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: cpufrequtils config file; where is it?
kurotsugi wrote:ah. sorry. it's quite new tool and not in the official repo yet. it's a tool for power saving. one of the feature is control both cpu govs and cpu freq :3if you only want to control the cpu freq you only need tlp but you can also install tlp rdw to control radio connection.Code: Select all
deb http://ppa.launchpad.net/linrunner/tlp/ubuntu lucid main
http://linrunner.de/en/tlp/tlp.html
I'm on LMDE. Didn't I read that we aren't to add PPA's from Ubuntu to LMDE because they are not compatible and can/might/will break your system? That LMDE and Ubuntu are NOT interchangeable. Thanks for the info but because of this I think I'll pass
Re: cpufrequtils config file; where is it?
that's the general rule for PPA but that PPA is an exception since the lucid branch contain *deb files build for debian testing. the one who maintaining that PPA is the tlp dev himself. http://linrunner.de/en/tlp/docs/tlp-lin ... ement.html
Debian 6.0 and higher
as well as Linux Mint Debian Edition (LMDE)
Execute the following steps in a root shell.
Add a line for the package repository TLP-PPA to your /etc/apt/sources.list:Add the public key for the PPA:Code: Select all
deb http://ppa.launchpad.net/linrunner/tlp/ubuntu lucid main
If the above command fails, try with a different keyserver:Code: Select all
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 02D65EFF
Update package data:Code: Select all
apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 02D65EFF
Install the following packages:Code: Select all
apt-get update
The above packages may be installed via package management tools or terminal command:Code: Select all
tlp (PPA) – Power saving tlp-rdw (PPA) – optional, Radio Device Wizard tp-smapi-dkms (main) – optional ThinkPad only, tp-smapi is needed for battery charge thresholds and ThinkPad specific status output of tlp-stat acpi-call-tools (PPA) – optional ThinkPad only, acpi-call is needed for battery charge thresholds on Sandy Bridge and newer models (X220/T420, X230/T430 et al.)
ThinkPads require an additional:Code: Select all
sudo apt-get install tlp tlp-rdw
Code: Select all
sudo apt-get install tp-smapi-dkms acpi-call-tools
Re: cpufrequtils config file; where is it?
Ahhh, thanks for the info kurotsugi! I'll take a look at it more once I wake up a bit, need my coffee right now