LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-27-2019, 10:44 AM   #1
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Rep: Reputation: 89
What is the expected cpu frequency behavior for a Core 2 Duo with Kernel > 4.14?


I realize there are a ton of threads about this regarding new frequency scaling on new Intel cpu's. I am using a simple Core 2 Duo which is not i-anything, or *Lake whatever. I know those cpu's support a lot of different things and act differently.

My specific processor is a P8400 which supports 800 MHz, 1.60 GHz, and 2.27 GHz. Previously the 'ondemand' option would adjust the frequency as needed, using one of these three frequencies. With newer kernels, the frequency floats all over the place using any imaginable value, changing by the second even when I have nothing intensive running. There is audible noise from the circuitry and battery life is horrible. As far as I can tell these cpus do not support p-state so I've recompiled the kernel, disabling this, but no change.

For now I'm using cpufreq-set in my initrd and setting it to 800 MHz and just leaving it there. And if I go to compile something manually set it to 1.60 GHz.

Is this the expected new behavior or is something broken?
 
Old 06-28-2019, 04:00 PM   #2
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
probably that is a forced Intel_Pstate setup and the expected result is standard use of pstate "performance" governor, but it could be "powersave", depends on the Kernel settings.

You can check it with
Code:
cpupower frequency-info
or
cpufreq-info
Should be clearly stated. You can add
Code:
intel_pstate=disable
to your boot parameters to keep using acpi_cpufreq and ondemand governor. Personally I don't like Intel_Pstate and always use acpi_cpufreq.

Some older Intel processors don't work with intel_pstate as they should, and thus should always have the boot parameter intel_pstate=disable. Your processor is most likely one of those.
 
Old 06-28-2019, 04:39 PM   #3
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
Adding that boot parameter seemed to have no effect. Also cpufreq-info tells me I'm already using acpi-cpufreq

Code:
username@host:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4294.55 ms.
  hardware limits: 800 MHz - 2.27 GHz
  available frequency steps: 2.27 GHz, 2.27 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 800 MHz and 2.27 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 2.27 GHz:0.17%, 2.27 GHz:0.01%, 1.60 GHz:1.74%, 800 MHz:98.08%  (13372)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 4294.55 ms.
  hardware limits: 800 MHz - 2.27 GHz
  available frequency steps: 2.27 GHz, 2.27 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 800 MHz and 2.27 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 2.27 GHz:0.01%, 2.27 GHz:0.00%, 1.60 GHz:0.00%, 800 MHz:99.99%  (2635)
The frequencies are at 800 MHz because I set it with cpufreq-set.

Curiously when using the ondemand governor I've even seen the frequency go beyond 2.27 GHz which can't be good.
 
Old 06-28-2019, 06:31 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by ordealbyfire83 View Post
Curiously when using the ondemand governor I've even seen the frequency go beyond 2.27 GHz which can't be good.
There should be a BIOS/EFI setting to inhibit "Turbo" or overclocking mode.
 
Old 06-29-2019, 09:53 AM   #5
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by ordealbyfire83 View Post
Adding that boot parameter seemed to have no effect. Also cpufreq-info tells me I'm already using acpi-cpufreq

Code:
username@host:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4294.55 ms.
  hardware limits: 800 MHz - 2.27 GHz
  available frequency steps: 2.27 GHz, 2.27 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 800 MHz and 2.27 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 2.27 GHz:0.17%, 2.27 GHz:0.01%, 1.60 GHz:1.74%, 800 MHz:98.08%  (13372)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 4294.55 ms.
  hardware limits: 800 MHz - 2.27 GHz
  available frequency steps: 2.27 GHz, 2.27 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 800 MHz and 2.27 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 2.27 GHz:0.01%, 2.27 GHz:0.00%, 1.60 GHz:0.00%, 800 MHz:99.99%  (2635)
The frequencies are at 800 MHz because I set it with cpufreq-set.

Curiously when using the ondemand governor I've even seen the frequency go beyond 2.27 GHz which can't be good.
Userspace.. Well. If you are not happy with ondemand, perhaps try "conservative". It is slower to peak and faster to reduce, but other than that it works abit the same way as ondemand. It's my personal favourite.

Expected behaviour with ondemand is normally quite good, while powersave is quite bad and performance pretty much maxes the cpu constantly which entails more heat and higher battery/power consumption.

For a laptop "conservative" is pretty ideal according to my demands.

PS. Kernel v 3.9 was the one where intel_pstate became the default.

Last edited by zeebra; 06-29-2019 at 09:54 AM.
 
Old 06-30-2019, 08:58 PM   #6
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
I've no bios setting for "Turbo" or similar. In any case a cpu shouldn't be overclocking itself when booted up to a simple MATE desktop sitting idle.

Quote:
Originally Posted by zeebra View Post
Userspace.. Well. If you are not happy with ondemand, perhaps try "conservative". It is slower to peak and faster to reduce, but other than that it works abit the same way as ondemand. It's my personal favourite.
Interestingly "conservative" keeps it at 800 MHz forever. These all seemed fine with kernels 4.4 and before.
 
Old 07-01-2019, 01:27 AM   #7
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by ordealbyfire83 View Post
Interestingly "conservative" keeps it at 800 MHz forever. These all seemed fine with kernels 4.4 and before.
That depends. It should do until you have some extended heavy tasks, then it will slowly clock up to max speed and stay there as long as needed, then quickly clock down. Try compiling a Kernel for example or some software, you will see.
 
Old 08-12-2019, 04:58 PM   #8
Wiser Slacker
Member
 
