CPU Frequency Scaling Tool does not preserve governor (solved)

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

CPU Frequency Scaling Tool does not preserve governor (solved)

Post by Phoenix »

Distribution: Bionicpup64 8.0
Kernel: 5.10-ck/5.10aufs
Version of CPU Frequency Scaling Tool: 0.8.1
The CPU Frequency Scaling Tool is very useful, allowing you to control energy usage, etc etc.
However it appears so far that it does not preserve governors after poweroff/restart, despite saying 're-activated for all users at bootup'. This is clearly shown after restarting, or shutting down, then booting up again and checking via the GUI. It is also evident that nothing has changed in etc/init.d/wcpufreq

Last edited by Phoenix on Tue Feb 22, 2022 3:54 pm, edited 1 time in total.

IRC: firepup | Time to hack Puppy!

User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by mikewalsh »

@Phoenix :-

This very much depends on what your CPU is. It's nothing to do with the software.....rather, it's a conflict between the Scaling Tool and Intel's recent generations of processors, which are specifically designed to work best with their own governor and nobody else's.

I seem to re-call there was also a problematic release of the Scaling Tool that didn't work correctly.....and required some manual intervention. Mind you, my memory is not what it was, and I could be wrong about this..... :oops:

So; Intel, or AMD?

Mike. ;)

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

Intel, and what is wpcufreq supposed to do? If it is supposed to set the governor, it clearly isn't being changed to set 'powersave'.

IRC: firepup | Time to hack Puppy!

User avatar
Marv
Posts: 448
Joined: Fri Dec 20, 2019 3:09 am
Has thanked: 209 times
Been thanked: 120 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Marv »

A couple of ways around this. If you just want the 'traditional' acpi-cpufreq governors and scaling tool behavior back, pass intel_pstate=disable as a kernel parameter on boot. Basically works in all pups.

If your processor is mid generation i5 or newer, run the frequency scaling tool and see if schedutil is an intel governor option. It has to be enabled in the kernel and I can't remember if it is in your pups kernel. I'm running fossapups and peebees most recent LxPups with the 5.15.x kernels on my i5 based laptops circa 2012 and the thermal control is better than the acpi conservative governor, my previous favorite. If it's there, give it a go.

I cobbled together a cpu_frequency scaling tool that took much of this into account and at least gave a warning/information bit if the intel was detected but it didn't go anywhere and the intel governors got better fast enough so I don't even patch it in to my pups anymore.

Edited once: Grammar and spelling.

Last edited by Marv on Mon Dec 27, 2021 6:21 am, edited 1 time in total.

My pups: LxPupSc64 and Voidpup64 with LXDE ydrv & synaptics touchpad drivers, both using savefiles. Ydrv based NoblePup64 (JWM & LXDE), Bookworm64 & Fossapup64-small (LXDE/PCManFM). No savefiles, no fdrvs there. :thumbup:

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

The governors work as intended, it is the fact that they don't persist across boots that is my issue. And schedutil is useless on ck's kernel as it's meant for a different scheduler, not MuQSS scheduler, and thereby sends it up to the max. And does a modern celeron count as in i5?

IRC: firepup | Time to hack Puppy!

User avatar
Marv
Posts: 448
Joined: Fri Dec 20, 2019 3:09 am
Has thanked: 209 times
Been thanked: 120 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Marv »

Quick check of operation in LxPupSc64 21.04 +4 with the 5.15.7 kernel. So long as the intel_pstate driver is detected, nothing is written to /etc/init.d/wcpufreq. If it is deleted (as I run), it is not created when a governor is changed. As soon as the intel_pstate driver is removed, an empty wcpufreq is created. Pass the kernel parameter as in my post above, reboot, and the cpu scaling script works 'traditionally'. Change a governor, that is reflected in wcpufreq and preserved through a reboot. In this pup, the wcpufreq scaling script is version 0.8.2. YMMV

I know nowt about the modern celerons, being a dinosaur :)

Cheers,

My pups: LxPupSc64 and Voidpup64 with LXDE ydrv & synaptics touchpad drivers, both using savefiles. Ydrv based NoblePup64 (JWM & LXDE), Bookworm64 & Fossapup64-small (LXDE/PCManFM). No savefiles, no fdrvs there. :thumbup:

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by bigpup »

Phoenix,

What is the CPU?

What scaling driver are you selecting to use or has been selected?

How is Bionicpup64 installed and on what type drive?

Quickpet->Info->Bionicpup updates
Have you done this and rebooted, updating the save, so these changes are now being used?

You are using a different Linux kernel, than the one that comes in Bionicpup64 8.0
There may be something wrong with the config of that kernel, that does not have CPU frequency scaling, properly configured to work.

Where did you get the kernel?
How did you change it?

Posting the contents, of the boot loader menu entry, used to boot, may help.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

Celeron N3550
Ondemand/powersave
Installed on a USB originally via ISO, then copied off and back on.
Already updated and rebooted (and booted many times)
CPU Frequency Scaling works as intended on the kernel, setting to 'powersave' clocks down to the minimum.
I simply forked from https://github.com/ckolivas/linux and merged in the correct aufs version. You can look at https://github.com/Phoenix-Starlight/ck ... ee/5.10-ck
I used the default configuration via

Code: Select all

make

and enabled HugePages.
The boot entry is

Code: Select all

/vmlinuz pfix=nocopy,fsck pmedia=usbhd; initrd /initrd.gz

As well I noticed it is not using intel_pstate, it is using intel-cpufreq driver.

IRC: firepup | Time to hack Puppy!

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by bigpup »

You need to set it to using the intel_pstate driver

There are only two governors available for that driver
performance
powersave

This driver is Intel's specifically produced and coded for it's CPU.
It is the best one to use for Intel CPU.

powersave does the same thing that ondemand does in other drivers.

CPU frequency scaling tool
It will have other governor settings listed, but that selection is not accounting for the driver being used.
It just lists all possible governors.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

I checked already in the GUI and there is no such driver provided, nor in the original 4.19.23 kernel released in the iso. I already removed the driver, rebooted, then check.

IRC: firepup | Time to hack Puppy!

backi
Posts: 600
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 76 times
Been thanked: 70 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by backi »

@bigpup wrote:

This driver is Intel's specifically produced and coded for it's CPU.
It is the best one to use for Intel CPU.

powersave does the same thing that ondemand does in other drivers.

Indeed.....so it is.
I have Intel Processors Core I5
I have added "intel_pstate=enable" to the kernel Line in my Grub4Dos menu.lst to enable either powersave or performance to be chosen with the Cpu Governor.

powersave is the best Choice regarding Temperature and Performance for my Intel Core I5 Processors.

B.t.W:
There is possibly a Tool called CPU-GUI in the Packet Manager......quite a handy Tool to choose the Cpu-Governor on the fly.

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Feek »

My CPU is Intel Core i3.
CPU frequency scalling tool says "Scaling driver: 'intel_pstate' " and it's running in "performance" mode by default.

I was never able to change it permanently to "powersave".
It is possible only for the current session, then it is running in "powersave" till the end of the session.

Adding "intel_pstate=enable" to the kernel line of the boot config file doesn't have any effect on my laptop (1. in CPU frequency scalling tool change to "powersave", 2. save session, 3. reboot, 4. it shows "performance" again).

Maybe I'm anti-talent in this :roll: .
Anyway Fossapup64 runs well in "performance" mode , so I accepted that as a fact.

backi
Posts: 600
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 76 times
Been thanked: 70 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by backi »

@Feek

