You are not logged in.

#1 2018-07-19 09:22:03

mvasi90
Member
Registered: 2017-02-02
Posts: 11

CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

Hello everyone,

Powersave gobernor not working on Intel i7 procesor. The gobernor always chooses the highest frequency

sudo cpupower frequency-set -g powersave --min 0.8GHz --max 3.5GHz
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7

After that, the CPU even idle having 3.1GHz

 sudo 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: 800 MHz - 3.50 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 3.50 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.10 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

If I change the "--max" option to 0.8GHz, for instance, the result is:  "current CPU frequency: 800 MHz (asserted by call to kernel)" and the fans stop sounding loud.

How can I solve it? I want the powersave option to choose according to the needs

Last edited by mvasi90 (2018-09-14 14:06:40)

Offline

#2 2018-07-19 11:10:15

radiomike
Member
Registered: 2013-12-19
Posts: 51

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

There's more things to look at in the p-state driver, which will affect this. I use tlp, and based on it's options you need to look at  energy performance hints (HWP), p-state performance and possibly x86_energy_perf_policy from linux tools.

At the moment all you are doing is telling the powersave governor it's max and min. These other options influence how it prioritises and it's affinity to lower frequencies based on load.

Last edited by radiomike (2018-07-19 11:10:46)

Offline

#3 2018-07-19 11:30:29

ooo
Member
Registered: 2013-04-10
Posts: 1,605

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

Don't post screenshots of text output, copy and paste the text inside code tags. Especially don't post oversized images. Please read https://wiki.archlinux.org/index.php/Co … s_and_code

What's the energy performance hint after setting the powersave governor? You can read it from /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference, and change it to more energy efficient hint, as documented here.

Offline

#4 2018-07-19 12:25:11

mvasi90
Member
Registered: 2017-02-02
Posts: 11

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

cat /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference
balance_performance
balance_performance
balance_performance
balance_performance
balance_performance
balance_performance
balance_performance
balance_performance

https://www.mankier.com/8/x86_energy_perf_policy

balance-power Set a policy where the performance and power are balanced. This is the default.

Why is not the default value on my laptop?

sudo x86_energy_perf_policy -h
...
value: ( # | "normal" | "performance" | "balance-performance" | "balance-power"| "power")
...

I changed it to power and now the battery life changes from 1 hour to 1 hour and 7 minutes.

I updated ArchLinux a few days ago, and the battery life was shortened from 2.5 hours to 1 hour.

Update:
After 10 minutes the CPU frequency changes between 2.8GHz and 3.1GHz. I only have xterm.
Changing the max frequency to 800MHz the battery life changes from 1h to 1h 40m (75% charged, this is okay and the fan is silent)

I I'm very busy now but I'll try the Gentoo distribution. The main influence is the SeLinux compatibility, the second seems to be the battery life.

Last edited by mvasi90 (2018-07-21 10:17:09)

Offline

#5 2018-07-28 14:10:07

mvasi90
Member
Registered: 2017-02-02
Posts: 11

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

4.15.14-1 and 4.17.10-1 comparison:

Arch kernel 4.15.14-1 works well. Idle Frequency is 800MHz
Arch Kernel 4.17.10-1 works bad. Idle Frequency is 3.1 and 3.4GHz

Difference between /proc/config.gz of each kernels

vimdiff    4.15.14-1.gz  4.17.10-1.gz
 # CONFIG_HZ_300 is not set  |  CONFIG_HZ_300=y
CONFIG_HZ_1000=y  |  # CONFIG_HZ_1000 is not set
CONFIG_HZ=1000  |  CONFIG_HZ=300

I'm losing my time. The laptop burns and the fan makes noise, I can't work

Last edited by mvasi90 (2018-07-28 14:10:51)

Offline

#6 2018-07-28 14:53:02

ooo
Member
Registered: 2013-04-10
Posts: 1,605

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

If you think the change in timer frequency is causing your issue, try recompiling the latest kernel to use CONFIG_HZ=1000.

If that makes no difference, bisect the kernel version, and commit that introduced the issue.

If the issue is preventing you from using your computer, stick to linux-lts until you've figured out the cause.

Offline

#7 2018-07-28 19:11:52

mvasi90
Member
Registered: 2017-02-02
Posts: 11

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

Only changing those options not working. But using the full config file works.

This doesn't solve my problem. I can't compile the kernel in every update.

Offline

#8 2018-07-28 21:13:23

ooo
Member
Registered: 2013-04-10
Posts: 1,605

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

Then you need to figure out the configuration options in new kernels that result in you having this issue.

I didn't notice anything obvious in newer configs, so I'd start by testing each update of the config file starting from 4.16-1. Once you find the offending commit, test every configuration change in that commit.

The recompilation after small config changes shouldn't usually take too long, if you don't clean the build files in between.

Offline

#9 2018-07-28 21:39:54

mvasi90
Member
Registered: 2017-02-02
Posts: 11

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

I'm very very busy.
Now I recovered a backup (borgbackup) from 2018-04-01 with Linux kernel 4.15 to continue working.

But if I need install a package how can I install it?

Surely will appear the 404 error, not found. ArchLinux is rolling release and is bad idea updating only one package (like sudo pacman -Sy package) without updating entire system.

Offline

#10 2018-07-28 21:53:52

ooo
Member
Registered: 2013-04-10
Posts: 1,605

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

Again, If you have issues with newer kernels, you can use linux-lts until the issues are resolved. That would be the 'right' way in this scenario, if you don't want to recompile the kernel yourself.

Of course that will only work until the linux-lts version is bumped, which is why you should try to figure out the cause of your issue. No one else can do it for you unfortunately.

Offline

#11 2018-09-14 14:05:04

mvasi90
Member
Registered: 2017-02-02
Posts: 11

Re: CPU High Frequency from kernel 4.17-4.18 if C-States is enabled (BIOS)

The issue seems to be solved when I'm disabling C-States from BIOS but in my opinion this is not a good solution.
I'm using the kernel 4.18.6 but this issue was introduced from 4.17 or 4.16 (The last good version was 4.15)

Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=201117

Last edited by mvasi90 (2018-09-14 14:07:44)

Offline

Board footer

Powered by FluxBB