Registered: May 2014
Location: germany
Distribution: slackware x86_64 , arm , slackware , AlmaLinux
Posts: 83

Rep: Reputation: Disabled
you may read this instead of staying with an old kernel ...

https://www.linuxquestions.org/quest...ng-4175658943/

intel_pstate=disable is the wrong way
 
Old 08-29-2019, 02:31 PM   #9
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
Quote:
Originally Posted by Wiser Slacker View Post
you may read this instead of staying with an old kernel ...

https://www.linuxquestions.org/quest...ng-4175658943/

intel_pstate=disable is the wrong way
Not sure what processors you are using, but that didn't do anything here either. I'm guessing support for Core 2 Duo TXXXX and PXXXX is probably formally dead. Unless the kernel folks *seriously* test this out on real hardware, it's time to test out *BSD. Seriously, I'm ... done ... with troubleshooting these new kernels.
 
Old 08-29-2019, 10:42 PM   #10
Wiser Slacker
Member
 
Registered: May 2014
Location: germany
Distribution: slackware x86_64 , arm , slackware , AlmaLinux
Posts: 83

Rep: Reputation: Disabled
Hi ,
i have just try to explain how you get rid of the "p-states governor" and come back to use all the other governor's again.
So you may use them with newer kernels and get its funktion's while using the dynamic scaling of frequencies from the p-states backend.
The p-states governor - as i have explained - just do switch between performance and powersave ...
the other things are explained in the diverse dokuments or by the other - here writing - people ...
if you do use "intel_pstate=disable" than these backends of internal cpu freq regulations (by voltage, and many internals more) are totaly switched off ...
 
Old 08-29-2019, 10:50 PM   #11
Wiser Slacker
Member
 
Registered: May 2014
Location: germany
Distribution: slackware x86_64 , arm , slackware , AlmaLinux
Posts: 83

Rep: Reputation: Disabled
Quote:
Originally Posted by ordealbyfire83 View Post
Adding that boot parameter seemed to have no effect. Also cpufreq-info tells me I'm already using acpi-cpufreq

[CODE]username@host:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
so you may have the wrong driver , and as said - by zeebra - this driver gets its informations on how to change things only from BIOS

you may start reading dokuments - RTFM
 
Old 08-30-2019, 02:29 PM   #12
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
Really, I should start reading docs and mucking around with BIOS settings on a 10 year old laptop that worked perfectly until now?

The kernel documentation here explicitly states that the Linux kernel p-state driver is for Sandy Bridge and newer. This, from Wikipedia, means: "the codename for the microarchitecture used in the "second generation" of the Intel Core processors (Core i7, i5, i3)" which I stated in the original post that I am not using.

The instructions you describe such as using "dynamic scaling of frequencies from the p-states backend" isn't going to get exposed for a CPU that the kernel says can't support the p-state driver at all.
 
Old 08-30-2019, 05:12 PM   #13
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
a few weeks ago I noticed strange cpu freq on my Core2duo laptop

I don't use it that much, I was re-encoding video and noticed it was slow
looking at cpufreq-info in was ranged 1.20 GHz and 2.40 GHz ondemand
but the current was 632Mhz
I tried changing gov. , rebooting etc. but no change
However a new kernel update arrived and it is now performing as one would expect.

It is currently on a 5.2 kernel, the old one being a 4.19
I have no idea how long it had been affected, it was only when it was under load that I noticed it was slow ( and I don't use it much )
 
Old 08-31-2019, 02:52 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Generally speaking, I don't understand why people (try to) use the newest kernel on vintage hardware.

My 32-bit laptop is on debian oldstable and kernel 4.9.
Even my less-than-5-year-old desktop is on an LTS kernel - 4.19.

Both machines are all-intel and to my knowledge, both machines work as expected. No excessive fan noise.
 
Old 08-31-2019, 10:32 AM   #15
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
May have stumbled on something. This seems to be more related with timing than frequency scaling itself.

Firerat: You also have the same problem :

"I was re-encoding video and noticed it was slow looking at cpufreq-info in was ranged 1.20 GHz and 2.40 GHz ondemand but the current was 632Mhz"

You shouldn't see odd frequency values like that these processors.

At some point a patch was introduced which disabled a clock source check that these processors need. The patch was reverted at some late date in Kernel 4.19. If your kernel has not been patched try booting with the parameter

clocksource=hpet

This *should* cause you to see only the proper frequency values and not cause any frequency scaling monitors to go crazy. Now, I have not tested enough to know whether this is the only problem. We need to see whether there is any latency issue or whether the frequency in e.g. Ondemand mode lifts off of the lowest value more often than it should.

ondoho: I don't understand why people (try to) use the newest kernel on vintage hardware."

For those who care about software freedom, Core 2 Duo is hardly "vintage hardware" - it's the newest you've got this side of a Rockchip Chromebook that has, oh, I don't know, no ethernet jack and one USB port.

This whole mess and others like it are clearly caused by developers streamlining code and lumping hardware together that clearly does not belong together. Not to mention not actually testing it out first.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 08:29 AM
Intel Core 2 Duo U7500 and frequency scaling (Panasonic CF-W7) PPaFin Linux - Laptop and Netbook 0 04-19-2008 01:55 AM
[Debian stable] Frequency scaling Intel Core Duo T2250 alk77 Debian 3 03-22-2008 07:19 AM
replace core duo 2 with core duo 4 jfabiani Linux - Hardware 2 11-14-2007 11:24 AM
slack 11 + Core Duo T2600 + cpufreqd2.20 = variable frequency for 1 cpu only? ppfundst Slackware 2 10-12-2006 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration