Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot save scaling_governor settings

Linux Kernel, Network, and Services configuration.
Message
Author
EIKA
Posts: 16
Joined: 2021-01-01 15:17

Cannot save scaling_governor settings

#1 Post by EIKA »

Hi all!

Debian 10.7 net install. 32 bit OS. CPU Intel N280 (single core, two threads). Nominal CPS frequency is 1662MHz. BIOS settings are unknown (remote machine with no iLO/KVM).

But CPC is here, because I see these files:

Code: Select all

find / -name scaling_governor
find / -name scaling_max_freq
Current CPU scheme is ondemand. It's confirmed by cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor command. Its output is:

Code: Select all

ondemand
ondemand
But if I change these to performance, new settings applies well:
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

Code: Select all

performance
performance
But once PC is rebooted, they reverts back to ondemand :(

The same issue with:
apt install cpufrequtils
for i in 0 1; do cpufreq-set -c $i -g performance; done


Also tried to set up kernel values via grub:

nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0 processor.max_cstate=1 pcie_aspm=off idle=poll"
update-grub
sysctemctl reboot


But they are ignored after reboot, and CPU again shows low speeds like 1030-1260MHz :(

dmesg -T | grep intel_idle output is:

Code: Select all

[Sat Jan  9 14:48:34 2021] intel_idle: MWAIT substates: 0x20220
[Sat Jan  9 14:48:34 2021] intel_idle: v0.4.1 model 0x1C
[Sat Jan  9 14:48:34 2021] intel_idle: lapic_timer_reliable_states 0x2
Any ideas guys?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Cannot save scaling_governor settings

#2 Post by Head_on_a_Stick »

/sys is a virtual filesystem so any changes will not persist. Add your echo commands to /etc/rc.local to have them run at every boot. And don't disable C-State, Intel almost certainly knows how to handle the processor better than you.
deadbang

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#3 Post by EIKA »

Hi!

Thanks for your reply. Does it looks OK?

Image

Plus chmod +x?

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#4 Post by CwF »

You can create add the entry to /stc/sysfs.d/cpupolicy.conf

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#5 Post by EIKA »

CwF wrote:You can create add the entry to /stc/sysfs.d/cpupolicy.conf
Thanks.

Is syntax would be the same as shown above? echo performance...

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#6 Post by CwF »

EIKA wrote:Is syntax would be the same as shown above? echo performance...
very good, no it's not, I failed to mention...hold on...checking...

Code: Select all

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = performance

...scan dmesg or logs for entries like:

Code: Select all

sysfsutils[1256]: Setting sysfs variables...unknown attribute devices/system/cpu/cpufreq

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Cannot save scaling_governor settings

#7 Post by Head_on_a_Stick »

EIKA wrote:Does it looks OK?
Yes but you don't need "exit 0" at the end.
EIKA wrote:Plus chmod +x?
Yes.

But having said that CwF's method makes more sense (I didn't know about /etc/sysfs.d/ so thanks for that).
deadbang

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#8 Post by EIKA »

CwF wrote:very good, no it's not, I failed to mention...hold on...checking...

Code: Select all

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = performance
Both directory and file was missed and I created them. Is it OK?

Image

Do I need to set any special rights (bits) for the them?

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#9 Post by CwF »

EIKA wrote:Do I need to set any special rights (bits) for the them?
You needed root to create the directory and file, so no, it's all set, just reboot and check.

Isysfs.d is not created by default, and it is somewhat machine specific. The sysfs enumeration may be different between packages, so if that sysfs directory exist (/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) on your system you should be good. Basically, all options are in that directory can be set if needed. Newer processors have fewer options beyond the governor.

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#10 Post by EIKA »

I did this

Image

restated the machine and these instructions was ignored. CPU is still running at 1GHz instaed of 1.66GHz.

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#11 Post by CwF »

ya, I don't know your gigahertz! To check;

Code: Select all

:~$  cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave
:~$  cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave
:~$  cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
intel_pstate
and take a look for errors, if the system is paying attention to your added config = there is a status line somewhere. I'm rusty on this and you may need some additional packages. Or fail the method and echo them in...

I don't use this anymore so...but you can also simply pin the cpu to a clock and ignore the governor, just echo to /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq.

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#12 Post by EIKA »

This is my output:

Code: Select all

root@HP-T5745-TC:/# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
ondemand performance schedutil
root@HP-T5745-TC:/# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
root@HP-T5745-TC:/# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
acpi-cpufreq
root@HP-T5745-TC:/#
And CPU is saving power/lowering core speed:

Code: Select all

root@HP-T5745-TC:/# egrep '(MHz)' /proc/cpuinfo
cpu MHz         : 1166.035
cpu MHz         : 1143.262
Last edited by EIKA on 2021-01-10 08:08, edited 1 time in total.

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#13 Post by EIKA »

CwF wrote: just echo to /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq.
As was told by Head_on_a_Stick
sys is a virtual filesystem so any changes will not persist.
But I need to have max performance all the time even after reboot.

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#14 Post by CwF »

Have you installed cpufrequtils ?
That should then read your settings.

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#15 Post by EIKA »

CwF wrote:Have you installed cpufrequtils ?
That should then read your settings.
Just did that. What's my next step after that? I am still using cpupolicy.conf.

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#16 Post by CwF »

EIKA wrote:? I am still using cpupolicy.conf.
Yes, sorry for the fragmented instructions, this is what I meant above mentioning additional packages... I have nothing to look/test with to help me remember! Start over with my instruction, now with cpufrequtils installed - this may turn on those settings. Again, check dmesg/logs for a hint the settings are honored or failed - no message means the method is missing something.

look if /etc/default/cpufrequtil exist. Read it, maybe set there? Look for Enable=True. This may mention and enable /etc/sysfs.d

If the settings you'd like are possible in /etc/default maybe that's all. This could be wiped out on an update. Settings in sysfs.d would not be wiped on update and useful for per core rules. The enabler may be in /default though...

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#17 Post by EIKA »

look if /etc/default/cpufrequtil exist.
It doesn't exist.

Installation of cpufrequtils didn't helped. CPU is still lowering core speed.

Here is full dmesg output: https://pastebin.com/fyv2dRMC

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#18 Post by CwF »

Well, I see nothing there, so it's ignored.

My last gasp from my old notes - maybe /etc/init.d/cpufrequtils exist?
That would be another form of /etc/default and the same thoughts apply 'ENABLE="true" is how I have it written for that type setup. Also I have /etc/init.d/loadcpufreq where this could be found on some systems.

This is all also in notes marked 'deprecated'.

There is also a similar 'linux-cpupower' I do not believe covers your hardware.

I'd also look through the bios to ensure power settings are enabled.

Good Luck

EIKA
Posts: 16
Joined: 2021-01-01 15:17

Re: Cannot save scaling_governor settings

#19 Post by EIKA »

/etc/init.d/cpufrequtils does exist. Here is its content: https://pastebin.com/btZF6NW3

And I believe that If I can change performance settings with echo and they affects CPU speed, they can be saved somewhere. And this is not BIOS settings issue.

CwF
Global Moderator
Global Moderator
Posts: 2680
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Cannot save scaling_governor settings

#20 Post by CwF »

EIKA wrote:/etc/init.d/cpufrequtils does exist
There you go! Those are the instructions, make sure the right governor is selected and use the minimum '1600000' or whatever is reported as available, you're close!

Post Reply