0

I have a Lenovo G50-80 with an i5-5200U CPU running Ubuntu 16.04.2 on 4.4.0-79-generic. I would like to disable CPU frequency scaling and processor halts for running a project. I have installed i7z and its output tells me that my CPU frequency varies a lot and my processor goes into C1 and C3 states when I'm not using it.

I have tried to change the governor from powersave to performance by following this answer. Running cpufreq-info tells me that powersave and performance are available governors and performance is set as the governor. Yet the output of i7z shows varying frequency and C1 states being in use. I have tried every other answer in the thread as well as from this answer. Going through the debian wiki doesn't help either.

TL,DR; change governor from powersave to performance does not have any effect

Quick Edit: This guy has the same issue too.

Edit: Here's the dump of my cpufreq-info for one of the logical cores.

analyzing CPU 3:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 0.97 ms.
  hardware limits: 500 MHz - 2.70 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 500 MHz and 2.70 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.18 GHz.

2 Answers2

0

If you are using intel-pstate, the default for Ubuntu, there are a bunch of settings for the cpupower program:

cpupower frequency-set -u 3.10GHz -d 3.10 GHz -g performance
cpupower set -b 0

Modify the -u and -l options to suit your processor.

To prevent C1 state, add the following options to your kernel boot parameters

intel_idle.max_cstate=0 processor.max_cstate=1

This is done by editing /etc/default/grub and adding these parameters to the line beginning with GRUB_CMDLINE_LINUX_DEFAULT

Charles Green
  • 21,859
0

I don't know how exactly to get it working for the generic kernel. But I installed 4.4.0-79-lowlatency kernel and installed linux-tools-4.4.0-79-lowlatency linux-tools-lowlatency. Then using

sudo cpupower frequency-set -g performance 

I was able to disable C states higher than C0 and have a constant frequency of 2493.18 MHz.