14

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.

  • There have been a few similar reports lately, and often for CPU Model 58. hmmm...What brand is your computer? Have a look at this, where something external to the intel_pstate CPU frequency driver is holding the frequency low. While stressing your CPU's at 100% load, could you look at sudo rdmsr --bitfield 15:8 -d -a 0x198 and sudo rdmsr --bitfield 15:8 -d -a 0x199 and add the output to your question. Note rdmsr is provided by the package msr-tools and requires the msr module to be loaded first via sudo modprobe msr. – Doug Smythies Jul 23 '16 at 22:33
  • Please use the powersave governor for the test. – Doug Smythies Jul 23 '16 at 22:36
  • I have added the requested information to the initial post. In short, my computer is a Dell Inspiron 15z Touch, it does appear to be an instance of Bug 118751 (because the problem vanishes when running on battery). Using the powersave governor changes nothing. – Dugi Jul 24 '16 at 9:03
  • I have noticed that exactly like with Marcin Nowak in the discussion about that bug, my battery appears to be charging not at all or extremely slowly (even if the computer is turned off). AC power doesn't seem to be weak in any way, though. – Dugi Jul 24 '16 at 9:13
  • Do you want to continue via the bug report? Something external to the intel_pstate CPU frequency driver is holding the CPU frequencies at their lowest pstates. If you boot using the acpi_cpufreq CPU frequency driver, what do you get for cat /sys/devices/system/cpu/cpufreq/policy0/bios_limit ? – Doug Smythies Jul 24 '16 at 15:30
12

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.

  • 1
    But what to do, if right now i can not replace hardware (charger) ? – Vedavrat Feb 27 '17 at 13:29
  • I'd check out the connector, there is a chance that something is wrong with it and it can be fixed manually. If not, you will probably have to suffer the (non-fatal) problems with slow CPU. This is a hardware problem unrelated to OS or drivers. – Dugi Feb 27 '17 at 13:36
  • My Dell Inspiton 15R N5110 Intel i7-2860QM was with dying batter up to the point when it stop to charge, leaving me with 800 MHz. I opened BIOS and disabled Charger Behavior and Adapter Warnings. Pulled batter off and back again. Also in Windows, but put to High Performance Profile. And got back my CPU and got 2500 MHz. So it is possible to overcome issue without replacement. – dzmitry.lahoda Mar 9 '18 at 10:46
  • 1
    To clarify, your battery was not being charged? So, if I have the same problem as the OP, but my battery seems to be charging fine (laptop lasts many hours on battery), then I have a different problem? – Garrett Nov 12 '18 at 9:26
  • 1
    @Garrett The battery was not being charged. If the batter charges, then it's not this problem. The problem was that BIOS got into an unexpected situation where the laptop was powered by AC, but the battery wasn't charged. – Dugi Nov 13 '18 at 10:09
2

This will set your cpu freq to top speed from any terminal:

sudo cpufreq-set -f `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`

Edit the /etc/init.d/ondemand file to permanently add this. ondemand is used to modify your freq during login. The default is the 'ondemand' governor. In other words you start at 800mhz and go up as needed.

  • 2
    It helps. Thank you! But then we just change CPU frequency from minimal (800 Mhz) to maximal (3200 MHz), and how to setup to adjusting (variating) CPU frequency between 0.8 and 3.2 GHz as needed according loading, please? Thank you. – Vedavrat Feb 27 '17 at 13:34
2

I had the same issue - cpu freq stuck in ubuntu as well as windows, after a overheated shutdown in the carry case with the laptop still being on.

I went to the BIOS, and disabled cpu power management in "power", and put everything else to full throttle (max performance). Rebooted, back to full speed, then back to the BIOS, and enabled cpu management again, and corrected the other settings I changed before. Et voilà!

EDIT: Turns out it is a battery issue. If the battery is really low, the cpu won't speed up (I assume to save power). On my thinkpad I have to charge the battery for some minutes, until the charging LED stops fast flickering BEFORE I turn on the machine again.

  • I did the same on my XPS 15, though I never re-enabled the power management. Ever since it runs fast and constant. (Battery is now a bit affected but that's not too important for me) – pandaadb Apr 27 '18 at 11:23
2

Sometimes my laptop completely ignores the cpufreq settings. I found this works:

Unplug the power cord and plug it back in again. Fixed :)

I am guessing the reason is that the machine got confused: it thinks it is on battery, and it thinks the battery is low, so it underclocks the CPU to save power.

We just need to let it know that it is actually plugged in and doing fine.

(Asus x453m laptop here, Ubuntu 14.04) YouTube: Have you tried turning it off and on again?

  • Wow, yep this worked for me! – Tim Jul 12 '18 at 9:23
0

I had the same issue with my ThinkPad T520. After trying all the solutions found on internet, I was ready to reinstall Ubuntu. But then I've checked the CPU frequency in Windows and found it limited to 800 MHz too.

So it looked as hardware problem. It was not obvious that there are issues with CPU cooling, because cooler RPMs were low and laptop case wasn't hot or even warm.

Since there weren't any other options anyway, I've disassembled laptop and changed thermal interface greese in CPU and GPU chips. And you know what? It helped!

Unit-tests on one of my Django projects execution time was 45 min, now it's 11 min.

So, if you'll face the similar issue, especially on laptop — probably it's because dried stock thermal interface — after 3-5 years it often stops doing it's job. And don't be fooled by the clean radiator, silent cooler and cool laptop body.

0

Workaround solution

# Determinate CPU capabilities
MAX_CPU=$(cpupower frequency-info -l | tail -n1 | cut -d' ' -f2)

# Disable "BD PROCHOT" 
wrmsr -a 0x1FC 262238;

# Set and apply frequencies
cpupower frequency-set \
  -d $(expr $MAX_CPU / 2) \
  -u $MAX_CPU \
  -r \
  -g performance; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.