Ubuntu – CPU frequency is always at minimum, even if CPU usage is 100%

cpuperformance

I don't know when this issue began to happen, it might have been since the time I installed Ubuntu (16.04, fresh). I was observing that Ubuntu was unusually slow, environment was choppy and CPU usage was high even when idle, initially I thought that some program was slowing it down.

After some time, I figured out what was causing it, the CPU frequency is set to 800 MHz, non-stop, regardless of circumstances. The maximum frequency is supposed to be 3100 MHz with Turbo-boost and 2000 MHz usually. I have deliberately set the CPU usage (of all 4 threads on 2 cores) to 100% by having Blender render some stuff on CPU, it still remains at 800 MHz.

I have tried setting maximum performance profile, but it still remains low. I have tested the temperature, it seems to be 60°C all the time, when 87°C is considered high and 105°C critical. I am running on AC power all the time, the battery does not appear to be recharging since some time ago.

This is what cpufreq-info reports:

 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: 0.97 ms.
 hardware limits: 800 MHz - 3.10 GHz
 available cpufreq governors: performance, powersave
 current policy: frequency should be within 2.00 GHz and 3.10 GHz.
                 The governor "performance" may decide which speed to use
                 within this range
 current CPU frequency is 800 MHz (asserted by call to hardware).

It is the same for other 3 CPU units.

This is what lscpu reports:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Model name:            Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
Stepping:              9
CPU MHz:               799.921
CPU max MHz:           3100,0000
CPU min MHz:           800,0000
BogoMIPS:              3990.99
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts

In powersave mode, it behaves identically. If I disconnect the AC power and run on battery, the CPU frequency skyrockets to 2800 MHz, so it seems to be an issue only on AC power (which is quite the opposite of what is it supposed to do).

I have tried to set change CPU profiles, I have tried to disable frequency scaling (How I can disable CPU frequency scaling and set the system to performance?), I have tried to set scaling_min_freq in /sys/devices/system/cpu/cpu[0-3]/cpufreq to some higher value, but neither of them did anything. The frequency remains minimal.

The CPU type is Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz, the computer is Dell Inspiron 15z Touch.

I have also an issue with battery not charging even if the computer is fed from the AC adapter.

More diagnostics:

$ sudo rdmsr --bitfield 15:8 -d -a 0x198
8
8
8
8
$ sudo rdmsr --bitfield 15:8 -d -a 0x199
9
8
9
9

In the case of 0x199, the numbers 8 and 9 appear to be randomly permuted between consecutive calls.

Best Answer

It turned out that this problem was unrelated to the intel_pstate driver, because acpi_cpufreq, the other driver, reported better values but never set them. The OS had probably no control over this.

This is a issue that happens with certain Dell laptops when charging is broken in a way that the laptop is powered by AC but not charged. Fixing the hardware problem removes the problem. In this case, it was an almost invisible piece of cloth in the power connector that prevented electrical contact.

Related Question