View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1510
|
Posted: Mon Nov 08, 2021 9:51 am Post subject: unable to change cpu governors[solved] |
|
|
I found out that my laptop has been using the performance cpu governor, I wanted to change that to ondemand or conservative but I get the following:
Code: | samsung /etc/laptop-mode # cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors
performance powersave
samsung /etc/laptop-mode # echo conservative > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
-su: echo: write error: Invalid argument
samsung /usr/src/linux # grep -i conservative /usr/src/linux/.config
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
samsung /usr/src/linux # grep -i powersave /usr/src/linux/.config
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_PCIEASPM_POWERSAVE is not set
samsung ~ # uname -v
#22 SMP Mon Nov 8 11:40:38 EET 2021
|
I do not get how powersave is available although it is not set in my kernel.
I have compiled the kernel several times and made sure I'm booting from that kernel. any idea what I can do about this?
Last edited by Adel Ahmed on Thu Nov 11, 2021 7:28 am; edited 1 time in total |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3310 Location: Rasi, Finland
|
Posted: Mon Nov 08, 2021 10:07 am Post subject: |
|
|
Make sure you have those setting enabled on running kernel.
Check with: Code: | zfgrep CONFIG_CPU_FREQ_GOV_ /proc/config.gz |
_________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 3996 Location: Bavaria
|
Posted: Mon Nov 08, 2021 2:16 pm Post subject: |
|
|
Do you have an Intel CPU ?
If yes: What says "cat /sys/devices/system/cpu/intel_pstate/status" ?
If "active" then you have the P-State gouvernor and you cant select with the old intel gouvernor. NOTE: intel_pstate driver supports only two governors: powersave and performance
See more here: https://wiki.archlinux.org/title/CPU_frequency_scaling |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1510
|
Posted: Mon Nov 08, 2021 4:40 pm Post subject: |
|
|
correct:
Code: | samsung /usr/src/linux # cat /sys/devices/system/cpu/intel_pstate/status
active |
that is disappointing, anyway I can save power with this processor? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 3996 Location: Bavaria
|
Posted: Mon Nov 08, 2021 5:00 pm Post subject: |
|
|
Adel Ahmed wrote: | [...] anyway I can save power with this processor? |
Yes, just use "powersave"-gouvernor
(I think Intel thought you only need either "maximum speed" or "minimum power") |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2911 Location: Edge of marsh USA
|
Posted: Tue Nov 09, 2021 3:44 am Post subject: |
|
|
Try:
Code: | # cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1.60 GHz - 3.80 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 1.60 GHz and 3.80 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.60 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
3500 MHz max turbo 4 active cores
3600 MHz max turbo 3 active cores
3700 MHz max turbo 2 active cores
3800 MHz max turbo 1 active cores |
and:
Code: | # grep -i POWERS /usr/src/linux/.config
CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y |
ADDED: Runs fast, cool, well modulated. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1971
|
Posted: Tue Nov 09, 2021 8:40 am Post subject: |
|
|
pietinger wrote: | Adel Ahmed wrote: | [...] anyway I can save power with this processor? |
Yes, just use "powersave"-gouvernor
(I think Intel thought you only need either "maximum speed" or "minimum power") |
I thought "ondemand" (or the newer "schedutil") were reckoned to provide better value for money (or cycles). Basically, powersave just makes your machine run slower, so you have to wait longer for the same workload to finish, and therefore you used more power running everything that isn't the cpu. But this may be for non-Intel cpus. _________________ Greybeard |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 3996 Location: Bavaria
|
Posted: Tue Nov 09, 2021 9:42 am Post subject: |
|
|
Goverp wrote: | [...] But this may be for non-Intel cpus. |
Yes, maybe, but I dont know because I know only Intel CPUs. And for an Intel there is the recommendation to use P-state when having Sandy Bridge and later generations.
PS.: See more here: https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_pstate.html
Last edited by pietinger on Tue Nov 09, 2021 9:50 am; edited 1 time in total |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3264 Location: Canada
|
Posted: Tue Nov 09, 2021 9:48 am Post subject: |
|
|
What are you talking about ? Intel pstate driver provides its own, hardware implemented drivers. They are called performance and powerstate, but they are not the same as cpufreq scaling drivers. cpufreq (with its own performate/powersave/ondemand etc) is bypassed entirely if intel pstate is used. Intel performance/powersave amounts to setting some bit in CPU and the rest is in hardware.
https://www.kernel.org/doc/html/v4.12/admin-guide/pm/intel_pstate.html |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2911 Location: Edge of marsh USA
|
Posted: Tue Nov 09, 2021 3:31 pm Post subject: |
|
|
@dmpogo -- what is WHO talking about? That would add clarity. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3264 Location: Canada
|
Posted: Tue Nov 09, 2021 5:45 pm Post subject: |
|
|
figueroa wrote: | @dmpogo -- what is WHO talking about? That would add clarity. |
Yep, sorry, I misfired aimlessly It was meant to express general confusion about the discussion |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1510
|
Posted: Thu Nov 11, 2021 7:27 am Post subject: |
|
|
thanks everyone I will set my governor to powersave |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3264 Location: Canada
|
Posted: Thu Nov 11, 2021 7:36 pm Post subject: |
|
|
Adel Ahmed wrote: | thanks everyone I will set my governor to powersave |
Just keep in mind that intel p_state driver with "performance" setting does not keep the CPU frequency fixed either. p_state switching is very fast, it adjusts frequency continuously. "Performance" just do it with a somewhat performance oriented bias while powersave biases more towards saving power. This is in contrast to cpufreq "performance" which I think just kepts CPU at maximum frequency. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 3996 Location: Bavaria
|
Posted: Thu Nov 11, 2021 9:29 pm Post subject: |
|
|
dmpogo wrote: | Just keep in mind that intel p_state driver with "performance" setting does not keep the CPU frequency fixed either. p_state switching is very fast, it adjusts frequency continuously. |
Yes.
Let me add for "performance": If your Intel processor is capable of doing an overboost (like mine i7), then you will see your cpu frequency at maximum (mine: 4.000) when CPU is idle, and it goes down to maximum (mine: 3.700 without boost) when having high cpu load. |
|
Back to top |
|
|
|