I am in Fossa-Dog64
There is possibly a Tool called cpupower-gui in the Packet Manager (in Fossa Puppy probably too......quite a handy Tool to choose the Cpu-Governor on the fly.

Sorry .....did a mistake .......maybe try to install cpupower-gui--------- quite a handy Tool to choose the Cpu-Governor on the fly.(during Session)....
your settings will not survive Reboot i think ....but does not matter.......works for me.

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Feek »

@backi ,
I installed cpupower-gui from Puppy package manager.
Simple little GUI and works fine.

As I wrote the same effect (changing the governers on-the-fly) on my laptop can be achieved with "CPU frequency scaling tool" built-in in Fossapup by default.

Anyway, thanks for the tip.
Greetings

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by bigpup »

Phoenix wrote: Sun Dec 26, 2021 9:34 pm

Intel, and what is wpcufreq supposed to do? If it is supposed to set the governor, it clearly isn't being changed to set 'powersave'.

I tried it in my install of Bionicpup64 8.0 using the kernel it comes with.
CPU Frequency scaling tool opens showing it is using the intel_pstate driver.
Selecting the governor to use.
It will list many ones, but the only ones that are provided that work in intel_pstate is performance and powersave.
It was already set to performance.
I changed it to powersave.
You also need to assign minimum and max setting.
(if no minimum and max setting is set. Powersave governor will not be saved as the reboot setting)

Really, I think the CPU Frequency Scaling Tool is in need of some update coding.
I do not think it is coded to fully support setup of the intel_pstate driver.

The intel_pstate driver is in the Linux kernel and gets loaded from it.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

bigpup wrote: Sat Jan 01, 2022 9:26 pm
Phoenix wrote: Sun Dec 26, 2021 9:34 pm

Intel, and what is wpcufreq supposed to do? If it is supposed to set the governor, it clearly isn't being changed to set 'powersave'.

I tried it in my install of Bionicpup64 8.0 using the kernel it comes with.
CPU Frequency scaling tool opens showing it is using the intel_pstate driver.
Selecting the governor to use.
It will list many ones, but the only ones that are provided that work in intel_pstate is performance and powersave.
It was already set to performance.
I changed it to powersave.
You also need to assign minimum and max setting.
(if no minimum and max setting is set. Powersave governor will not be saved as the reboot setting)

Really, I think the CPU Frequency Scaling Tool is in need of some update coding.
I do not think it is coded to fully support setup of the intel_pstate driver.

The intel_pstate driver is in the Linux kernel and gets loaded from it.

Well it is certainly not coded to preserve governors across boots for intel-based drivers it seems. Regardless of driver it should even though the driver may be less than effective.

IRC: firepup | Time to hack Puppy!

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by bigpup »

So, did you try the setup exactly as I have stated?
Giving powersave a minimum and maximum setting?
Making sure to update the save with the change?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Feek »

You also need to assign minimum and max setting.
(if no minimum and max setting is set. Powersave governor will not be saved as the reboot setting)

My solution was simple:
I symlinked the wcpufreq into /root/startup and it reminds me every time I boot Fossapup to manually set the governor to powersave for the current session.

I can try what you suggest but I have no idea what minimum and maximum values to set. :?:

User avatar
bigpup
Moderator
Posts: 6975
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 902 times
Been thanked: 1520 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by bigpup »

the first window of CPU frequency Scaling Tool gives speed info for what setting it is using.

What setting is it at when using performance?
That is the max setting.
What does it show for setting when the powersave is used?
That is the minimum setting.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Phoenix »

@bigpup
I suspect that the model N3550 Celeron does not support a part of intel_pstate as when looking this up, I found a way to check for intel-pstate's presence and an explanation that intel-cpufreq is actually just intel-pstate in passive mode! So... I guess the tool will be borked since it can't tell that intel-cpufreq is just intel-pstate in passive mode. :thumbdown:

IRC: firepup | Time to hack Puppy!

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: CPU Frequency Scaling Tool does not preserve governor

Post by Feek »

@bigpup ,
I report success!
It works well with my Intel core i3. Thanks :thumbup: .

The governor "powersave" says that "frequency is fixed: 800 MHz".
The governor "performance" says that "frequency is fixed: 2200 MHz".
The same values are also shown in PupSysInfo->Mainboard->CPU->Min/Max Speed: 800/2200 MHz.

I assigned the values as minimum and maximum, pressed "apply" and saved changes.
After reboot the active governor is "powersave". :idea:

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: CPU Frequency Scaling Tool does not preserve governor (Solved)

Post by Phoenix »

Well putting enable as an option doesn't really tell intel_pstate what might be expected of it. All it does is just enable the driver. You need to pass 'active' to the kernel line.

IRC: firepup | Time to hack Puppy!

Post Reply

Return to “Bug Reports”