22

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.

13
  • 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. Jul 23, 2016 at 22:33
  • Please use the powersave governor for the test. Jul 23, 2016 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, 2016 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, 2016 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 ? Jul 24, 2016 at 15:30

8 Answers 8

13

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.

EDIT: 7 years after asking the problem, an explanation why this happens appeared on bugzilla.

7
  • 1
    But what to do, if right now i can not replace hardware (charger) ?
    – Vedavrat
    Feb 27, 2017 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, 2017 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. Mar 9, 2018 at 10:46
  • 2
    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, 2018 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, 2018 at 10:09
8

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?

3
  • Wow, yep this worked for me!
    – Tim
    Jul 12, 2018 at 9:23
  • 1
    Also it helps to stop fan sticking on max speed
    – 4xy
    Mar 25, 2020 at 21:37
  • 2
    Incredible, the problem was not fixed after several reboots but unpluging & repluging the power cord worked instantly !
    – McQuack
    May 15, 2020 at 4:24
2

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.

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.

4
  • 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, 2017 at 13:34
  • 2
    @vedavrat the point of this is in fact, to set up scaling to maximum, and not auto-scale. Your question contradicts the point of the solution. Mar 5, 2020 at 8:33
  • @MarlonvanderLinde Understood. Thank you.
    – Vedavrat
    Mar 8, 2020 at 13:59
  • This just gives me a ton of errors: Error setting new values. Common errors: - Do you have proper administration rights? (super-user?) - Is the governor you requested available and modprobed? - Trying to set an invalid policy? - Trying to set a specific frequency, but userspace governor is not available, for example because of hardware which cannot be set to a specific frequency or because the userspace governor isn't loaded?
    – Cerin
    Apr 19, 2023 at 16:44
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.

2
  • 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, 2018 at 11:23
  • This happens to me even when my battery is at 100% and plugged in.
    – Cerin
    Apr 19, 2023 at 16:45
2

I ended up here because I had a similar problem. On my laptop with an Intel Core i5-6267U, the CPU would get stuck at the minimum frequency of 400 MHz, although it turned out that sometimes it could return to higher frequencies. Specifically, frequencies returned to normal after reboot or going to sleep. However, it would quickly get stuck at 400 MHz again.

Turns out, the fan was broken and when the CPU became too hot, it went into some kind of safe mode that it did not leave when the CPU cooled down again. That was what initially confused me: The CPU would be at low temps, but stuck at minimum clock. So it was not strange that the fan was not running because it should not be at those temps.

What led me to solution was that I put the CPU under heavy load with a video transcode. There I could see the CPU quickly getting hotter and then throttling to 400 MHz when it got it 85°C or so. The fan never turned on.

I ordered a new fan for the laptop and now its working perfectly fine.

1

Sometimes it's not only about setting the scaling governor. The scaling policies are sometimes set to between MIN_FREQ and MIN_FREQ. I had to write a script to set everything straight in one go:

#!/bin/bash
echo "Setting all CPUs to " "$@"
CPUINFO_MIN_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq)
CPUINFO_MAX_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)
MIN=$(echo "scale=1; $CPUINFO_MIN_FREQ / 1000000" | bc)"G"
MAX=$(echo "scale=1; $CPUINFO_MAX_FREQ / 1000000" | bc)"G"

echo "Minimum frequency: " $MIN ", Maximum frequency: " $MAX

GOVERNOR=@0
if [ $# -eq 0 ]
    then
        echo "No arguments supplied, using ONDEMAND governor"
        GOVERNOR="ondemand"
    else
        echo "Governor " $1 " supplied"
        GOVERNOR=$1
fi

for ((i=0;i<$(nproc);i++));
    do cpufreq-set -c $i -r -g $GOVERNOR  --min $MIN --max $MAX;
done
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; 
4
  • 1
    This could use some explanations. What is "BD PROCHOT"? Jan 5, 2021 at 11:45
  • 2
    BD PROCHOT allows the computer to throttle the GPU if the CPU gets too hot. You should never disable it, only professional overclockers do, and never on laptops. Downvoted until a disclaimer is added. Feb 6, 2021 at 21:29
  • You are probably right that you should not do that. In my case with my laptop, which when I connected the power adapter СPU went to a non-replaceable frequency of 400 hertz and only this method helped to adjust the frequency itself. I tried all possible approaches and unfortunately nothing worked. It's been 5 years since I had to run an appropriate script. It may be a very bad solution, but it works.
    – eSlider
    Nov 4, 2021 at 7:43
  • Macbook pro - with OEM battery, this method helped 100% from the slow CPU. Thank you!
    – hazg
    Feb 13, 2023 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .